/** * 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 an approximate buffer around this object. */ public final Geometry getBuffer(final double distance) { com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsBuffer = jtsGeom.buffer(distance); return JTSUtils.jtsToGo1(jtsBuffer, getCoordinateReferenceSystem()); }
/** * Returns the geometric convex hull of this geometry. */ public final Geometry getConvexHull() { com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsHull = jtsGeom.convexHull(); return JTSUtils.jtsToGo1(jtsHull, getCoordinateReferenceSystem()); }
/** * Returns an approximate buffer around this object. */ public final Geometry getBuffer(final double distance) { com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsBuffer = jtsGeom.buffer(distance); return JTSUtils.jtsToGo1(jtsBuffer, getCoordinateReferenceSystem()); }
/** * Returns the geometric convex hull of this geometry. */ public final Geometry getConvexHull() { com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsHull = jtsGeom.convexHull(); return JTSUtils.jtsToGo1(jtsHull, 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()); }
public TransfiniteSet union(TransfiniteSet pointSet) { com.vividsolutions.jts.geom.Geometry jtsGeom1 = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsGeom2 = ((JTSGeometry) pointSet).getJTSGeometry(); return JTSUtils.jtsToGo1(JTSUtils.union(jtsGeom1, jtsGeom2), getCoordinateReferenceSystem()); }
public TransfiniteSet symmetricDifference(TransfiniteSet pointSet) { com.vividsolutions.jts.geom.Geometry jtsGeom1 = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsGeom2 = ((JTSGeometry) pointSet).getJTSGeometry(); return JTSUtils.jtsToGo1(JTSUtils.symmetricDifference(jtsGeom1, jtsGeom2), getCoordinateReferenceSystem()); }
public TransfiniteSet intersection(TransfiniteSet pointSet) { com.vividsolutions.jts.geom.Geometry jtsGeom1 = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsGeom2 = ((JTSGeometry) pointSet).getJTSGeometry(); return JTSUtils.jtsToGo1(JTSUtils.intersection(jtsGeom1, jtsGeom2), getCoordinateReferenceSystem()); }
public TransfiniteSet symmetricDifference(TransfiniteSet pointSet) { com.vividsolutions.jts.geom.Geometry jtsGeom1 = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsGeom2 = ((JTSGeometry) pointSet).getJTSGeometry(); return JTSUtils.jtsToGo1(JTSUtils.symmetricDifference(jtsGeom1, jtsGeom2), getCoordinateReferenceSystem()); }
public TransfiniteSet union(TransfiniteSet pointSet) { com.vividsolutions.jts.geom.Geometry jtsGeom1 = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsGeom2 = ((JTSGeometry) pointSet).getJTSGeometry(); return JTSUtils.jtsToGo1(JTSUtils.union(jtsGeom1, jtsGeom2), getCoordinateReferenceSystem()); }
public TransfiniteSet intersection(TransfiniteSet pointSet) { com.vividsolutions.jts.geom.Geometry jtsGeom1 = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsGeom2 = ((JTSGeometry) pointSet).getJTSGeometry(); return JTSUtils.jtsToGo1(JTSUtils.intersection(jtsGeom1, jtsGeom2), getCoordinateReferenceSystem()); }
public TransfiniteSet difference(TransfiniteSet pointSet) { com.vividsolutions.jts.geom.Geometry jtsGeom1 = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsGeom2 = ((JTSGeometry) pointSet).getJTSGeometry(); return JTSUtils.jtsToGo1(JTSUtils.difference(jtsGeom1, jtsGeom2), getCoordinateReferenceSystem()); }
public TransfiniteSet difference(TransfiniteSet pointSet) { com.vividsolutions.jts.geom.Geometry jtsGeom1 = getJTSGeometry(); com.vividsolutions.jts.geom.Geometry jtsGeom2 = ((JTSGeometry) pointSet).getJTSGeometry(); return JTSUtils.jtsToGo1(JTSUtils.difference(jtsGeom1, jtsGeom2), getCoordinateReferenceSystem()); }
for (int i=0; i<n; i++) { elements.add(jtsToGo1(jtsCollection.getGeometryN(i), crs));
MultiPrimitive result = gf.createMultiPrimitive(); for (int i=0; i<n; i++) { result.getElements().add(jtsToGo1(jtsCollection.getGeometryN(i), crs));
/** * Creates a new Geometry out of this one by invoking the given transform * on each control point of this geometry. */ public final Geometry transform(final CoordinateReferenceSystem newCRS, final MathTransform transform) throws TransformException { // Get the JTS geometry com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry(); // Make a copy since we're going to modify its values jtsGeom = (com.vividsolutions.jts.geom.Geometry) jtsGeom.clone(); // Get a local variable that has the src CRS CoordinateReferenceSystem oldCRS = getCoordinateReferenceSystem(); // Do the actual work of transforming the vertices jtsGeom.apply(new MathTransformFilter(transform, oldCRS, newCRS)); // Then convert back to a GO1 geometry return JTSUtils.jtsToGo1(jtsGeom, getCoordinateReferenceSystem()); }
/** * Creates a new Geometry out of this one by invoking the given transform * on each control point of this geometry. */ public final Geometry transform(final CoordinateReferenceSystem newCRS, final MathTransform transform) throws TransformException { // Get the JTS geometry com.vividsolutions.jts.geom.Geometry jtsGeom = getJTSGeometry(); // Make a copy since we're going to modify its values jtsGeom = (com.vividsolutions.jts.geom.Geometry) jtsGeom.clone(); // Get a local variable that has the src CRS CoordinateReferenceSystem oldCRS = getCoordinateReferenceSystem(); // Do the actual work of transforming the vertices jtsGeom.apply(new MathTransformFilter(transform, oldCRS, newCRS)); // Then convert back to a GO1 geometry return JTSUtils.jtsToGo1(jtsGeom, getCoordinateReferenceSystem()); }
@Override public Object visit(Intersects filter, Object data) { Envelope2D envelope = (Envelope2D) data; Geometry polygon= ((Geometry)((Literal)filter.getExpression2()).getValue()); org.opengis.geometry.Geometry polygon2 = JTSUtils.jtsToGo1(polygon, envelope.getCoordinateReferenceSystem()); envelope.setBounds(new Envelope2D(polygon2.getEnvelope())); return super.visit(filter, data); }