Simone Giannecchini a écrit :
Talking about the other method (equals + EPS) don't you think that the method I proposed might be more general? Weighting the difference with the length on the inspected axes. It is very difficult in general to use a direct method as you implemented.
Yes, I had a though about relative EPS values. Like usual, I had some hesitations about what should be the right behavior. I noticed that javax.vecmath.GMatrix.equalsEpsilon(...) for example expects an absolute EPS value. I assumes that this is because some users may have some knowledge about their data that Geotools doesn't have. But I admit that in such case, he can very well write its own equals method.
If we want something relative, should it be relative to the envelope size or should we inspect the CoordinateSystemAxis (for example checking the units)? We may need to inspect it anyway since it may be the only to determine if we should warp around +/- 180° for longitudes. GeoAPI 2.1 should provides a way to determines the expected min and max values for an axis:
http://geoapi.sourceforge.net/pending/javadoc/org/opengis/referencing/cs/CoordinateSystemAxis.html#getRangeMeaning() Should we use that information? Martin. ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel