Transforming to / from internal srid

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Transforming to / from internal srid

Farrukh Najmi
Dear Colleagues,

I would like my server to store all geometries in an internal SRS and allow:
  • Clients to submit spatial slots in *any* SRS but having the server transform it into the internal SRS before storing it using hibernate-spatial
  • Clients to perform spatial queries using hibernate-spatial with filter geometries in *any* SRS but having the server transform it internally into the internal default SRS for the system before performing the query and then transforming the matched data into the same SRS as specified for the filter geometry
To do this, ideally I need to have access to the transform function (from proj4 in postgis) within my server which is written in Java. Does anyone know how to do that? The http://www.jhlabs.com/java/maps/proj/ project promises to do what I need for a subset of projections. I am not sure how easy it is to add support for new projections in it.

Has any one any advice to offer or experience to share? Is this a topic better suited for the postgis list?
-- 
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com


_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: Transforming to / from internal srid

Farrukh Najmi

Below I was looking for a way to do the equivalent of postgis function ST_Transform on a JTS geometry from within Java code.

An alternative might be to somehow use hibernate-spatial / hibernate in such that the underlying INSERT and Query statements use the ST_Transform function.
I can see how to do that in a query but I am not sure how to do that for an INSERT.

Anyone have any suggestions?

On 01/10/2011 11:57 AM, Farrukh Najmi wrote:
Dear Colleagues,

I would like my server to store all geometries in an internal SRS and allow:
  • Clients to submit spatial slots in *any* SRS but having the server transform it into the internal SRS before storing it using hibernate-spatial
  • Clients to perform spatial queries using hibernate-spatial with filter geometries in *any* SRS but having the server transform it internally into the internal default SRS for the system before performing the query and then transforming the matched data into the same SRS as specified for the filter geometry
To do this, ideally I need to have access to the transform function (from proj4 in postgis) within my server which is written in Java. Does anyone know how to do that? The http://www.jhlabs.com/java/maps/proj/ project promises to do what I need for a subset of projections. I am not sure how easy it is to add support for new projections in it.

Has any one any advice to offer or experience to share? Is this a topic better suited for the postgis list?

-- 
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com


_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: Transforming to / from internal srid

Karel Maesen
Administrator
Hi,

For such cases I use the GeoTools Referencing module. It supports the same projection systems as PROJ. Another interesting project is http://trac.osgeo.org/proj4j/. But this is not yet ready for production use  (or so it says on the web site).

Regards,

Karel Maesen


On 10 Jan 2011, at 22:14, Farrukh Najmi wrote:

>
> Below I was looking for a way to do the equivalent of postgis function ST_Transform on a JTS geometry from within Java code.
>
> An alternative might be to somehow use hibernate-spatial / hibernate in such that the underlying INSERT and Query statements use the ST_Transform function.
> I can see how to do that in a query but I am not sure how to do that for an INSERT.
>
> Anyone have any suggestions?
>
> On 01/10/2011 11:57 AM, Farrukh Najmi wrote:
>> Dear Colleagues,
>>
>> I would like my server to store all geometries in an internal SRS and allow:
>> • Clients to submit spatial slots in *any* SRS but having the server transform it into the internal SRS before storing it using hibernate-spatial
>> • Clients to perform spatial queries using hibernate-spatial with filter geometries in *any* SRS but having the server transform it internally into the internal default SRS for the system before performing the query and then transforming the matched data into the same SRS as specified for the filter geometry
>> To do this, ideally I need to have access to the transform function (from proj4 in postgis) within my server which is written in Java. Does anyone know how to do that? The http://www.jhlabs.com/java/maps/proj/ project promises to do what I need for a subset of projections. I am not sure how easy it is to add support for new projections in it.
>>
>> Has any one any advice to offer or experience to share? Is this a topic better suited for the postgis list?
>
> --
> Regards,
> Farrukh Najmi
>
> Web:
> http://www.wellfleetsoftware.com
>
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users