On Tue, Feb 26, 2013 at 8:25 PM, geotools newbie
<[email protected]>wrote:
> 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.
>
Hum... I have no clue, but it's not hard to debug step by step into
FileDataStoreFinder and see for yourself what the problem is
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
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