From: <dz...@re...> - 2005-03-17 04:00:56
|
Martin, I like this trade off particularily because it does not involve a large dependency, follows an existing pattern frequenctly used in Java, and a large part of the 'guts' of the solution ship with java 1.4.2. I am also assuming that should Java Preferences be required, the solution would make use of User Preferences (as opposed to system prefs) for us linux users. Thanks for taking on this experiment Martin, +1 David Quoting Martin Desruisseaux <mar...@no...>: > The code suggest that about 20 lines in Geotools of code in Geotools is > enough to get the desired functionality. If it is all the price to paid > for avoiding a dependency to an other JAR, I think it worth it. > > Some changes proposal: > > - For Map's keys, use RenderingHints.Key instead of Class. > > Pro: - Uses an already know hints framework from J2SE. > - Type safety. > - Provides a mechanism for checking value validity. > - Works with Java2D and Java Advanced Imaging. For example we > can fetch hints from a PlanarImage in order to know which > CoordinateOperationFactory to use for reprojecting the image. > > Con: - "RenderingHints.Key" may be confusing since we would not use > it only for rendering. > > > - When no hints are provided, still fallback on ServiceRegistry > instead of invoking directly 'new FooFactory()'. > > > If you agree, I will start the branch in about 2 hours and add yours > code in a new org.geotools.factory.FactoryRegistry method. > > Martin. > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Geotools-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-devel > |