From: fx5900 <luo...@ho...> - 2008-11-17 20:56:51
|
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. |