/** * The function is run periodically by the update manager. * The extending class should provide the getNote method. It is not implemented here * as the requirements for different updaters can be vastly different dependent on the data source. */ @Override protected void runPolling() throws IOException{ LOG.info("Run WFS polling updater with hashcode: {}", this.hashCode()); notesForEdge = HashMultimap.create(); uniqueMatchers = new HashMap<>(); FeatureIterator<SimpleFeature> features = featureSource.getFeatures(query).features(); while ( features.hasNext()){ SimpleFeature feature = features.next(); if (feature.getDefaultGeometry() == null) continue; Alert alert = getNote(feature); if (alert == null) continue; Geometry geom = (Geometry) feature.getDefaultGeometry(); Geometry searchArea = geom.buffer(SEARCH_RADIUS_DEG); Collection<Edge> edges = graph.streetIndex.getEdgesForEnvelope(searchArea.getEnvelopeInternal()); for(Edge edge: edges){ if (edge instanceof StreetEdge && !searchArea.disjoint(edge.getGeometry())) { addNote(edge, alert, NOTE_MATCHER); } } } updaterManager.execute(new WFSGraphWriter()); }
static public boolean disjoint(Geometry arg0,Geometry arg1) { if (arg0 == null || arg1 == null) return false; Geometry _this = arg0; return _this.disjoint(arg1); }
static public boolean disjoint(Geometry arg0,Geometry arg1) { Geometry _this = arg0; return _this.disjoint(arg1); }
/** * @param geom first geometry * @param g second geometry * @return <code>true</code> if the first geometry and the second are disjoint */ public static boolean disjoint(Geometry geom, Geometry g) { if (geom == null || g == null) return false; return geom.disjoint(g); }
/** * @param geom first geometry * @param g second geometry * @return <code>true</code> if the first geometry and the second are not disjoint */ public static boolean bbox(Geometry geom, Geometry g) { if (geom == null || g == null) return false; return !geom.disjoint(g); }
public boolean disjoint(Geometry g) { return geometry.disjoint(g); }
/** * Return true if the two Geometries are disjoint * * @param a Geometry Geometry. * @param b Geometry instance * @return true if the two Geometries are disjoint */ public static Boolean geomDisjoint(Geometry a, Geometry b) { if(a==null || b==null) { return null; } return a.disjoint(b); } }
@Override public boolean matches(Geometry geo) { return geo.disjoint(queryGeo); } }
/** * Return true if the two Geometries are disjoint * * @param a Geometry Geometry. * @param b Geometry instance * @return true if the two Geometries are disjoint */ public static Boolean geomDisjoint(Geometry a, Geometry b) { if(a==null || b==null) { return null; } return a.disjoint(b); } }
/** * Return true if the two Geometries are disjoint * * @param a Geometry Geometry. * @param b Geometry instance * @return true if the two Geometries are disjoint */ public static Boolean geomDisjoint(Geometry a, Geometry b) { if(a==null || b==null) { return null; } return a.disjoint(b); } }
@Override public boolean isDisjoint( Geometry geometry ) { JTSGeometryPair jtsGeoms = JTSGeometryPair.createCompatiblePair( this, geometry ); return jtsGeoms.first.disjoint( jtsGeoms.second ); }
public static Boolean disjoint(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { Geometry g1 = getGeometry(geom1); Geometry g2 = getGeometry(geom2); return g1.disjoint(g2); }
public static Boolean disjoint(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { Geometry g1 = getGeometry(geom1); Geometry g2 = getGeometry(geom2); return g1.disjoint(g2); }
public static Boolean disjoint(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { Geometry g1 = getGeometry(geom1); Geometry g2 = getGeometry(geom2); return g1.disjoint(g2); }
@Override public Item item(final QueryContext qc, final InputInfo ii) throws QueryException { return Bln.get(checkGeo(0, qc).disjoint(checkGeo(1, qc))); } }
@Override protected boolean basicEvaluate(Geometry left, Geometry right) { Envelope envLeft = left.getEnvelopeInternal(); Envelope envRight = right.getEnvelopeInternal(); if(envRight.intersects(envLeft)) return left.disjoint(right); return true; }
boolean disjoints = ((Geometry)firstFeature.getDefaultGeometry()).disjoint((Geometry)secondFeature.getDefaultGeometry());
public boolean evaluate(Object feature) { if (feature instanceof Feature && !validate((Feature)feature)) return false; Geometry left = getLeftGeometry(feature); Geometry right = getRightGeometry(feature); Envelope envLeft = left.getEnvelopeInternal(); Envelope envRight = right.getEnvelopeInternal(); if(envRight.intersects(envLeft)) return left.disjoint(right); return true; }
protected SpatialRelation relate(Geometry oGeom) { //see http://docs.geotools.org/latest/userguide/library/jts/dim9.html#preparedgeometry if (oGeom instanceof com.vividsolutions.jts.geom.Point) { if (preparedGeometry != null) return preparedGeometry.disjoint(oGeom) ? SpatialRelation.DISJOINT : SpatialRelation.CONTAINS; return geom.disjoint(oGeom) ? SpatialRelation.DISJOINT : SpatialRelation.CONTAINS; } if (preparedGeometry == null) return intersectionMatrixToSpatialRelation(geom.relate(oGeom)); else if (preparedGeometry.covers(oGeom)) return SpatialRelation.CONTAINS; else if (preparedGeometry.coveredBy(oGeom)) return SpatialRelation.WITHIN; else if (preparedGeometry.intersects(oGeom)) return SpatialRelation.INTERSECTS; return SpatialRelation.DISJOINT; }
protected SpatialRelation relate(Geometry oGeom) { //see http://docs.geotools.org/latest/userguide/library/jts/dim9.html#preparedgeometry if (oGeom instanceof com.vividsolutions.jts.geom.Point) { if (preparedGeometry != null) return preparedGeometry.disjoint(oGeom) ? SpatialRelation.DISJOINT : SpatialRelation.CONTAINS; return geom.disjoint(oGeom) ? SpatialRelation.DISJOINT : SpatialRelation.CONTAINS; } if (preparedGeometry == null) return intersectionMatrixToSpatialRelation(geom.relate(oGeom)); else if (preparedGeometry.covers(oGeom)) return SpatialRelation.CONTAINS; else if (preparedGeometry.coveredBy(oGeom)) return SpatialRelation.WITHIN; else if (preparedGeometry.intersects(oGeom)) return SpatialRelation.INTERSECTS; return SpatialRelation.DISJOINT; }