本文整理了Java中org.locationtech.jts.geom.Polygon.intersection()
方法的一些代码示例,展示了Polygon.intersection()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Polygon.intersection()
方法的具体详情如下:
包路径:org.locationtech.jts.geom.Polygon
类名称:Polygon
方法名:intersection
暂无
代码示例来源:origin: geotools/geotools
public Geometry intersection(Geometry other) {
return polygon.intersection(other);
}
代码示例来源:origin: geotools/geotools
});
Polygon p = gf.createPolygon(ring, null);
Geometry intersection = p.intersection(ls);
if (!intersection.isEmpty()) {
if (intersection instanceof LineString) {
代码示例来源:origin: geotools/geotools
JTS.toGeometry((Envelope) coverageEnvelope).intersection(geometry);
geometryEnvelope =
new ReferencedEnvelope(geometry.getEnvelopeInternal(), crs);
mask = JTS.toGeometry((Envelope) coverageEnvelope).intersection(mask);
maskEnvelope = new ReferencedEnvelope(mask.getEnvelopeInternal(), crs);
代码示例来源:origin: geotools/geotools
geometry = JTS.toGeometry((Envelope) coverageEnvelope).intersection(geometry);
geometryEnvelope =
new ReferencedEnvelope(
代码示例来源:origin: orbisgis/h2gis
/**
* This function compute the visibility polygon
* @param viewPoint Point instance, isovist location
* @param lineSegments Occlusion segments. Geometry collection or polygon or linestring
* @param maxDistance Maximum distance of view from viewPoint (spatial ref units)
* @param radBegin Constraint view angle start in radian
* @param radSize Constraint view angle size in radian
* @return The visibility polygon
* @throws SQLException In case of wrong parameters
*/
public static Geometry isovist(Geometry viewPoint, Geometry lineSegments, double maxDistance, double radBegin, double radSize) throws SQLException {
if(radSize <=0 ) {
throw new SQLException("Angle size must be superior than 0 rad");
}
Geometry isopoly = isovist(viewPoint, lineSegments, maxDistance);
// Intersects with view constrain
GeometricShapeFactory geometricShapeFactory = new GeometricShapeFactory();
geometricShapeFactory.setCentre(viewPoint.getCoordinate());
geometricShapeFactory.setWidth(maxDistance * 2);
geometricShapeFactory.setHeight(maxDistance * 2);
return geometricShapeFactory.createArcPolygon(radBegin, radSize).intersection(isopoly);
}
}
内容来源于网络,如有侵权,请联系作者删除!