Skip to content

Commit

Permalink
Merge pull request #1680 from tfr42/feature/migrateToNewPostgisJdbc
Browse files Browse the repository at this point in the history
Upgraded PostGIS JDBC driver to v2023.1.0 with support for Java 9+
  • Loading branch information
stephanr authored Apr 24, 2024
2 parents 775c34f + aab5309 commit 1b6b793
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
import org.deegree.sqldialect.filter.AbstractWhereBuilder;
import org.deegree.sqldialect.filter.PropertyNameMapper;
import org.deegree.sqldialect.filter.UnmappableException;
import org.postgis.PGboxbase;
import net.postgis.jdbc.PGboxbase;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -207,7 +207,7 @@ public Envelope getBBoxAggregateValue(ResultSet rs, int colIdx, ICRS crs) throws
return env;
}

private org.deegree.geometry.primitive.Point buildPoint(org.postgis.Point p, ICRS crs) {
private org.deegree.geometry.primitive.Point buildPoint(net.postgis.jdbc.geometry.Point p, ICRS crs) {
double[] coords = new double[p.getDimension()];
coords[0] = p.getX();
coords[1] = p.getY();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
import org.deegree.rendering.r3d.persistence.RenderableStore;
import org.deegree.workspace.ResourceMetadata;
import org.deegree.workspace.Workspace;
import org.postgis.Geometry;
import org.postgis.LinearRing;
import org.postgis.PGbox3d;
import org.postgis.PGgeometry;
import org.postgis.Point;
import org.postgis.Polygon;
import net.postgis.jdbc.geometry.Geometry;
import net.postgis.jdbc.geometry.LinearRing;
import net.postgis.jdbc.PGbox3d;
import net.postgis.jdbc.PGgeometry;
import net.postgis.jdbc.geometry.Point;
import net.postgis.jdbc.geometry.Polygon;

/**
* The <code>PostgisBackend</code> class adds postgis specific methods to the model
Expand Down Expand Up @@ -85,7 +85,7 @@ public Envelope createEnvelope(PGgeometry geometry) {
}
Polygon pgPolygon = (Polygon) geom;
ICRS crs = CRSManager.getCRSRef("EPSG:" + pgPolygon.getSrid());
org.postgis.LinearRing ring = pgPolygon.getRing(0);
net.postgis.jdbc.geometry.LinearRing ring = pgPolygon.getRing(0);
Point min = ring.getPoint(0);
Point max = ring.getPoint(2);
double[] mi = null;
Expand Down Expand Up @@ -145,7 +145,7 @@ public PGgeometry createBackendEnvelope(Envelope geometry, int dimension) {
points[4] = new Point(minD[0], minD[1], minD[2]);
}
linRing[0] = new LinearRing(points);
org.postgis.Polygon pgPoly = new org.postgis.Polygon(linRing);
net.postgis.jdbc.geometry.Polygon pgPoly = new net.postgis.jdbc.geometry.Polygon(linRing);
pgPoly.setSrid(parseSRID(geometry.getCoordinateSystem()));
return new PGgeometry(pgPoly);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
import org.deegree.geometry.Envelope;
import org.deegree.geometry.GeometryFactory;
import org.deegree.tools.coverage.gridifier.RasterLevel;
import org.postgis.PGgeometry;
import org.postgis.Point;
import org.postgis.Polygon;
import net.postgis.jdbc.PGgeometry;
import net.postgis.jdbc.geometry.Point;
import net.postgis.jdbc.geometry.Polygon;

public class MultiLevelMemoryTileGridIndex implements MultiLevelRasterTileIndex {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
import org.deegree.geometry.Envelope;
import org.deegree.geometry.GeometryFactory;
import org.deegree.tools.coverage.gridifier.RasterLevel;
import org.postgis.PGgeometry;
import org.postgis.Point;
import org.postgis.Polygon;
import net.postgis.jdbc.PGgeometry;
import net.postgis.jdbc.geometry.Point;
import net.postgis.jdbc.geometry.Polygon;

public class PostGISRasterTileIndex implements MultiLevelRasterTileIndex {

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -851,17 +851,17 @@
<dependency>
<groupId>net.postgis</groupId>
<artifactId>postgis-jdbc</artifactId>
<version>2.5.1</version>
<version>2023.1.0</version>
</dependency>
<dependency>
<groupId>net.postgis</groupId>
<artifactId>postgis-geometry</artifactId>
<version>2.5.1</version>
<version>2023.1.0</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.2</version>
<version>42.7.3</version>
</dependency>
<!-- Oracle (Official provided driver from repo1.maven.org) -->
<dependency>
Expand Down

0 comments on commit 1b6b793

Please sign in to comment.