org.esa.snap.core.datamodel.GeoCoding.canGetPixelPos()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中org.esa.snap.core.datamodel.GeoCoding.canGetPixelPos()方法的一些代码示例,展示了GeoCoding.canGetPixelPos()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GeoCoding.canGetPixelPos()方法的具体详情如下:
包路径:org.esa.snap.core.datamodel.GeoCoding
类名称:GeoCoding
方法名:canGetPixelPos

GeoCoding.canGetPixelPos介绍

暂无

代码示例

代码示例来源:origin: senbox-org/snap-desktop

private void addPPL(ProductSceneView view) {
  GeoCoding geoCoding = view.getProduct().getSceneGeoCoding();
  if (geoCoding != null && geoCoding.canGetPixelPos()) {
    psvOverlayMap.put(view, null);
  }
}

代码示例来源:origin: senbox-org/snap-desktop

@Override
  public boolean accept(Product product) {
    final GeoCoding geoCoding = product.getSceneGeoCoding();
    return geoCoding != null && geoCoding.canGetGeoPos() && geoCoding.canGetPixelPos();
  }
}

代码示例来源:origin: senbox-org/snap-desktop

private boolean canUseGeoCoordinates(Product product) {
  final GeoCoding geoCoding = product.getSceneGeoCoding();
  return geoCoding != null && geoCoding.canGetPixelPos() && geoCoding.canGetGeoPos();
}

代码示例来源:origin: senbox-org/snap-desktop

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);
  }
}

代码示例来源:origin: senbox-org/snap-desktop

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);
}

代码示例来源:origin: senbox-org/snap-desktop

@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;
  }
}

代码示例来源:origin: senbox-org/snap-desktop

if (thisGeoCoding != null && thatGeoCoding != null && thisGeoCoding.canGetGeoPos() && thatGeoCoding.canGetPixelPos()) {
  final Viewport thisViewport = layerCanvas.getViewport();
  final Viewport thatViewport = thatView.layerCanvas.getViewport();

代码示例来源:origin: senbox-org/snap-desktop

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;

代码示例来源:origin: senbox-org/snap-desktop

@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);
}

代码示例来源:origin: senbox-org/snap-desktop

if (geoCoding == null || !geoCoding.canGetPixelPos()) {
  Dialogs.showError(dialogTitle, "Failed to import vector data.\n"

代码示例来源:origin: senbox-org/snap-desktop

final GeoCoding geoCoding = this.product.getSceneGeoCoding();
final boolean hasGeoCoding = geoCoding != null;
canGetPixelPos = hasGeoCoding && geoCoding.canGetPixelPos();
canGetGeoPos = hasGeoCoding && geoCoding.canGetGeoPos();

相关文章