We have discussed this in the past, and would not be surprised if there is something written down somewhere, if only in Jesse's notes. This is just one of those things which has several cases, so instead of spending effort on doing it right, we did the simple thing and use WGS84 all the time.

- Use the CRS of the first layer added, and stick with that.
- If the first layer does not have a CRS, then we have to "guess" and,
- If the extents fall in the lat/lon range, it is probably lat/ lon, so use that
  - If not use something generic, like CARTESIAN_2D

Which leads to the next set of cases, given a map in CARTESIAN_2D, what to do when layers that have valid CRS information are added. Probably ignore the CRS information and just draw them directly in.

The above is probably an amount of work to make operable, given the conditional nature of so much of it. But it's probably the right thing. Andrea have opinion?

P.

On Feb 7, 2006, at 10:45 AM, Jody Garnett wrote:

It really comes down to a numbers game, just like with fetures of an unknown projection. Treating them as CRS.CARTESIAN_2D is correct, but often as not people expect lat/long. We try and make the most common thing the default. Right up there on our guidelines "Use sensible defaults" is a uDig mantra.

The question is really what is sensible In this case? I do like the sound of CARTESIAN_2D using the identiy transform and going quickly. I am just not sure what the majority of these non projected files are actually intended to be in.

A couple options:
- preference, with the default being lat/long.
- check the world file, and if it falls in the 180/-180 -90/+90 range use WGS84, and if not use CARTESIAN_2D. I figure that would be the preference option "Guess".
- use the projection of the last thing loaded

We should also support an opperatoin to set the projection on both shapefiles and world+image files.
Jody



-------------------------------------------------------
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to