private void addPPL(ProductSceneView view) { GeoCoding geoCoding = view.getProduct().getSceneGeoCoding(); if (geoCoding != null && geoCoding.canGetPixelPos()) { psvOverlayMap.put(view, null); } }
@Override public boolean accept(Product product) { final GeoCoding geoCoding = product.getSceneGeoCoding(); return geoCoding != null && geoCoding.canGetGeoPos() && geoCoding.canGetPixelPos(); } }
private boolean canUseGeoCoordinates(Product product) { final GeoCoding geoCoding = product.getSceneGeoCoding(); return geoCoding != null && geoCoding.canGetPixelPos() && geoCoding.canGetGeoPos(); }
private void addPPL(ProductSceneView view) { GeoCoding geoCoding = view.getProduct().getSceneGeoCoding(); if (geoCoding != null && geoCoding.canGetPixelPos()) { psvOverlayMap.put(view, null); MyPixelPositionListener ppl = new MyPixelPositionListener(view); viewPplMap.put(view, ppl); view.addPixelPositionListener(ppl); } }
private void setEnableState() { ProductNode productNode = lookup.lookup(ProductNode.class); boolean state = false; if (productNode != null) { Product product = productNode.getProduct(); if (product != null && !product.isMultiSize()) { state = product.getSceneGeoCoding() != null && product.getSceneGeoCoding().canGetGeoPos() && product.getSceneGeoCoding().canGetPixelPos(); } } setEnabled(state); }
@Override public boolean accept(Product collocationProduct) { final Product referenceProduct = getReferenceProduct(); if (referenceProduct == collocationProduct || collocationProduct.getSceneGeoCoding() == null) { return false; } if (referenceProduct == null) { return true; } final GeoCoding geoCoding = collocationProduct.getSceneGeoCoding(); if (geoCoding.canGetGeoPos() && geoCoding.canGetPixelPos() && (geoCoding instanceof CrsGeoCoding)) { final GeneralPath[] sourcePath = ProductUtils.createGeoBoundaryPaths(referenceProduct); final GeneralPath[] collocationPath = ProductUtils.createGeoBoundaryPaths(collocationProduct); for (GeneralPath path : sourcePath) { Rectangle bounds = path.getBounds(); for (GeneralPath colPath : collocationPath) { if (colPath.getBounds().intersects(bounds)) { return true; } } } } return false; } }
if (thisGeoCoding != null && thatGeoCoding != null && thisGeoCoding.canGetGeoPos() && thatGeoCoding.canGetPixelPos()) { final Viewport thisViewport = layerCanvas.getViewport(); final Viewport thatViewport = thatView.layerCanvas.getViewport();
void addPlacemarksToProduct(List<Placemark> placemarks, Product targetProduct, boolean allPlacemarks) { final GeoCoding geoCoding = targetProduct.getSceneGeoCoding(); final boolean canGetPixelPos = geoCoding != null && geoCoding.canGetPixelPos(); final boolean isPin = placemarkDescriptor instanceof PinDescriptor;
@Override public void paintOverlay(LayerCanvas canvas, Rendering rendering) { if (geoPosition == null || !geoPosition.isValid()) { return; } final GeoCoding geoCoding = sceneView.getRaster().getGeoCoding(); if (!geoCoding.canGetPixelPos()) { return; } final Product product = sceneView.getRaster().getProduct(); final PixelPos pixelPos = geoCoding.getPixelPos(geoPosition, null); if (!pixelPos.isValid() || !product.containsPixel(pixelPos)) { return; } final Viewport viewport = canvas.getViewport(); drawCursor(rendering.getGraphics(), viewport, pixelPos); }
if (geoCoding == null || !geoCoding.canGetPixelPos()) { Dialogs.showError(dialogTitle, "Failed to import vector data.\n"
final GeoCoding geoCoding = this.product.getSceneGeoCoding(); final boolean hasGeoCoding = geoCoding != null; canGetPixelPos = hasGeoCoding && geoCoding.canGetPixelPos(); canGetGeoPos = hasGeoCoding && geoCoding.canGetGeoPos();