I’m starting a new project, and I will use Hibernate to mapping the classes.
But, I have a some classes with spatial data.
I would like to know if somebody already passed therefore and has an example class. I’m using PostGIS.
I'd be interested in your hopefully successful attempts.
Regards
Per-Olof Norén
Fernando Quadro skrev:
Hi,
I'm starting a new project, and I will use Hibernate to mapping the classes.
But, I have a some classes with spatial data.
I would like to know if somebody already passed therefore and has an example class. I'm using PostGIS.
------------------------------------------------------------------------
Receba as últimas notícias do Brasil e do mundo direto no seu Messenger com Alertas MSN! É GRÁTIS! Assine já! <http://alertas.br.msn.com/>
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
------------------------------------------------------------------------
As Per-Olaf states its definitely been done before. I have used
hibernate with geoserver but not to map spatial data.
I know Andrea and Jody worked on a project last year that involved using
hibernate to map relational data into features... similar to what
geotools datastores do. I think at one point there was even a hibernate
datastore... but not sure where that code is living now.
I'd be interested in your hopefully successful attempts.
Regards
Per-Olof Norén
Fernando Quadro skrev:
Hi,
I'm starting a new project, and I will use Hibernate to mapping the
classes.
But, I have a some classes with spatial data.
I would like to know if somebody already passed therefore and has an
example class. I'm using PostGIS.
------------------------------------------------------------------------
Receba as últimas notícias do Brasil e do mundo direto no seu
Messenger com Alertas MSN! É GRÁTIS! Assine já!
<http://alertas.br.msn.com/>
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
The code did not have an open source header on the top of it but we can at least answer questions about how it was done. As I understand it we used the GeoTools sql writers to generate the spatial query; and we added that into the Hibernate Criteria object. Mapping from PostGIS WKB to a JTS Geometry object was done as a UserType.
You can use the GeoTools Feature / FeatureType constrct a bit like a dynamic bean....
Jody
Justin Deoliveira wrote:
Hi Fernando,
As Per-Olaf states its definitely been done before. I have used
hibernate with geoserver but not to map spatial data.
I know Andrea and Jody worked on a project last year that involved using
hibernate to map relational data into features... similar to what
geotools datastores do. I think at one point there was even a hibernate
datastore... but not sure where that code is living now.
Sorry this is a vague post, Im not in a position right now to be too precise. We did this sucessfully last year with EJB3/Hibernate to PostGIS… We used EJB3Spatial. Norman Baker is the author and when I used it he was working on this under the PostGIS project/repository/license. Basic explaination is you need to use the PostGIS jdbc driver and add some @ com.postgis.GeometryType annotations, and the com.postgis.GeometryType class to your beans.jar
It works very well, but last time I checked you had to still manually create the database tables & geom columns. Also, make sure your versions of postgis, matches your jdbc driver version!
There are two other projects floating around that are also supposed to do this… I don’t have time to look right now, and I can’t confirm if they are pure vapour!
The code did not have an open source header on the top of it but we can
at least answer questions about how it was done. As I understand it we
used the GeoTools sql writers to generate the spatial query; and we
added that into the Hibernate Criteria object. Mapping from PostGIS WKB
to a JTS Geometry object was done as a UserType.
You can use the GeoTools Feature / FeatureType constrct a bit like a
dynamic bean…
Jody
Justin Deoliveira wrote:
Hi Fernando,
As Per-Olaf states its definitely been done before. I have used
hibernate with geoserver but not to map spatial data.
I know Andrea and Jody worked on a project last year that involved using
hibernate to map relational data into features… similar to what
geotools datastores do. I think at one point there was even a hibernate
datastore… but not sure where that code is living now.
-Justin
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/