Martin Desruisseaux ha scritto:
> Le jeudi 18 janvier 2007 à 17:13 +0100, Andrea Aime a écrit :
...

> As a side note, you can also use CRS.equalsIgnoreMetadata(...). This
> just a convenient way to invoke AbstractIdentifiedObject.equals(xxx,
> false).

Ah, cool :-)

> But you are right, the axis name are relevant. Those names are
> constrained by ISO 19111 specification, table 16 at page 22. According
> ISO 19111, those axis names must be "Geodetic longitude" and "Geodetic
> latitude". The WKT is in violation with this standard, since WKT
> specification in OGC 01-009 said that default axis name should be "Lon"
> and "Lat".
> 
> So we have a conflict between two standards. Current Geotools code
> doesn't try to solve this conflict. But we could add some code in
> DefaultCoordinateSystemAxis.equals(...) saying that "Lon" is equivalent
> to "Geodetic longitude".

Yeah, I agree. I'll try it on my comparison and see what comes out.

>> I would like a more lenient way to do the comparison, that uses
>> only the spheroid parameters, the projection parameters, primem, and 
>> unit. Is there any way to get it?
> 
> Current code doesn't do that. We could try to generalize
> AbstractIdentifiedObject.equals(..., boolean) method, for example trying
> to replace the boolean argument by some Enum object, so we have room for
> a variety of comparaison methods. However I'm not sure that we can
> compare units if we don't check axis name (how can we know if we are
> comparing the units of the same axis?). Futhermore, we may also need a
> way to specify a tolerance level in floating point comparaisons.
> 
> We may try to first add the special check for "Lon" and "Lat" axis names
> since they come from legacy OGC 01-009 specification and see if it
> resolve a majority of cases. If it doesn't work well enough, then we
> could consider the more complex AbstractIdentifiedObject.equals(...,
> SomeEnum) approach. What do you think?

I like doing things stepwise, yes, so lets try this one first.
I'll let you know how it goes, if good, I'll send you a patch.
Cheers
Andrea

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to