12

Are there any embedded spatial databases for Java? I've come across H2 Spatial, but it was difficult to tell the status of that and if it can be used as an embedded spatial database.

2

4 Answers 4

3

You could try Hatbox (http://hatbox.sourceforge.net/derbyquickstart.html) from the web page:

Hatbox has two distinct parts: the core library and a Geotools DataStore. The core library can be used entirely independently of the Geotools DataStore. This quick start will use only the core library to get data into your new Hatbox spatialized table and to issue spatial queries on it. It will focus on using Hatbox with JavaDB (Sun's packaging of Apache Derby) simply because it comes as part of a Sun JDK 6 install.

1
  • I successfully used Hatbox with H2. Thanks so much. Commented Oct 12, 2010 at 2:03
2

GeoDB is exactly what you need. It's an extension to H2 based on JTS. There also is a Hibernate dialect for geodb (link updated) (http://www.hibernatespatial.org/hibernate-spatial-h2-geodb/).

0

Look on JASPA for this

http://forge.osor.eu/projects/jaspa/

http://www.osor.eu/projects/jaspa

Links above from the announcement on http://www.listware.net/201007/postgresql-general/88038-general-jaspa-java-spatial-for-postgresql-and-h2-released.html

Some presentations about it at foss4g 2010 http://2010.foss4g.org/presentations_show.php?id=3661

-1

H2 database supports the Geometry type natively as of version 1.3.173. An extension called H2GIS available on Maven Central gives full SFSQL support.

An extended documentation has been written on the website, but you should start from the Quick-Start guide

1
  • The documentation for H2GIS is terrible though. And try and find an example of someone using hibernate to use it.
    – user64141
    Commented Apr 14, 2017 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.