Hi,

    in the 09Shapelab tutorial there is a line of code ShapefileDataStore
shapefile = new
    ShapefileDataStore(file.toURL());. When i'm adding this i get an error
saying cannot find symbol ...... symbol constructor ShapeFileDataStore
ect... I did some research and found the api 
http://udig.refractions.net/files/docs/api-geotools/org/geotools/data/shapefile/ShapefileDataStore.html#ShapefileDataStore(java.net.URL)

and when looking at the api for the constructor it says

url - The URL of the shp file to use for this DataSource.

I also read on the user guid about data stores and i says that it has an
implementation of ShapefilDataStore however in the code it does not use this
it uses, 

DataStore dataStore = DataStoreFinder.getDataStore(map );

does this mean i can't use the ShapefileDataStore?? but instead i must use
DataStore?

i ended up changing my code to this:

  File file = new File("C:/Cavendish map/datamap_01_data.shp");
  Map map = new HashMap();
         map.put("url", file.toURI());
         
DataStore myDataStore = DataStoreFinder.getDataStore(map);

Chheers

-- 
View this message in context: 
http://www.nabble.com/Datastore-and-ShapefileData-Store-tp20548008p20548008.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to