Skip to content

Commit

Permalink
update JTS to 1.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mike committed Dec 19, 2018
1 parent aa72f13 commit 89cc087
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions jdbc_jtsparser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts</artifactId>
<version>1.15.0</version>
<version>1.16.0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
<version>1.15.0</version>
<version>1.16.0</version>
</dependency>
<dependency>
<groupId>org.locationtech.spatial4j</groupId>
Expand Down
4 changes: 2 additions & 2 deletions jdbc_jtsparser/src/main/java/org/postgis/jts/JTSShape.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public boolean contains(double x, double y, double w, double h) {
}

protected Polygon createRect(double x, double y, double w, double h) {
double[] arr = { x, y, x + w, y, x + w, y + h, x, y + h, x, y };
PackedCoordinateSequence shell = new PackedCoordinateSequence.Double(arr, 2);
Coordinate[] coords = { new Coordinate(x, y), new Coordinate(x + w, y), new Coordinate(x + w, y + h) ,new Coordinate(x, y + h) ,new Coordinate(x, y) };
PackedCoordinateSequence shell = new PackedCoordinateSequence.Double(coords, 2);
Polygon p = fac.createPolygon(fac.createLinearRing(shell), NOSHELLS);
return p;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private void parseGeometryArray(ValueGetter data, Geometry[] container, int srid
private CoordinateSequence parseCS(ValueGetter data, boolean haveZ, boolean haveM) {
int count = data.getInt();
int dims = haveZ ? 3 : 2;
CoordinateSequence cs = new PackedCoordinateSequence.Double(count, dims);
CoordinateSequence cs = new PackedCoordinateSequence.Double(count, dims, 0);

for (int i = 0; i < count; i++) {
for (int d = 0; d < dims; d++) {
Expand Down

0 comments on commit 89cc087

Please sign in to comment.