Re: ogr2ogr: csv to shpefile (newby question)

Mateusz Łoskot <[email protected]>
Newsgroups gmane.comp.gis.freegis
Message-ID <[email protected]>
Tomas Zajc wrote:
> I could finally install gdal and ogr on slackware. I'm now trying to convert 
> some csv to shapefiles. For that I'm using the following comand:
> 
>  ogr2ogr -f "ESRI Shapefile" out coal.csv
> 
> where coal csv is:
> 
> unknown,na,id,id2,mark,coalkey,coalkey2,x,y
> 0.000,0.000,1,1,7,87,87,76.90238,51.07161
> 0.000,0.000,2,2,7,110,110,78.53851,50.69403
> 0.000,0.000,3,3,3,112,112,83.22586,71.24420
> 
> I'm getting the following error:
> 
> ERROR 4: Unable to open out/coal.shp or out/coal.SHP

I've just checked on Windows and this command should work.
I use ogr2ogr from FWTools package (http://fwtools.maptools.org) as follows:

ogr2ogr -f "ESRI Shapefile" out.shp coal.csv

As a result I got *one* DBF file out.dbf with data from coal.csv.

> and an out directory with a coal.dbf file. I need to generate the three files.

You won't get 3 files, only 1 .dbf.

> Any suggestion?

I'd suggest you to report the problem on GDAL/OGR list:
[email protected]

(include version numbers of GDAL/OGR you are using)

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.