Hi all!
I am pretty new to geotools and decided to start with the 2.5 Version.
My problem is to find those tablenames from which a simpleFeature can be build.
To simply build a SimpleFeature from every TableName and see what happens
proved to be a bad idea, I got about 20 Exceptions (Although it leads to
'valid' SimpleFeatures).
My code so far looks like this:
##################################
Map<String, Serializable> oraconnect = new HashMap<String, Serializable>();
oraconnect.put("dbtype", "oracle");
oraconnect.put("host", "xxx");
oraconnect.put("port", "1521");
oraconnect.put("instance", "xxx");
oraconnect.put("user", "xxx");
oraconnect.put("passwd", "xxx");
Iterator<DataStoreFactorySpi> iter1= DataStoreFinder.getAvailableDataStores();
while(iter1.hasNext()){
DataStoreFactorySpi factory = (DataStoreFactorySpi) iter1.next();
if (factory.canProcess(oraconnect)) {
try{
DataStore ds = factory.createDataStore(oraconnect);
String[] ftypes = ds.getTypeNames();
for (int j = 0; j < ftypes.length; j++) {
SimpleFeatureType sft = ds.getSchema(ftypes[j]);
}
ds.dispose();
}catch (Throwable warning ) {
System.out.println(factory.getDisplayName()+" failed:"+warning);
}
}
}
##################################
The exceptions occur in line
"SimpleFeatureType sft = ds.getSchema(ftypes[j]);"
starting at:
org.geotools.referencing.factory.epsg.ThreadedAccessEpsgFactory isAvailable
WARNUNG: Unavailable authority factory: European Petroleum Survey Group
org.opengis.referencing.FactoryException: Failed to connect to the EPSG
database.
at
org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:428)
.....
What is the appropriate way to find the tablenames that hold a Geometry-Column?
Is there maybe an API driven way to access the USER_SDO_GEOM_METADATA table?
Any help is appreciated!
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel