本文整理了Java中org.locationtech.jts.geom.Polygon.intersects()
方法的一些代码示例,展示了Polygon.intersects()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Polygon.intersects()
方法的具体详情如下:
包路径:org.locationtech.jts.geom.Polygon
类名称:Polygon
方法名:intersects
暂无
代码示例来源:origin: geotools/geotools
public boolean intersects(Geometry g) {
return polygon.intersects(g);
}
代码示例来源:origin: geotools/geotools
|| (useFootprint
&& inclusionGeometry != null
&& !JTS.toGeometry(cropBBox).intersects(inclusionGeometry))) {
if (LOGGER.isLoggable(java.util.logging.Level.FINE)) {
LOGGER.fine(
代码示例来源:origin: geotools/geotools
&& !JTS.toGeometry(cropBBox).intersects(inclusionGeometry)) {
if (LOGGER.isLoggable(java.util.logging.Level.FINE)) {
LOGGER.fine(
代码示例来源:origin: locationtech/jts
public void run(int nPts) {
double size = 100.0;
double armLen = 50.0;
int nArms = 10;
long startTime = System.currentTimeMillis();
Polygon poly = GeometryTestFactory.createSineStar(fact, 0.0, 0.0, size,
armLen, nArms, nPts);
long endTime = System.currentTimeMillis();
long totalTime = endTime - startTime;
String totalTimeStr = totalTime < 10000 ? totalTime + " ms"
: totalTime / 1000.0 + " s";
System.out.println("Sine Star Creation Executed in " + totalTimeStr);
Polygon box = GeometryTestFactory.createBox(fact, 0, 0, 1, 100.0);
startTime = System.currentTimeMillis();
poly.intersects(box);
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
totalTimeStr = totalTime < 10000 ? totalTime + " ms"
: totalTime / 1000.0 + " s";
System.out.println("n Pts: " + nPts + " Executed in " + totalTimeStr);
}
代码示例来源:origin: locationtech/jts
poly.intersects(box);
代码示例来源:origin: locationtech/geogig
@Test
public void touchesFilter() throws Exception {
Envelope bounds = testNode.bounds().get();
bounds.translate(-1 * bounds.getWidth(), 0);
Polygon touching = JTS.toGeometry(bounds);
// just a preflight test
assertTrue(JTS.toGeometry(bounds).intersects(touching));
Touches filter;
Filter pre;
Filter post;
filter = (Touches) toFilter(String.format("Touches(the_geom, %s)", touching));
pre = ff.intersects(ff.property("@bounds"), ff.literal(touching));
post = filter;
assertFilter(filter, pre, post);
}
代码示例来源:origin: geosolutions-it/jai-ext
testPointCS.setX(0, x + 0.5);
testPoint.geometryChanged();
int expected = poly.intersects(testPoint) ? 1 : 0;
assertEquals("Failed test at position " + x + ", " + y + ", " + "expected "
+ expected + " but got " + tile.getSample(x, y, 0), expected,
代码示例来源:origin: locationtech/geowave
new Coordinate(
rangeData[longPosition].getMin() - DOUBLE_TOLERANCE,
rangeData[latPosition].getMin() - DOUBLE_TOLERANCE)}).intersects(geometry);
内容来源于网络,如有侵权,请联系作者删除!