Hey Simone,

1) committed the removal of the CRS output as of rev. 29003.

2) can I do the same in the image module, gce.image.WorldImageReader
line 630, which has the same kind of CRS output, for WGS84 (DD) this
time?

3) I'm not touching the throws clause because that seems serious and I
don't want to delve into this code as much as I would require of myself
to do that.

4) Don't overestimate the frequency of WGS84, lots of people digitize
maps. :-)

5) The code block I really didn't understand was:

/**
 * Default [EMAIL PROTECTED] CoordinateReferenceSystem} used by all the plugins.
 */
private static CoordinateReferenceSystem crs;
static {
        try {
                crs = CRS.decode("EPSG:4326", true);
        } catch (NoSuchAuthorityCodeException e) {
                crs = DefaultGeographicCRS.WGS84;
        } catch (FactoryException e) {
                crs = DefaultGeographicCRS.WGS84;
        }
}

in AbstractGridFormat, which seems like a lot of work if all you want is
the static WGS84 and looks like catching the FactoryException the first
time is not going to do much good.

good night,
adrian


On Thu, 2008-01-31 at 00:16 +0100, Simone Giannecchini wrote:
> Ciao Adrian,
> I checked the code a bit and I would suggest to remove (I don't have
> the *actual* code here now) the second part of the stringbuffer so
> that w don't get the wkt of wgs84 if that is causing headaches. About
> the level of the exception, I think that INFO is appropriate, probably
> warning would be better, since not having a propoer CRs could cause
> problems afterwards.
> 
> About how this piece of code works, here is the explanation:
> 
> 1> look for a file_name.prj file, if found go to 2 else goto 4
> 2> try to parse the prj file if an error occurs goto 4 else goto 3
> 3> use the parse CRS and exit
> 4> use a default CRS and exit
> 
> Of course one coudl wonder why we used WGS84 as the standard CRS. The
> answer is easy. 99% of the time people forget the prj when data is
> WGS84; I would 'have preferred using an engineering coordinate
> reference system, like the image crs, but then things would get much
> worse (I tried that approach hence I know :-) ) when putting data
> inside geoserver.
> 
> It would be great if you could apply the change your self,
> Simone.
> 
> On Jan 30, 2008 11:48 PM, Adrian Custer <[EMAIL PROTECTED]> wrote:
> > Hey Simone,
> >
> > Found it!
> >
> > At the end of
> >  ArcGridReader.getCoordinateReferenceSystem()
> > you have:
> > if (crs == null) {
> >        crs = AbstractGridFormat.getDefaultCRS();
> >        LOGGER.info(new StringBuffer(
> >                        "Unable to find crs, continuing with default WGS4 
> > CRS")
> >                        /*.append("\n").append(crs.toWKT()).toString()*/);
> > }
> > with the comment markers my own.
> >
> > 1) does this need to be at the info level?
> >
> > 2) Since you create the crs in a static initialization structure in
> > AbstractGridFormat don't you know what it is? Why do you want to see it
> > again?
> >        (I'm not exactly sure how your code works since you are doing
> >        the same thing twice, the second time in response to a
> >        FactoryException your first try could have caused. Won't the
> >        second attempt cause exactly the same exception? Why are you
> >        even trying the decode?)
> >
> > Thanks for any clarification,
> > --adrian
> >
> >
> >
> 
> 
> 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to