本文整理了Java中org.locationtech.jts.geom.Polygon.union()
方法的一些代码示例,展示了Polygon.union()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Polygon.union()
方法的具体详情如下:
包路径:org.locationtech.jts.geom.Polygon
类名称:Polygon
方法名:union
暂无
代码示例来源:origin: geotools/geotools
public Geometry union() {
return polygon.union();
}
代码示例来源:origin: geotools/geotools
public Geometry union(Geometry other) {
return polygon.union(other);
}
代码示例来源:origin: locationtech/jts
public Geometry[] generateGeometryStar(double angle1, double angle2) {
RotatedRectangleFactory rrFact = new RotatedRectangleFactory();
Polygon rr1 = rrFact.createRectangle(100, 20, angle1);
Polygon rr2 = rrFact.createRectangle(100, 20, angle2);
// this line can be used to test for the presence of noding failures for
// non-tricky cases
// Geometry star = rr2;
Geometry star = rr1.union(rr2);
return new Geometry[] { star, rr1 };
}
代码示例来源:origin: locationtech/jts
public Geometry[] generateGeometryAccum(double angle1, double angle2) {
RotatedRectangleFactory rrFact = new RotatedRectangleFactory();
double basex = angle2 * MAX_DISPLACEMENT - (MAX_DISPLACEMENT / 2);
Coordinate base = new Coordinate(basex, basex);
Polygon rr1 = rrFact.createRectangle(100, 20, angle1, base);
// limit size of accumulated star
geomCount++;
if (geomCount >= BATCH_SIZE)
geomCount = 0;
if (geomCount == 0)
baseAccum = null;
if (baseAccum == null)
baseAccum = rr1;
else {
// this line can be used to test for the presence of noding failures for
// non-tricky cases
// Geometry star = rr2;
baseAccum = rr1.union(baseAccum);
}
return new Geometry[] { baseAccum, rr1 };
}
内容来源于网络,如有侵权,请联系作者删除!