Frankie Bollaert a écrit :
What I am also wondering about are projections. I am not sure what
projection my map is using, but I would like to experiment with
different projections. So far I have found some documentation about
creating a custom projection, but no information about applying a
projection to a displayed map.
There is two projection involved:
1) The projection our yours data.
2) The projection used for displaying.
They don't need to be the same. The data projection (actually the data
CRS) are usually specified at data loading time. This CRS is often a
metadata bundled with the data. When it is not, I believe that the
DataStore API allow to specify in which CRS the data are.
The renderer also have a setCRS (or maybe setCoordinateSystem, or some
name like that) method. But this method set the CRS used for displaying.
It is independent from the data CRS and is not the place where we should
experiment different CRS in order to figure out which one was used by
the data. Invoking the renderer's setCRS method means that the
coordinates will be automatically projected from the data CRS to the
display CRS at rendering time. But this work only if the data CRS (as
specified in the previous paragraph) was right in the first place.
As for the specific API to use for setting the DataStore CRS, I'm not
yet very familiar with this part. Other Geotools users could give a more
accurate suggestion than me.
Regards,
Martin.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users