本文整理了Java中org.locationtech.jts.geom.Polygon.getArea()
方法的一些代码示例,展示了Polygon.getArea()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Polygon.getArea()
方法的具体详情如下:
包路径:org.locationtech.jts.geom.Polygon
类名称:Polygon
方法名:getArea
[英]Returns the area of this Polygon
[中]返回此Polygon
的面积
代码示例来源:origin: geotools/geotools
public double getArea() {
return polygon.getArea();
}
代码示例来源:origin: geotools/geotools
private ReferencedEnvelope reduceEnvelope(
ReferencedEnvelope envelope, ProjectionHandler handler)
throws TransformException, FactoryException {
Polygon polygon = JTS.toGeometry(envelope);
Geometry geom = handler.preProcess(polygon);
if (geom == null) {
return null;
}
PolygonExtractor pe = new PolygonExtractor();
Polygon largest = null;
for (Polygon p : pe.getPolygons(geom)) {
if (largest == null || largest.getArea() > p.getArea()) {
largest = p;
}
}
ReferencedEnvelope reduced =
new ReferencedEnvelope(
largest.getEnvelopeInternal(), envelope.getCoordinateReferenceSystem());
return reduced;
}
代码示例来源:origin: geotools/geotools
for (int t = 0; t < clippedPolys.size(); t++) {
cpoly = clippedPolys.get(t);
final double area = cpoly.getArea();
if (area > maxSize) {
maxPoly = cpoly;
代码示例来源:origin: geotools/geotools
if (ring.getFactory().createPolygon(ring).getArea() > 0) {
return ring;
} else {
代码示例来源:origin: geotools/geotools
double polygonArea = polygon.getArea();
if (polygonArea > area) {
polygonIndex = index;
内容来源于网络,如有侵权,请联系作者删除!