I'm not sure what the question is...

DataStore is the interface that declares methods that must be
implemented by the various kinds of data stores in Geotools
(ShapefileDataStore, PostgisDataStore, MemoryDataStore etc. etc.).

See: http://javadoc.geotools.fr/snapshot/org/geotools/data/DataStore.html

So if you only need to use the methods that are common to all data
stores you can do this...

DataStore myStore = new ShapefileDataStore( url );

Then later on if you are working with some other sort of data store
you can change that one line, e.g.

DataStore myStore = new PostgisDataStore(url);

...and the rest of your code stays the same.

>    ShapefileDataStore(file.toURL());. When i'm adding this i get an error
> saying cannot find symbol ...... symbol constructor ShapeFileDataStore
> ect...

Check that the upper / lower case is right in your code
(ShapefileDataStore, not ShapeFileDataStore) and that you have
included the shapefile module in your project.

Michael

-------------------------------------------------------------------------
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
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to