public boolean overlaps(OGCGeometry another) { if (another.geometryType() == OGCConcreteGeometryCollection.TYPE) { // TODO throw new UnsupportedOperationException(); } com.esri.core.geometry.Geometry geom1 = getEsriGeometry(); com.esri.core.geometry.Geometry geom2 = another.getEsriGeometry(); return com.esri.core.geometry.GeometryEngine.overlaps(geom1, geom2, getEsriSpatialReference()); }
public boolean overlaps(OGCGeometry another) { if (another.geometryType() == OGCConcreteGeometryCollection.TYPE) { // TODO throw new UnsupportedOperationException(); } com.esri.core.geometry.Geometry geom1 = getEsriGeometry(); com.esri.core.geometry.Geometry geom2 = another.getEsriGeometry(); return com.esri.core.geometry.GeometryEngine.overlaps(geom1, geom2, getEsriSpatialReference()); }
/** Returns {@code geom1} overlaps {@code geom2}. */ public static boolean ST_Overlaps(Geom geom1, Geom geom2) { return GeometryEngine.overlaps(geom1.g(), geom2.g(), geom1.sr()); }
/** Returns {@code geom1} overlaps {@code geom2}. */ public static boolean ST_Overlaps(Geom geom1, Geom geom2) { return GeometryEngine.overlaps(geom1.g(), geom2.g(), geom1.sr()); }
@Override public BaseRoad next() throws SourceException { BaseRoad road = null; do { if (!iterator.hasNext()) { return null; } Road _road = iterator.next(); if (_road.id() % 2 == 1) { continue; } road = _road.base(); } while (road == null || exclusions != null && exclusions.contains(road.type()) || polygon != null && !GeometryEngine.contains(polygon, road.geometry(), SpatialReference.create(4326)) && !GeometryEngine.overlaps(polygon, road.geometry(), SpatialReference.create(4326))); return road; } };
@Override public BaseRoad next() throws SourceException { if (!isOpen()) { throw new SourceException("File is closed or invalid."); } try { BaseRoad road = null; do { road = (BaseRoad) reader.readObject(); if (road == null) { return null; } } while (exclusions != null && exclusions.contains(road.type()) || polygon != null && !GeometryEngine.contains(polygon, road.geometry(), SpatialReference.create(4326)) && !GeometryEngine.overlaps(polygon, road.geometry(), SpatialReference.create(4326))); return road; } catch (ClassNotFoundException e) { throw new SourceException("File is corrupted, read object is not a road."); } catch (IOException e) { throw new SourceException("Reading file failed: " + e.getMessage()); } } }