private static String polygonCoordinatesToWKT(PolygonBuilder polygon) { StringBuilder sb = new StringBuilder(); sb.append(GeoWKTParser.LPAREN); sb.append(ShapeBuilder.coordinateListToWKT(polygon.shell().coordinates)); for (LineStringBuilder hole : polygon.holes()) { sb.append(GeoWKTParser.COMMA); sb.append(ShapeBuilder.coordinateListToWKT(hole.coordinates)); } sb.append(GeoWKTParser.RPAREN); return sb.toString(); }
/** * Add a shallow copy of the polygon to the multipolygon. This will apply the orientation of the * {@link MultiPolygonBuilder} to the polygon if polygon has different orientation. */ public MultiPolygonBuilder polygon(PolygonBuilder polygon) { PolygonBuilder pb = new PolygonBuilder(new CoordinatesBuilder().coordinates(polygon.shell().coordinates(false)), this.orientation); for (LineStringBuilder hole : polygon.holes()) { pb.hole(hole); } this.polygons.add(pb); return this; }
private static String polygonCoordinatesToWKT(PolygonBuilder polygon) { StringBuilder sb = new StringBuilder(); sb.append(GeoWKTParser.LPAREN); sb.append(ShapeBuilder.coordinateListToWKT(polygon.shell().coordinates)); for (LineStringBuilder hole : polygon.holes()) { sb.append(GeoWKTParser.COMMA); sb.append(ShapeBuilder.coordinateListToWKT(hole.coordinates)); } sb.append(GeoWKTParser.RPAREN); return sb.toString(); }
private static String polygonCoordinatesToWKT(PolygonBuilder polygon) { StringBuilder sb = new StringBuilder(); sb.append(GeoWKTParser.LPAREN); sb.append(ShapeBuilder.coordinateListToWKT(polygon.shell().coordinates)); for (LineStringBuilder hole : polygon.holes()) { sb.append(GeoWKTParser.COMMA); sb.append(ShapeBuilder.coordinateListToWKT(hole.coordinates)); } sb.append(GeoWKTParser.RPAREN); return sb.toString(); }
/** * Add a shallow copy of the polygon to the multipolygon. This will apply the orientation of the * {@link MultiPolygonBuilder} to the polygon if polygon has different orientation. */ public MultiPolygonBuilder polygon(PolygonBuilder polygon) { PolygonBuilder pb = new PolygonBuilder(new CoordinatesBuilder().coordinates(polygon.shell().coordinates(false)), this.orientation); for (LineStringBuilder hole : polygon.holes()) { pb.hole(hole); } this.polygons.add(pb); return this; }
/** * Add a shallow copy of the polygon to the multipolygon. This will apply the orientation of the * {@link MultiPolygonBuilder} to the polygon if polygon has different orientation. */ public MultiPolygonBuilder polygon(PolygonBuilder polygon) { PolygonBuilder pb = new PolygonBuilder(new CoordinatesBuilder().coordinates(polygon.shell().coordinates(false)), this.orientation); for (LineStringBuilder hole : polygon.holes()) { pb.hole(hole); } this.polygons.add(pb); return this; }
/** * Add a shallow copy of the polygon to the multipolygon. This will apply the orientation of the * {@link MultiPolygonBuilder} to the polygon if polygon has different orientation. */ public MultiPolygonBuilder polygon(PolygonBuilder polygon) { PolygonBuilder pb = new PolygonBuilder(new CoordinatesBuilder().coordinates(polygon.shell().coordinates(false)), this.orientation); for (LineStringBuilder hole : polygon.holes()) { pb.hole(hole); } this.polygons.add(pb); return this; }