PostGIS and JPA 2.0

I would like to map data types from PostGIS to JPA 2.0. I googled for solutions or examples, but all I can find is that JPA does not support displaying custom data types. Does it still look like JPA 2.0? Someone tell me an example?

+7
java geospatial postgis
source share
3 answers

I googled for solutions or examples, but all I can find is that JPA does not support displaying custom data types. Is it still in JPA 2.0?

Yes. Therefore, you will have to rely on certain extensions. For Hibernate, the Hibernate Spatial project provides ready-to-use spatial dialects and custom types:

Hibernate Spatial is a common extension for Hibernate to process geographic data. Hibernate Spatial is open source and licensed, such as Hibernate, under the LGPL license.

Hibernate Spatial allows you to deal with geographic data in a standardized way. It abstracts from a specific way to support a geographic database and a standardized, cross-domain interface for storing geographic data and feature requests.

Hibernate Spatial supports most of the simple function function of the OGC specification. Supported databases are: Oracle 10g / 11g, Postgresql / Postgis, Microsoft SQL Server and MySQL.

+4
source share

DataNucleus supports JPA1 + 2 and also has a paid plug-in that supports PostGIS, among other things

+1
source share

I just did this with the Hibernate Spatial. They have a great tutorial on their website, although I assume you found the answer from now on.

+1
source share

All Articles