I'm having a problem with FileDataStoreFinder.getDataStore(). The code is as
follows:
[code]
System.out.println("Using GeoTools Version: " +
GeoTools.getVersion());
System.out.println("Country shapes done." +
getClass().getResource("/shapefiles/cntry08.shp"));
// get the shape file (or try to at least)
File countryShapes = new File(getClass().getResource(
"/shapefiles/cntry08.shp").getFile());
//"/shapefiles/cntry08.shp").getFile());
System.out.println(">>>>>>>>>> Country shapes done." +
countryShapes.getAbsolutePath());
File fortPolkShapes = new File(getClass().getResource(
"/shapefiles/fort_polk.shp").getFile());
//"/shapefiles/fort_polk.shp").getFile());
System.out.println(">>>>>>>>>> All shapes done." +
fortPolkShapes.getAbsoluteFile());
if (countryShapes.exists()) {
System.out.println("*** Loading Countries ShapeFile Data ***");
FileDataStore store = FileDataStoreFinder
.getDataStore(countryShapes);
if(store == null) {
System.out.println(">>>>>>>>> Store is null.");
}
etc...
[/code]
The file it is loading is there and it is valid, but
FileDataSToreFinder.getDataStore() keep returning null. I am using geotools
with Eclipse Juno, Springsource Tools, Maven, Roo, and running it on a server
with the latest version of tomcat. I am using version 2.7-M4 for geotools.
Why does getDataStore() keep running a null? Thanks in advance.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users