You probably would not believe this but,
i added something of that nature onto my
DataStore myShapeFile = new ShapefileDataStore(file.toURI().toURL()) ;
code, and how i did it was simply reading the javadoc, when i hit the dot
operator it said about converting to uri then url.
Can i speak to the person who is reading my mind please!!!
cheers
Michael Bedward wrote:
>
>> 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
>
> OK, you must be using Java 6. Do this...
>
> File f = ...
> URL url = f.toURI().toURL();
>
> http://java.sun.com/javase/6/docs/api/java/io/File.html#toURL()
>
> 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-tp20548008p20552142.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