continue; mainComponent = mainComponent.difference(geom);
public void difference(String wktA, String wktB, PrecisionModel pm) throws ParseException { System.out.println("-------------------------------------------"); System.out.println("Running example using Precision Model = " + pm); GeometryFactory fact = new GeometryFactory(pm); WKTReader wktRdr = new WKTReader(fact); Geometry A = wktRdr.read(wktA); Geometry B = wktRdr.read(wktB); Geometry C = A.difference(B); System.out.println("A intersection B = " + C); } }
/** * Computes the set-theoretic difference of two {@link Geometry}s, using enhanced precision. * @param geom0 the first Geometry * @param geom1 the second Geometry, to be subtracted from the first * @return the Geometry representing the set-theoretic difference of the input Geometries. */ public Geometry difference(Geometry geom0, Geometry geom1) { Geometry[] geom = removeCommonBits(geom0, geom1); return computeResultPrecision(geom[0].difference(geom[1])); }
public static Geometry lineStringSelfIntersections(LineString line) { Geometry lineEndPts = getEndPoints(line); Geometry nodedLine = line.union(lineEndPts); Geometry nodedEndPts = getEndPoints(nodedLine); Geometry selfIntersections = nodedEndPts.difference(lineEndPts); return selfIntersections; }
Geometry result = geom0.difference(geom1); return result;
/** * @param a Geometry instance. * @param b Geometry instance * @return the difference between two geometries */ public static Geometry difference(Geometry a,Geometry b) { if(a==null || b==null) { return null; } return a.difference(b); } }
public static Geometry difference(Geometry a, Geometry b) { return a.difference(b); }
static public Geometry difference(Geometry arg0,Geometry arg1) { if (arg0 == null || arg1 == null) return null; Geometry _this = arg0; return _this.difference(arg1); }
static public Geometry difference(Geometry arg0,Geometry arg1) { Geometry _this = arg0; return _this.difference(arg1); }
/** * @param a Geometry instance. * @param b Geometry instance * @return the difference between two geometries */ public static Geometry difference(Geometry a,Geometry b) { if(a==null || b==null) { return null; } return a.difference(b); } }
/** * @param a Geometry instance. * @param b Geometry instance * @return the difference between two geometries */ public static Geometry difference(Geometry a,Geometry b) { if(a==null || b==null) { return null; } return a.difference(b); } }
public void difference(String wktA, String wktB, PrecisionModel pm) throws ParseException { System.out.println("-------------------------------------------"); System.out.println("Running example using Precision Model = " + pm); GeometryFactory fact = new GeometryFactory(pm); WKTReader wktRdr = new WKTReader(fact); Geometry A = wktRdr.read(wktA); Geometry B = wktRdr.read(wktB); Geometry C = A.difference(B); System.out.println("A intersection B = " + C); } }
/** * Computes the set-theoretic difference of two {@link Geometry}s, using enhanced precision. * @param geom0 the first Geometry * @param geom1 the second Geometry, to be subtracted from the first * @return the Geometry representing the set-theoretic difference of the input Geometries. */ public Geometry difference(Geometry geom0, Geometry geom1) { Geometry[] geom = removeCommonBits(geom0, geom1); return computeResultPrecision(geom[0].difference(geom[1])); }
@Override public ROI subtract(ROI roi) { final Geometry geom = getGeometry(roi); if (geom != null) { return new ROIGeometry(theGeom.getGeometry().difference(geom)); } throw new UnsupportedOperationException(UNSUPPORTED_ROI_TYPE); }
/** * Returns the difference of the specified shapes. * * @return the difference */ @Override public JtsGeometry apply() { Geometry result = shapes.get(0).apply().getGeom(); for (int i = 1; i < shapes.size(); i++) { result = result.difference(shapes.get(i).apply().getGeom()); } return CONTEXT.makeShape(result); }
public static GeometryType difference(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { Geometry g1 = getGeometry(geom1); Geometry g2 = getGeometry(geom2); return getGeometryType(g1.difference(g2)); }
@Override public Item item(final QueryContext qc, final InputInfo ii) throws QueryException { return toElement(checkGeo(0, qc).difference(checkGeo(1, qc)), qc); } }
public static Geometry lineStringSelfIntersections(LineString line) { Geometry lineEndPts = getEndPoints(line); Geometry nodedLine = line.union(lineEndPts); Geometry nodedEndPts = getEndPoints(nodedLine); Geometry selfIntersections = nodedEndPts.difference(lineEndPts); return selfIntersections; }
public static GeometryType difference(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { Geometry g1 = getGeometry(geom1); Geometry g2 = getGeometry(geom2); return getGeometryType(g1.difference(g2), geom1.getSrid()); }
public static GeometryType difference(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { Geometry g1 = getGeometry(geom1); Geometry g2 = getGeometry(geom2); return getGeometryType(g1.difference(g2), geom1.getSrid()); }