Matthias Basler a écrit : > I am well aware of this problem. My preferred solution would be following > method in the API: > csFactory.getAuthorityUnitCodes(Class<Quantity>Quantity) > This way I could also separately retrieve units of quantity "Length" or > "Angle" without having to filter them by EPSG number range afterwards.
Sound like a nice idea (I didn't though about a Class<? extends Quantity> argument). > 1. What's the reason for this? Can/should we do anything about it? This is because the EPSG database contains enough information only for units that are proportional to a base units like meters or radians. It can not describe more complex units like sexagesimal degrees. An other reason is that instead than creating a new Unit instance for degrees, we would like to leverage the existing NonSI.DEGREE_ANGLE instance. > 2. Where can I find this hardcoded list either in code or in the > documentation? > Is it the set of units defined by JSR-275? In the DirectEpsgFactory (if my memory serve me right, or maybe AbstractEpsgFactory - we have a duplication of code right now that need to be cleaned). There is a static method, getUnit(String) I believe, which is implemented as a switch statement returning different SI or NonSI instance depending on the given code. Martin ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel