protected Geometry createSubGeomInstance(String token, boolean haveM) throws SQLException { return new LinearRing(token, haveM); }
private int estimateLinearRing(LinearRing geom) { return estimatePointArray(geom.getPoints()); }
private static org.postgis.LinearRing convert(LinearRing linearRing) { org.postgis.Point[] pgPoints = convertPoints(linearRing); org.postgis.LinearRing pgLinearRing = new org.postgis.LinearRing(pgPoints); pgLinearRing.haveMeasure = linearRing.isMeasured(); pgLinearRing.setSrid(linearRing.getSRID()); return pgLinearRing; }
private LinearRing convertJTSLineStringToLinearRing( com.vividsolutions.jts.geom.LineString lineString) { LinearRing lr = new org.postgis.LinearRing(toPoints(lineString .getCoordinates())); lr.setSrid(lineString.getSRID()); return lr; }
protected Geometry createSubGeomInstance(String token, boolean haveM) throws SQLException { return new LinearRing(token, haveM); }
private static org.postgis.LinearRing convert(LinearRing linearRing) { org.postgis.Point[] pgPoints = convertPoints(linearRing); org.postgis.LinearRing pgLinearRing = new org.postgis.LinearRing(pgPoints); pgLinearRing.haveMeasure = linearRing.isMeasured(); pgLinearRing.setSrid(linearRing.getSRID()); return pgLinearRing; }
private void writeLinearRing(LinearRing geom, ValueSetter dest) { writePointArray(geom.getPoints(), dest); }
/** * Creates a PostGIS Polygon object corresponding to the provided Point * list. * * @param points * The points to build a polygon from. * @return The Polygon object. */ public Polygon createPolygon(Point[] points) { Polygon result; result = new Polygon(new LinearRing[] {new LinearRing(points)}); result.srid = 4326; return result; } }
private int estimateLinearRing(LinearRing geom) { return estimatePointArray(geom.getPoints()); }
/** * Creates a PostGIS Polygon object corresponding to the provided Point * list. * * @param points * The points to build a polygon from. * @return The Polygon object. */ public Polygon createPolygon(Point[] points) { Polygon result; result = new Polygon(new LinearRing[] {new LinearRing(points)}); result.srid = 4326; return result; } }
private void writeLinearRing(LinearRing geom, ValueSetter dest) { writePointArray(geom.getPoints(), dest); }
private LinearRing parseLinearRing(ValueGetter data, boolean haveZ, boolean haveM) { Point[] points = parsePointArray(data, haveZ, haveM); return new LinearRing(points); }
private static LinearRing convert(org.postgis.LinearRing geometry) { PointSequence points = convertPoints(geometry.getPoints()); return new LinearRing(points); }
private LinearRing parseLinearRing(ValueGetter data, boolean haveZ, boolean haveM) { Point[] points = parsePointArray(data, haveZ, haveM); return new LinearRing(points); }
private static LinearRing convert(org.postgis.LinearRing geometry) { PointSequence points = convertPoints(geometry.getPoints()); return new LinearRing(points); }
private Polygon createWayBbox(double left, double right, double bottom, double top) { Point[] points; LinearRing ring; Polygon bbox; points = new Point[5]; points[0] = new Point(left, bottom); points[1] = new Point(left, top); points[2] = new Point(right, top); points[3] = new Point(right, bottom); points[4] = new Point(left, bottom); ring = new LinearRing(points); bbox = new Polygon(new LinearRing[] {ring}); bbox.srid = 4326; return bbox; }
protected com.vividsolutions.jts.geom.Geometry convertPolygon( Polygon polygon) { com.vividsolutions.jts.geom.LinearRing shell = getGeometryFactory() .createLinearRing( toJTSCoordinates(polygon.getRing(0).getPoints())); com.vividsolutions.jts.geom.Polygon out = null; if (polygon.numRings() > 1) { com.vividsolutions.jts.geom.LinearRing[] rings = new com.vividsolutions.jts.geom.LinearRing[polygon .numRings() - 1]; for (int r = 1; r < polygon.numRings(); r++) { rings[r - 1] = getGeometryFactory().createLinearRing( toJTSCoordinates(polygon.getRing(r).getPoints())); } out = getGeometryFactory().createPolygon(shell, rings); } else { out = getGeometryFactory().createPolygon(shell, null); } return out; }
private Polygon createWayBbox(double left, double right, double bottom, double top) { Point[] points; LinearRing ring; Polygon bbox; points = new Point[5]; points[0] = new Point(left, bottom); points[1] = new Point(left, top); points[2] = new Point(right, top); points[3] = new Point(right, bottom); points[4] = new Point(left, bottom); ring = new LinearRing(points); bbox = new Polygon(new LinearRing[] {ring}); bbox.srid = 4326; return bbox; }
points[4] = new Point( minD[0], minD[1], minD[2] ); linRing[0] = new LinearRing( points ); org.postgis.Polygon pgPoly = new org.postgis.Polygon( linRing ); pgPoly.setSrid( parseSRID( geometry.getCoordinateSystem() ) );