[postgis-devel] State of the postgis hibernate union?

Chris Hodgson chodgson at refractions.net
Tue Oct 9 09:38:01 PDT 2007


I am the presenter of that foss4g presentation you reference so I may 
have something to contribute.

Our approach was not intended for web mapping, only as a way to simplify 
database access from Java. We actually took code from two different 
places in the postgis repository and put them together to make the JTS 
Geometry based usertype. The usertype code that we found in the 
repository was designed to create PGGeometry and related types, which 
don't have the functionality of the JTS geometries, so we mde some minor 
changes (inserted the JTS WK reader/writer instead of the "native" 
postgis one).

When we had started the project, there was no hibernate spatial in 
existence. If we were starting now, we would surely use it. As I 
understand, it does exactly what we did, with postgis <-> JTS geometry 
usertype, and also adds a new dialect to support spatial operators and 
functions.

As you can see from the variety of code in the /java part of the postgis 
repository, the java development hasn't been strongly focussed in any 
one direction. Personally, I think we should deprecate the PG* objects 
and replace them with JTS, and direct the hibernate-oriented development 
to the hibernate-spatial project, although if there is anything that 
postgis needs to do itself to better support the hibernate-spatial 
interface then we should include that code as well. I think the various 
other bits of EJB code are either example implementations or are already 
handled by hibernate spatial, but I could be wrong.

I'd be interested to hear from Markus Schaber, Norman Barker or others 
who have contributed to the java source tree about what they think the 
direction should be, if any.

Chris

Per-Olof Norén wrote:
> Hi guys,
> 
> Sorry for cross posting, I'm new to the lists and not sure on where this 
> belongs.
> 
> I'm currently involved in a project with GIS functionality.
> Architecture is roughly like this:
> * Apache Tomcat
> * Wicket 1.3 / Geoserver 1.6
> * Hibernate
> * PostgreSQL 8.2 + PostGIS 1.2.1
> We're using maven2 as build system for all this.
> 
> Currently I'm looking to set up EJB persistence for domain beans 
> containing persistence. Using hibernate annotations.
> 
> 1. Maven repository for the postgis jar
> I found this: 
> http://postgis.refractions.net/pipermail/postgis-devel/2006-November/002375.html 
> 
> And it seems perfect, had it only been updated to latest and greatest 
> version.
> Are there any plans for an updated driver?
> 
> 2. EJB and hibernate UserTypes
> I found EJB3 code in the postgis driver source, contributed by norman 
> baker.
> I found http://www.hibernatespatial.org/ , which seems to fit.
> I found http://www.foss4g2007.org/presentations/view.php?abstract_id=118
> To bad I missed foss4g...
> 
> Seems to me all of the above do the same thing as I want.
> I'm interested in the direction / roadmap for the postGIS EJB3 development.
> Which should I use, according to the postGIS community?
> 
> Any suggestions greatly appreciated
> 
> Thanks in advance
> Per-Olof Norén
> 
> 
> 
> 
> 
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel




More information about the postgis-devel mailing list