Andrea Aime wrote:

Hi,
I'm looking at the grid coverage readers, and found out that AbstractGridFormat defines WGS84 as the default crs. This is used by the WorldImagePlugin if not
.prj file is avaiable to define more precisely the grid coverage format.

Now, this decision seems a little problematic to me. If we load a coverage with wld file but no prj file, and the coverage happens to be in a projected system (say, UTM), there is no correspondance between the grid coordinates
(which may be in the range of the millions of meters) and the crs (that
uses -180/-180 -90/+90).

It seems to me the most sensible choice for an unknown CRS is
DefaultEngineeringCRS.CARTESIAN_2D, which has special handling to be
a good default cartesian CRS (in particular, every transformation that involves it is an identity).

Yet this change may break some of applications that rely on the current default

Given the quality of the raster rendering (which you just imporved) nobody has relied on raster support yet.
So I would not worry too much.

It is however important: many people try, it is one of our top questions on the FAQ.

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