|Project Name||Stars||Downloads||Repos Using This||Packages Using This||Most Recent Commit||Total Releases||Latest Release||Open Issues||License||Language|
|Node Spatialite||55||9||4||6 years ago||7||September 22, 2017||13||other||C|
|Standalone, cross-platform SpatiaLite 4.0 binding for node.js with all features enabled|
|Postgis Java Ng||13||5 days ago||lgpl-3.0||Java|
|PostGIS Java bindings|
|Mapnik Java||11||3 months ago||4||Java|
|Calls libmapnik3.0.x from Java|
This project contains Java bindings for using PostGIS geometries coming from a PostgreSQL database.
It is originally based on postgis-java and I want to thank its authors for their work.
Project goals and improvements:
Supported geometry types:
There is a Maven artifact in the official Maven repository, so just add this to your Maven POM:
<dependency> <groupId>io.github.sebasbaumh</groupId> <artifactId>postgis-java-ng</artifactId> <version>23.1.0</version> </dependency>
The version reflects the year of the release, e.g.
22.3.0 is a version released in 2022.
The API differs a bit from postgis-java with the main point being a different namespace (
io.github.sebasbaumh.postgis) as publishing a project to Maven Central requires to own that namespace.
In addition the class structure is a bit different (see below) to support arc geometries and reduce boilerplate code, but you should be able to adapt to it easily.
The implementations of the parser and writer for the geometries have been heavily reworked to speed up processing and reduce complexity.
You will need a PostgreSQL server with installed PostGIS extension for some of the tests.
In this example the server is named
MyServer and the database
UnitTestDB. The database can be empty except installing the PostGIS extension.
You should set up a database user for the unit tests, which has access rights to this database and only to this one.
In this example the user is called
unittest and has the password
To run the unit tests accessing the server, add the following to your VM arguments (eclipse Run Configuration->Arguments->VM arguments):
-DtestJdbcUrl="jdbc:postgresql://MyServer/UnitTestDB" -DtestJdbcUsername="unittest" -DtestJdbcPassword="CHANGEME"
Or add the following Maven build parameters to the launch configuration in eclipse:
If it works, you will see this line in the build output:
Tests are running with a database
Tests are running without a database
There are also local tests contained in the project, so you are still able to test most parts without specifying a PostgreSQL server. And the test console output will show if tests were run with or without a database.