From: Jody G. <jga...@re...> - 2007-10-25 16:28:44
|
Hey DQ; You should really send these emails to geotools-users - that way other people can help. I am starting my work day and won't be getting back to you until next time I have some free time during a long build. The recent GeoTools Lab contains a CSV to Shape example that should be exactly what you are looking for: - http://www.foss4g2007.org/labs/L-13/ The workbook PDF is available for download; and all the examples are online. Jody #LIU DONGQUAN# wrote: > Dear Jody: > I have another question: > i want to use the Autoclust class of geotools. so i need to convert my data (.txt) to shapefile format. i tryied the write shapefile program on geotools website. but it did not work. i need to create shapefile just has cooridinates (X,Y). could you give me some examples? which geom type i should use? Multipoint? thank you very much. > > dq > > -----Original Message----- > From: Jody Garnett [mailto:jga...@re...] > Sent: 2007年10月25日 22:49 > To: #LIU DONGQUAN#; gt2-users > Subject: Re: [Geotools-gt2-users] Problem of reading shapefile > > #LIU DONGQUAN# wrote: > >> I replace the following lines: >> // Map connect = new HashMap(); >> // connect.put( "url", file.toURL() ); >> // DataStore dataStore = DataStoreFinder.getDataStore( >> connect ); >> by: >> ShapefileDataStore dataStore= new ShapefileDataStore(file.toURL()); >> it seems the program can work. Why? is it because of my jdk is 1.5 not >> 1.4? >> is there generics problem in line: connect.put("url", file.toURL())? >> >> > I bet the key "url" is wrong; what it should be? We may have to look at > the source code ;-) > Jody > |