Andrea Aime a écrit :
> In Geoserver we do use only the system properties, never the hints.
> The issue is, all of Geoserver is using CRS to perform its work, so the
> only way to force axis order application wide is to set the system 
> property.
> Is there any other global way to set these hints? CRS is used directly
> by renderer, by datastores, and in many other places in Geoserver,
> Eclipse is giving me 153 references to CRS in the Geoserver workspace 
> (which means, Geoserver code + geotools code used by geoserver).
> Maybe a way to provide CRS with standard hints is needed?

There is no global hints at this time. We could add global hints for the CRS 
convenience class, but I'm not sure that it would have much value over system 
properties. Despite what I said in my previous email, I would rather stay with 
system properties if an application really want system-wide configuration.

The idea with hints was to avoid system-wide configuration. We can have 
application-wide configuration, but not system-wide in order to allows 
different 
application to use Geotools in the same JVM. But maybe there is not a strong 
need for that yet.

For application-wide configuration, the idea was to put the following in some 
application global class (not in CRS, since it would be geotools-wide which we 
don't want).

     static final Hints myGlobalHints = new Hints();
     static {
         myGlobalHints.put(Hints.MY_HINT, myGlobalValue);
         myGlobalHints.put(Hints.MY_OTHER_HINT, myOtherGlobalValue);
         // etc...
     }

Then, gives this hints in every place where your application invokes 
FactoryFinder.getFooFactory(...).

     myFooFactory = FactoryFinder.getFooFactory(MyGlobalClass.myGlobalHints);

        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
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to