JUMP DB Query Plugin

This web page is out of date. Documentation for the JUMP DB Query Plugin has moved to the sourceforge project wiki - https://sourceforge.net/p/jumpdbqplugin/wiki/Documentation/. Please update your bookmarks.

The JUMP DB Query Plugin is an extension for the OpenJUMP GIS platform that allows OpenJUMP users to give arbitrary database queries to retrieve and display geographic feature sets.

Supported Databases


Download the latest package here.


Download the jumpdbquery package, unzip it, and place all the files in the unzipped folder in the JUMP_HOME/lib/ext folder.

If you are going to be querying MySQL databases, get the MySQL drivers from http://dev.mysql.com/downloads/connector/j/5.0.html. Download the appropriate package for your database version, uncompress it, and copy the mysql-connector-java jar into the JUMP_HOME/lib/ext folder.

If you want to query an Oracle database, and you don't already have Oracle JDBC drivers, download the Oracle JDBC drivers from http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html. You'll need an OTN account to download the drivers, but you can get one for free from Oracle. Read and accept the Oracle license, download ojdbc14.jar, and place it in the JUMP_HOME/lib/ext folder.

If you want to view geometries in a PostGreSQL database, go get the PostgreSQL JDBC driver at http://jdbc.postgresql.org/download.html. Download the appropriate JDBC driver for your version of Postgres. You'll also need the PostGIS JDBC driver. Download postgis.jar from here: http://www.postgis.org/download/, and place it in the JUMP_HOME/lib/ext folder.

Finally, support has been added for SpatiaLite. Download the SQLite JDBC driver from Xerial at http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC. The plugin supports native Spatialite spatial databases, and SQLite databases that follow the FDO RFC 16 (FDO provider for SQLite). The JUMP DB Query Plugin was tested with version 3.7.2 of the driver, but newere versions should work.

One of the files installed in JUMP_HOME/lib/ext is called dbquery.properties. You can use this config file to store database connection information so that you don't have to enter that information everytime you run a query. Follow the example settings in dbquery.properties and add the JDBC connection information for any databases you want to query.


Start OpenJUMP, and go to Tools-->Database Query. Select the database you want to query from the database dropdown. Update any connection information, if necessary, and enter the database password. Enter your SQL SELECT statement. The SELECT statement should include the geometry column, along with any other columns you want.

The plugin will generate a featureset where the geometry column defines the feature geometry, and the other columns define the feature attributes. For example, if you have a table called WORLDMAP, with a geometry column G, a map color column called "COLOR", and a country name column called COUNTRY, you could run the following query to view all countries starting with "A":


The plugin will use the G column to show country polygons, and COLOR and COUNTRY will show up as attributes of the polygon features. If you don't put a geometry column in your query, or if some of the geometry values returned by the query are null, the plugin will automatically create a square polygon around the coordinate system origin for those records that don't have a geometry value.

Larry Reeder Fri Jan 1 21:05:14 MDT 2010, lnreeder AT gmail DOT com