org.geoserver.wms.WMS.pixelToWorld()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(305)

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

WMS.pixelToWorld介绍

[英]Converts a coordinate expressed on the device space back to real world coordinates. Stolen from LiteRenderer but without the need of a Graphics object
[中]将设备空间上表示的坐标转换回真实世界坐标。从LiteRenderer中窃取,但不需要图形对象

代码示例

代码示例来源:origin: org.geoserver/gs-wms

private ReferencedEnvelope getEnvelopeFilter(
      FeatureInfoRequestParameters params, double radius) {
    final int x = params.getX();
    final int y = params.getY();
    final ReferencedEnvelope bbox = params.getRequestedBounds();
    final int width = params.getWidth();
    final int height = params.getHeight();
    Coordinate upperLeft = WMS.pixelToWorld(x - radius, y - radius, bbox, width, height);
    Coordinate lowerRight = WMS.pixelToWorld(x + radius, y + radius, bbox, width, height);

    return new ReferencedEnvelope(
        upperLeft.x,
        lowerRight.x,
        lowerRight.y,
        upperLeft.y,
        bbox.getCoordinateReferenceSystem());
  }
}

代码示例来源:origin: org.geoserver/gs-wms

WMS.pixelToWorld(
    params.getX(),
    params.getY(),

代码示例来源:origin: org.geoserver.community/gs-ows-simulate

WMS.pixelToWorld(
    info.getXPixel(),
    info.getYPixel(),

相关文章