Skip to content

Commit a27fe90

Browse files
authored
Merge pull request #71 from nitehawk42/master
Update JTS to 1.16.0
2 parents aa72f13 + 89cc087 commit a27fe90

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

jdbc_jtsparser/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
<dependency>
3333
<groupId>org.locationtech.jts</groupId>
3434
<artifactId>jts</artifactId>
35-
<version>1.15.0</version>
35+
<version>1.16.0</version>
3636
<type>pom</type>
3737
</dependency>
3838
<dependency>
3939
<groupId>org.locationtech.jts</groupId>
4040
<artifactId>jts-core</artifactId>
41-
<version>1.15.0</version>
41+
<version>1.16.0</version>
4242
</dependency>
4343
<dependency>
4444
<groupId>org.locationtech.spatial4j</groupId>

jdbc_jtsparser/src/main/java/org/postgis/jts/JTSShape.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public boolean contains(double x, double y, double w, double h) {
7171
}
7272

7373
protected Polygon createRect(double x, double y, double w, double h) {
74-
double[] arr = { x, y, x + w, y, x + w, y + h, x, y + h, x, y };
75-
PackedCoordinateSequence shell = new PackedCoordinateSequence.Double(arr, 2);
74+
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) };
75+
PackedCoordinateSequence shell = new PackedCoordinateSequence.Double(coords, 2);
7676
Polygon p = fac.createPolygon(fac.createLinearRing(shell), NOSHELLS);
7777
return p;
7878
}

jdbc_jtsparser/src/main/java/org/postgis/jts/JtsBinaryParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private void parseGeometryArray(ValueGetter data, Geometry[] container, int srid
200200
private CoordinateSequence parseCS(ValueGetter data, boolean haveZ, boolean haveM) {
201201
int count = data.getInt();
202202
int dims = haveZ ? 3 : 2;
203-
CoordinateSequence cs = new PackedCoordinateSequence.Double(count, dims);
203+
CoordinateSequence cs = new PackedCoordinateSequence.Double(count, dims, 0);
204204

205205
for (int i = 0; i < count; i++) {
206206
for (int d = 0; d < dims; d++) {

0 commit comments

Comments
 (0)