Java Code Examples for org.locationtech.jts.geom.Envelope#isNull()
The following examples show how to use
org.locationtech.jts.geom.Envelope#isNull() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PagesRTreeIndex.java From presto with Apache License 2.0 | 5 votes |
private boolean testReferencePoint(Envelope probeEnvelope, OGCGeometry buildGeometry, int partition) { Envelope buildEnvelope = getEnvelope(buildGeometry); Envelope intersection = buildEnvelope.intersection(probeEnvelope); if (intersection.isNull()) { return false; } Rectangle extent = partitions.get(partition); double x = intersection.getMinX(); double y = intersection.getMinY(); return x >= extent.getXMin() && x < extent.getXMax() && y >= extent.getYMin() && y < extent.getYMax(); }
Example 2
Source File: STRtreeJGT.java From hortonmachine with GNU General Public License v3.0 | 5 votes |
/** * Inserts an item having the given bounds into the tree. */ public void insert( Envelope itemEnv, Object item ) { if (itemEnv.isNull()) { return; } super.insert(itemEnv, item); }
Example 3
Source File: BoundingBoxAggregation.java From geowave with Apache License 2.0 | 5 votes |
@Override public Envelope merge(final Envelope result1, final Envelope result2) { if (result1.isNull()) { return result2; } else if (result2.isNull()) { return result1; } final double minX = Math.min(result1.getMinX(), result2.getMinX()); final double minY = Math.min(result1.getMinY(), result2.getMinY()); final double maxX = Math.max(result1.getMaxX(), result2.getMaxX()); final double maxY = Math.max(result1.getMaxY(), result2.getMaxY()); return new Envelope(minX, maxX, minY, maxY); }
Example 4
Source File: BoundingBoxAggregation.java From geowave with Apache License 2.0 | 5 votes |
protected void aggregate(final Envelope env) { if ((env != null) && !env.isNull()) { minX = Math.min(minX, env.getMinX()); minY = Math.min(minY, env.getMinY()); maxX = Math.max(maxX, env.getMaxX()); maxY = Math.max(maxY, env.getMaxY()); } }