Thanks Andrea,
Does the query.setCoordinateSystemReproject() method take into account
the CRS Lat/Long convention? What I mean is that if the "from" CRS has
Lat/Long order and "to" CRS has Long/Lat order, would they convert lat
to lat and long to long?
Regards,
Janusz
 

-----Original Message-----
From: Andrea Aime [mailto:aa...@opengeo.org] 
Sent: Thursday, June 11, 2009 5:47 PM
To: Janusz Dalecki
Cc: geotools-gt2-users@lists.sourceforge.net
Subject: Re: [Geotools-gt2-users] Changing CRS in the feature

Janusz Dalecki ha scritto:
> Hi,
> 
> I am reading a FeatureSource from the shapefile that has Coordinate 
> Reference System lets say "A". I would like to change that 
> FeatureSource's CRS to another one ("B").
> 
> Is there any way of doing this? Can somebody point me in the right 
> direction?

You cannot change the CRS of a feature source, but you can ask it to
return a reprojected feature collection using
DefaultQuery.setCoordinateSystemReproject
and then passing the query down when you're getting the query.

If you find a buggy datastore that does not respect the reprojection
directive you can use a wrapper that does the job, like
ReprojectingFeatureCollection

Hope this helps
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to