Martin Desruisseaux wrote: > System properties should not be needed in any way for configuring the > factories. I admit that CRS_DIRECTORY_KEY is an exception. This is a > bug and should be fixed. If this is an urgent issue and if you have a > little bit of time, would you like to fix it? I may not be able to do > significant work before a few days. > > * Add a new value in org.geotools.factory.Hints (name to be > determined. Maybe > EXTRA_CRS_DIRECTORY?) Named CRS_AUTHORITY_EXTRA_DIRECTORY - to get it in a useful sort order, paired with CRS_AUTHORITY_DATASOURCE from proposal.
Used a key value that matched the System property: - org.geotools.referencing.crs-directory Please note that the implementation of Key assumes the value passed in is a className. Can we fix this to be less specific? > * Add a "directory" (or some other name) private field in > FactoryUsingWKT. Noted there was already a System property key here - used it as the value above. The class has two static finals - one for a directory key, and one for a FILENAME (tempting to do filename as a hint for later). > * Initialize this field in the constror with: > > if (hints != null) { > directory = hints.get(Hints.EXTRA_CRS_DIRECTORY); > } > if (directory == null) { > // Cut and paste the code currently in getDefinitionsURL() > // which check the system property. Keep this field to null > // if the system property was not set. > } > super.hints.put(Hints.EXTRA_CRS_DIRECTORY, directory); The use of an absolute path may be trouble for GeoServer, allowed the directory hint to *be* a File as well. > * Check this "directory" private field in getDefinitionsURL(), in place > > of the code that previously checked for system property (now moved to > the constructor). So that all worked out, I am going to try this with GeoServer and write up the docs before bothering you for a code review. - http://docs.codehaus.org/display/GEOTDOC/01+Factory+and+Hint+Tutorial Cheers, Jody ------------------------------------------------------------------------- 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 Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel