/** * Sets the geometry contained in this lite shape. Convenient to reuse this object instead of * creating it again and again during rendering * * @param g * @throws TransformException * @throws FactoryException */ public void setGeometry(Geometry g) throws TransformException, FactoryException { if (g != null) { this.geometry = getGeometryFactory().createGeometry(g); transformGeometry(geometry); } }
private final Geometry cloneGeometryLCS(Point geom) { return getGeometryFactory().createPoint(new LiteCoordinateSequence((LiteCoordinateSequence) geom.getCoordinateSequence())); } private final Geometry cloneGeometryLCS(LineString geom)
private final Geometry cloneGeometry(Point geom) { return getGeometryFactory().createPoint( new LiteCoordinateSequence( (Coordinate[]) geom.getCoordinates() ) ); } private final Geometry cloneGeometry(LineString geom)
/** * Sets the geometry contained in this lite shape. Convenient to reuse this * object instead of creating it again and again during rendering * * @param g * @throws TransformException * @throws FactoryException */ public void setGeometry(Geometry g) throws TransformException, FactoryException { if (g != null) { this.geometry = getGeometryFactory().createGeometry(g); transformGeometry(geometry); } }
/** * Sets the geometry contained in this lite shape. Convenient to reuse this * object instead of creating it again and again during rendering * * @param g * @throws TransformException * @throws FactoryException */ public void setGeometry(Geometry g) throws TransformException, FactoryException { if (g != null) { this.geometry = getGeometryFactory().createGeometry(g); transformGeometry(geometry); } }
private final Geometry cloneGeometry(LineString geom) { return getGeometryFactory().createLineString( new LiteCoordinateSequence( (Coordinate[]) geom.getCoordinates() ) ); } private final Geometry cloneGeometry(LinearRing geom)
private final Geometry cloneGeometryLCS(GeometryCollection geom) { if (geom.getNumGeometries() == 0) { Geometry[] gs = new Geometry[0]; return getGeometryFactory().createGeometryCollection(gs); } ArrayList gs = new ArrayList(geom.getNumGeometries() ); int n =geom.getNumGeometries(); for (int t=0;t<n;t++) { gs.add(t, cloneGeometryLCS(geom.getGeometryN(t)) ); } return getGeometryFactory().buildGeometry(gs); }
private final Geometry cloneGeometry(GeometryCollection geom) { if (geom.getNumGeometries() == 0) { Geometry[] gs = new Geometry[0]; return getGeometryFactory().createGeometryCollection(gs); } ArrayList gs = new ArrayList(geom.getNumGeometries() ); int n =geom.getNumGeometries(); for (int t=0;t<n;t++) { gs.add( cloneGeometry(geom.getGeometryN(t)) ); } return getGeometryFactory().buildGeometry(gs); }
private final Geometry cloneGeometryLCS(LineString geom) { return getGeometryFactory().createLineString(new LiteCoordinateSequence((LiteCoordinateSequence) geom.getCoordinateSequence())); } private final Geometry cloneGeometryLCS(LinearRing geom)
private final Geometry cloneGeometryLCS(LinearRing geom) { return getGeometryFactory().createLinearRing(new LiteCoordinateSequence((LiteCoordinateSequence) geom.getCoordinateSequence())); }
private final Geometry cloneGeometry(LinearRing geom) { return getGeometryFactory().createLinearRing( new LiteCoordinateSequence( (Coordinate[]) geom.getCoordinates() ) ); }
/** * changes this to a new CSF -- more efficient than the JTS way * @param geom */ private final Geometry cloneGeometry(Polygon geom) { LinearRing lr = (LinearRing) cloneGeometry((LinearRing) geom.getExteriorRing()); LinearRing[] rings = new LinearRing[geom.getNumInteriorRing()]; for (int t=0;t<rings.length;t++) { rings[t] = (LinearRing) cloneGeometry((LinearRing) geom.getInteriorRingN(t)); } return getGeometryFactory().createPolygon(lr,rings ); } private final Geometry cloneGeometry(Point geom)
/** * changes this to a new CSF -- more efficient than the JTS way * @param geom */ private final Geometry cloneGeometryLCS(Polygon geom) { LinearRing lr = (LinearRing) cloneGeometryLCS((LinearRing) geom.getExteriorRing()); LinearRing[] rings = new LinearRing[geom.getNumInteriorRing()]; for (int t=0;t<rings.length;t++) { rings[t] = (LinearRing) cloneGeometryLCS((LinearRing) geom.getInteriorRingN(t)); } return getGeometryFactory().createPolygon(lr,rings ); } private final Geometry cloneGeometryLCS(Point geom)