private void initPlacemarkList(Product product) { if (product != null) { Placemark[] placemarks = placemarkDescriptor.getPlacemarkGroup(product).toArray(new Placemark[0]); placemarkList.addAll(Arrays.asList(placemarks)); } }
@Override protected String doInBackground(ProgressMonitor pm) throws Exception { List<List<Band>> bandList = new ArrayList<List<Band>>(); final List<String> timeVariables = timeSeries.getEoVariables(); for (String timeVariable : timeVariables) { bandList.add(timeSeries.getBandsForVariable(timeVariable)); } final PlacemarkGroup pinGroup = timeSeries.getTsProduct().getPinGroup(); final ProductNode[] placemarkArray = pinGroup.toArray(); if (placemarkArray.length == 0) { return "There are no pins which could be exported."; } List<Placemark> placemarks = new ArrayList<Placemark>(); for (ProductNode placemark : placemarkArray) { placemarks.add((Placemark) placemark); } CsvExporter exporter = new TimeCsvExporter(bandList, placemarks, writer); exporter.exportCsv(pm); return null; }
public Placemark[] getPinPositionsToDisplay() { if (pinSupport.isShowingAllPins()) { final PlacemarkGroup pinGroup = timeSeries.getTsProduct().getPinGroup(); return pinGroup.toArray(new Placemark[pinGroup.getNodeCount()]); } else if (pinSupport.isShowingSelectedPins()) { return pinSupport.getSelectedPins(); } return new Placemark[0]; }
private void updateGcpGeoCoding() { final GeoCoding geoCoding = currentProduct.getGeoCoding(); if (geoCoding instanceof GcpGeoCoding) { final GcpGeoCoding gcpGeoCoding = ((GcpGeoCoding) geoCoding); final PlacemarkGroup gcpGroup = currentProduct.getGcpGroup(); final int gcpCount = gcpGroup.getNodeCount(); if (gcpCount < gcpGeoCoding.getMethod().getTermCountP()) { detachGeoCoding(currentProduct); } else { gcpGeoCoding.setGcps(gcpGroup.toArray(new Placemark[gcpCount])); currentProduct.fireProductNodeChanged(Product.PROPERTY_NAME_GEOCODING); updateUIState(); } } } }
final GcpGeoCoding.Method method = GcpGeoCoding.Method.valueOf(GcpGeoCoding.Method.class, methodName); final PlacemarkGroup gcpGroup = product.getGcpGroup(); final Placemark[] placemarks = gcpGroup.toArray(new Placemark[gcpGroup.getNodeCount()]); try { gcpGeoCoding = new GcpGeoCoding(method, placemarks,