Oh i see,

   how silly of me, apologise, it's making more sense. I got confused when i
was reading about the different datastores, it tripped me over if u will. 

I added the new ShapefileDataStore(file.toURI()) section, but when
selectting the toURI i get an error of a cannot find symbol message. I also
noticed that URL is deprecated which i understand programmers should avoid
using.  Although, when i do add this, i get a line going through the words
of toURL

Yes, i have also added the shapefile plugin on my pom.xml
 

 

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

-- 
View this message in context: 
http://www.nabble.com/Datastore-and-ShapefileData-Store-tp20548008p20551789.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