Re: ogr2ogr: csv to shpefile (newby question)

Mateusz Łoskot <[email protected]>
Newsgroups gmane.comp.gis.freegis
Message-ID <[email protected]>
Tomas Zajc wrote:
> Is there any other (command line) application that can convert csv to
>  shapefiles? gen2shp only convert generate files that  can't contain 
> attributes.

Do you know some scripting language i.e. Python?
If you do, then it should not take much time to write a script
to convert your CSV to Shapefile.

Download pyshapelib, a Python wrapper for
Shapelib (http://shapelib.maptools.org):

http://hobu.biz/software/pyshapelib

Read your CSV file and split every line (record) using comma
delimiter. Then write coordinates (data from column you where have 
lat/lon) as Shape object, but other data to DBF - in fields of record 
for Shape object created formerly.

Writing scripts is a very nice fun :-)

Cheers
-- 
Mateusz Łoskot
http://mateusz.loskot.net

_______________________________________________
Freegis-list mailing list
[email protected]
https://intevation.de/mailman/listinfo/freegis-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.