Jody Garnett a écrit :
> I am not sure yet how multiple valid CRSFactories are chosen ....The CRS 
> utility class is caching a DefaultAuthorityFactory - which I eventually 
> will need to get Hints into that process.

CRS is just a set of convenience methods. If we complexify it too much, it will 
no longer be convenience methods and will start to looks like 
org.geotools.referencing.FactoryFinder.

If more control are wanted, org.geotools.referencing.FactoryFinder or some 
other 
alternatives may be considered. Maybe we can try to see if it can fit the needs.


> In talking to Andrea GeoServer is using a system property right now ... 
> I went through all the source code and found the following:
> 
>  From FactoryUsingWKT:
> - public static final String CRS_DIRECTORY_KEY = 
> "org.geotools.referencing.crs-directory";
> - final String directory = System.getProperty(CRS_DIRECTORY_KEY);

System properties should not be needed in any way for configuring the 
factories. 
They are just workaround for legacy applications that do not specify their 
hints. For example the "org.geotools.referencing.forceXY" system property sets 
the default value of Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER to Boolean.TRUE, 
but 
this is ignored and useless if the user - like Geoserver - provides an explicit 
value for Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER.

I admit that the above-cited CRS_DIRECTORY_KEY is an exception, since there is 
no equivalent hint - the system property is the only way to configure the 
directory. This is a bug and should be fixed. If this is an urgent issue, I can 
send some suggestions about how to fix it. If it can wait a little bit, I would 
suggest to open a JIRA task.

        Martin

-------------------------------------------------------------------------
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