public static boolean contains(OGCGeometry ogcGeometry, Envelope envelope) { GeometryCursor cursor = ogcGeometry.getEsriGeometryCursor(); while (true) { Geometry geometry = cursor.next(); if (geometry == null) { return false; } if (GeometryEngine.contains(geometry, envelope, null)) { return true; } } }
public static boolean contains(OGCGeometry ogcGeometry, Envelope envelope) { GeometryCursor cursor = ogcGeometry.getEsriGeometryCursor(); while (true) { Geometry geometry = cursor.next(); if (geometry == null) { return false; } if (GeometryEngine.contains(geometry, envelope, null)) { return true; } } }
public static boolean contains(OGCGeometry ogcGeometry, Envelope envelope) { GeometryCursor cursor = ogcGeometry.getEsriGeometryCursor(); while (true) { Geometry geometry = cursor.next(); if (geometry == null) { return false; } if (GeometryEngine.contains(geometry, envelope, null)) { return true; } } }
public static boolean contains(OGCGeometry ogcGeometry, Envelope envelope) { GeometryCursor cursor = ogcGeometry.getEsriGeometryCursor(); while (true) { Geometry geometry = cursor.next(); if (geometry == null) { return false; } if (GeometryEngine.contains(geometry, envelope, null)) { return true; } } }
/** Returns whether {@code geom1} contains {@code geom2}. */ public static boolean ST_Contains(Geom geom1, Geom geom2) { return GeometryEngine.contains(geom1.g(), geom2.g(), geom1.sr()); }
/** Returns whether {@code geom1} contains {@code geom2}. */ public static boolean ST_Contains(Geom geom1, Geom geom2) { return GeometryEngine.contains(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; } };
public boolean contains(OGCGeometry another) { if (another.geometryType() == OGCConcreteGeometryCollection.TYPE) { return new OGCConcreteGeometryCollection(this, esriSR).contains(another); } com.esri.core.geometry.Geometry geom1 = getEsriGeometry(); com.esri.core.geometry.Geometry geom2 = another.getEsriGeometry(); return com.esri.core.geometry.GeometryEngine.contains(geom1, geom2, getEsriSpatialReference()); }
public boolean contains(OGCGeometry another) { if (another.geometryType() == OGCConcreteGeometryCollection.TYPE) { return new OGCConcreteGeometryCollection(this, esriSR).contains(another); } com.esri.core.geometry.Geometry geom1 = getEsriGeometry(); com.esri.core.geometry.Geometry geom2 = another.getEsriGeometry(); return com.esri.core.geometry.GeometryEngine.contains(geom1, geom2, getEsriSpatialReference()); }
@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()); } } }
/** Returns whether {@code geom1} contains {@code geom2} but does not * intersect its boundary. */ public static boolean ST_ContainsProperly(Geom geom1, Geom geom2) { return GeometryEngine.contains(geom1.g(), geom2.g(), geom1.sr()) && !GeometryEngine.crosses(geom1.g(), geom2.g(), geom1.sr()); }
/** Returns whether {@code geom1} contains {@code geom2} but does not * intersect its boundary. */ public static boolean ST_ContainsProperly(Geom geom1, Geom geom2) { return GeometryEngine.contains(geom1.g(), geom2.g(), geom1.sr()) && !GeometryEngine.crosses(geom1.g(), geom2.g(), geom1.sr()); }