本文整理了Java中com.vividsolutions.jts.geom.Polygon.getEnvelope()
方法的一些代码示例,展示了Polygon.getEnvelope()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Polygon.getEnvelope()
方法的具体详情如下:
包路径:com.vividsolutions.jts.geom.Polygon
类名称:Polygon
方法名:getEnvelope
暂无
代码示例来源:origin: org.geotools/gt-render
public Geometry getEnvelope() {
return polygon.getEnvelope();
}
代码示例来源:origin: kiselev-dv/gazetteer
private static void stripe(Polygon p, List<Polygon> result) {
Polygon bbox = (Polygon) p.getEnvelope();
Point centroid = bbox.getCentroid();
double snapX = fileNameKeyGenerator.roundX(centroid);
double minX = p.getEnvelopeInternal().getMinX();
double maxX = p.getEnvelopeInternal().getMaxX();
if(snapX > minX && snapX < maxX) {
List<Polygon> splitPolygon = GeometryUtils.splitPolygon(p,
factory.createLineString(new Coordinate[]{new Coordinate(snapX, 89.0), new Coordinate(snapX, -89.0)}));
for(Polygon cp : splitPolygon) {
stripe(cp, result);
}
}
else {
result.add(p);
}
}
代码示例来源:origin: net.disy.wps/wps-api
@ProcessMethod
@OutputParameter(
//
id = "bboxPolygon",
//
title = "Polygon to calculate BBox",
//
description = "Polygon to calculate BBox")
public Geometry bboxPolygon(@InputParameter(
//
id = "echo",
//
title = "input polygon in JS form",
//
description = "Description of the input polygon in JS form") Polygon input) {
return input.getEnvelope();
}
代码示例来源:origin: kiselev-dv/gazetteer
Point centroid = p.getEnvelope().getCentroid();
String n = getFilePrefix(centroid.getX(), centroid.getY());
featureWithoutGeometry.put(GeoJsonWriter.GEOMETRY, GeoJsonWriter.geometryToJSON(p));
内容来源于网络,如有侵权,请联系作者删除!