All,
I've had a handful of classes that have implemented the Geodetic Calculator to compute distances that have worked fine for a few months. On recent runs, I started getting a stack of errors when instantiating the calculator to the same CRS that I was using before.
The CRS is:
GEOGCS["GCS_Assumed_Geographic_1",
DATUM["D_North_American_1927",
SPHEROID["Clarke_1866", 6378206.4, 294.9786982]],
PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295],
AXIS["Lon", EAST],
AXIS["Lat", NORTH]]
When instantiating a calculator with:
calculator = new GeodeticCalculator(this.crs);
I get:
WARNING: Unavailable authority factory: European Petroleum Survey Group
org.opengis.referencing.FactoryException: Failed to connect to the EPSG database.
at org.geotools.referencing.factory.epsg.DefaultFactory.createBackingStore(DefaultFactory.java:335)
at org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:188)
at org.geotools.referencing.factory.BufferedAuthorityFactory.isReady(BufferedAuthorityFactory.java:206)
at org.geotools.referencing.factory.DeferredAuthorityFactory.isReady(DeferredAuthorityFactory.java:176)
at org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:86)
at javax.imageio.spi.FilterIterator.advance(Unknown Source)
at javax.imageio.spi.FilterIterator.<init>(Unknown Source)
at javax.imageio.spi.ServiceRegistry.getServiceProviders(Unknown Source)
at org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:126)
at org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:223)
at org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:202)
at org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:95)
at org.geotools.referencing.FactoryFinder.getCoordinateOperationAuthorityFactory(FactoryFinder.java:405)
at org.geotools.referencing.operation.AuthorityBackedFactory.getAuthorityFactory(AuthorityBackedFactory.java:124)
at org.geotools.referencing.operation.AuthorityBackedFactory.isReady(AuthorityBackedFactory.java:238)
at org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:86)
at javax.imageio.spi.FilterIterator.advance(Unknown Source)
at javax.imageio.spi.FilterIterator.<init>(Unknown Source)
at javax.imageio.spi.ServiceRegistry.getServiceProviders(Unknown Source)
at org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:126)
at org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:223)
at org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:202)
at org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:95)
at org.geotools.referencing.FactoryFinder.getCoordinateOperationFactory(FactoryFinder.java:280)
at org.geotools.referencing.GeodeticCalculator.<init>(GeodeticCalculator.java:292)
=========
I can still create a default (WGS84) calculator with the constructor:
calculator = new GeodeticCalculator();
Is the previous constructor invoking a factory that is connecting to something? I don't think I altered any other code that would have involved this error. Above my head here by a longshot. Any tips/solutions?
Also, for my own knowledge/testing purposes, is there a way to get an instance of various CRS's? Right now, I'm pulling them from shapefile .prj files, but is there a way to generate an instance with a static reference of some kind?
Thanks for any help,
Jeff
------------------------------------------------------------------------- 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-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
