Greetings gt-devs,

to be able to use the default (unmodified) gt-referencing-8.4.jar, I
programmatically removed the registered CartesianAuthorityFactory from the
available authority factories, before stringifying:

// WORKAROUND: since gt-referencing-8.0, it is necessary to change authority
factory ordering to have 
//             CartesianAuthorityFactory with less priotity (or
unregistered) than WebCRSFactory!
final Set<CRSAuthorityFactory> factories =
ReferencingFactoryFinder.getCRSAuthorityFactories(null);
for (CRSAuthorityFactory factory : factories) {
  if (factory instanceof CartesianAuthorityFactory)
      ReferencingFactoryFinder.removeAuthorityFactory(factory);
}

// stringifying the SimpleFeature into GeoJSON
String geojson = fjson.toString(feature);


However, I am still interessed in learing how to order the available
authority factories programmatically before trying to stringify our
SimpleFeature's, that would be the much better approach. Ordering or
changing priority... Could someone please give me a hint?
e.g.:
ReferencingFactoryFinder.setAuthorityOrdering("Web", "Cartesian");
for CartesianAuthorityFactory having less priority than WebCRSFactory?

Regards,
João



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/order-of-authority-factories-causes-exception-in-CRS-lookupIdentifier-tp5019323p5019845.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
TUNE You got it built. Now make it sing. Tune shows you how.
http://goparallel.sourceforge.net
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to