static public Geometry envelope(Geometry arg0) { if (arg0 == null) return null; Geometry _this = arg0; return _this.getEnvelope(); }
public ClippingFeatureIterator(SimpleFeatureIterator delegate, Geometry clip, SimpleFeatureType schema) { this.delegate = delegate; // can we use the fast clipper? if(clip.getEnvelope().equals(clip)) { this.clipper = new GeometryClipper(clip.getEnvelopeInternal()); } else { this.clip = clip; } fb = new SimpleFeatureBuilder(schema); }
/** * @param geometry Geometry instance * @return Geometry envelope */ public static Geometry getEnvelope(Geometry geometry) { if(geometry==null) { return null; } return geometry.getEnvelope(); } }
/** * @param geometry Geometry instance * @return Geometry envelope */ public static Geometry getEnvelope(Geometry geometry) { if(geometry==null) { return null; } return geometry.getEnvelope(); } }
/** * @param geometry Geometry instance * @return Geometry envelope */ public static Geometry getEnvelope(Geometry geometry) { if(geometry==null) { return null; } return geometry.getEnvelope(); } }
static public Geometry envelope(Geometry arg0) { Geometry _this = arg0; return _this.getEnvelope(); }
@Override public Geometry getBoundingBox() { return (this.geometry != null) ? geometry.getEnvelope() : null; }
private void addGeometry(Geometry geometry, List<Polygon> result) { if (geometry instanceof MultiPolygon) { addMultiGeometry((MultiPolygon) geometry, result); } else { result.add((Polygon) (geometry.getEnvelope())); } } }
@Override public boolean matches(Geometry geo) { return geo.getEnvelope().intersects(queryGeo); } }
@Override public boolean matches(Geometry geo) { return geo.getEnvelope().within(queryGeo); } }
public static boolean boundingBoxIntersects( GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { Geometry g1 = getGeometry(geom1); Geometry g2 = getGeometry(geom2); return g1.getEnvelope().intersects(g2.getEnvelope()); }
public static boolean boundingBoxIntersects( GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { Geometry g1 = getGeometry(geom1); Geometry g2 = getGeometry(geom2); return g1.getEnvelope().intersects(g2.getEnvelope()); }
public static boolean boundingBoxIntersects( GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { Geometry g1 = getGeometry(geom1); Geometry g2 = getGeometry(geom2); return g1.getEnvelope().intersects(g2.getEnvelope()); }
@Override public Item item(final QueryContext qc, final InputInfo ii) throws QueryException { return toElement(checkGeo(0, qc).getEnvelope(), qc); } }
protected static List<Geometry> getAllEnvelopeGeometries(Geometry geom) { List<Geometry> geometries = new ArrayList<>(); if (geom.getNumGeometries() > 1) for (int geoIdx = 0; geoIdx < geom.getNumGeometries(); geoIdx++) geometries.addAll(getAllEnvelopeGeometries(geom.getGeometryN(geoIdx))); else geometries.add(geom.getEnvelope()); return geometries; }
/** * Returns a Geometry that represents the minimum bounding region of this * geometry. */ public final Geometry getMbRegion() { com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry(); return JTSUtils.jtsToGo1(jtsGeom.getEnvelope(), getCoordinateReferenceSystem()); }
/** * Returns a Geometry that represents the minimum bounding region of this * geometry. */ public final Geometry getMbRegion() { com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry(); return JTSUtils.jtsToGo1(jtsGeom.getEnvelope(), getCoordinateReferenceSystem()); }
@Override public DataByteArray exec(Tuple input) throws IOException { Geometry geom = null; try { Object v = input.get(0); geom = GEOMETRY_PARSER.parseGeom(v); Geometry envelope = geom.getEnvelope(); return new DataByteArray(WKB_WRITER.write(envelope)); } catch (ExecException ee) { throw new GeoException(geom, ee); } }
private Geometry getGeometry4BBOX(EnvelopeDocument xbBbox) throws OwsExceptionReport { EnvelopeType xbEnvelope = xbBbox.getEnvelope(); // parse srid; if not set, throw exception! int srid = SosHelper.parseSrsName(xbEnvelope.getSrsName()); String lower = xbEnvelope.getLowerCorner().getStringValue(); String upper = xbEnvelope.getUpperCorner().getStringValue(); String geomWKT = String.format("MULTIPOINT(%s, %s)", lower, upper); return JTSHelper.createGeometryFromWKT(geomWKT, srid).getEnvelope(); }
private Geometry getGeometry4BBOX(EnvelopeDocument xbBbox) throws DecodingException { EnvelopeType xbEnvelope = xbBbox.getEnvelope(); // parse srid; if not set, throw exception! int srid = CRSHelper.parseSrsName(xbEnvelope.getSrsName()); String lower = xbEnvelope.getLowerCorner().getStringValue(); String upper = xbEnvelope.getUpperCorner().getStringValue(); String geomWKT = String.format("MULTIPOINT(%s, %s)", lower, upper); try { return JTSHelper.createGeometryFromWKT(geomWKT, srid).getEnvelope(); } catch (ParseException ex) { throw new DecodingException(ex); } }