本文整理了Java中org.geoserver.wms.WMS.pixelToWorld()
方法的一些代码示例,展示了WMS.pixelToWorld()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WMS.pixelToWorld()
方法的具体详情如下:
包路径:org.geoserver.wms.WMS
类名称: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(),
内容来源于网络,如有侵权,请联系作者删除!