[gdal-dev] cannot open shape file created in linux in windows

Xiaodong Zhang xiaodong.zhang2 at und.edu
Tue Mar 18 00:40:32 EDT 2008


Hello Steve,

Thanks for offering help. Trying

ogr2ogr -f "ESRI Shapefile" grid.shp grid.vrt -nlt multipoint

I got error message, saying 'Unable to open data source grid.vrt with 
the following drivers', followed by a list of drivers, including ESRI 
Shapefile, CSV, among others.

Actually, I got the same error message when running ogrinfo -ro -al 
test.vrt, using the exact same example listed in the page you referred to,

http://www.gdal.org/ogr/drv_csv.html

Any idea?

Xiaodong

gaffigan at sfos.uaf.edu wrote:
> Hello.  You might try the following:
>   ogr2ogr -f "ESRI Shapefile" grid.shp grid.vrt -nlt multipoint
>
> The important part is that the source dataset is the vrt definition file,
> not the csv data file.  See http://www.gdal.org/ogr/drv_csv.html.
>
> Hopefully it's this easy.
>
> Steve
>
>
>   
>> Hi,
>>
>> I used --- ogr2ogr -f "ESRI Shapefile" grid grid.csv -nlt multipoint
>>     
> ----- to convert a series of points (in csv format) into a shape file of
> multiple points. I also have a grid.vrt and a grid.csvt file that are
> used in this conversion. A directory named grid was created and under it
> there are 3 files, namely, grid.shp, grid.dbf, and grid.shx. Using
> ogrinfo grid returns,
>   
>> INFO: Open of 'grid', using driver 'ESRI Shapefile" successful. 1:grid
>>     
> (multi point).
>   
>> Also using ogrinfo -ro -al grid returns a series of records, and the
>>     
> last one is
>   
>> OGRFeature (grid): 5374
>> long (Real) = -100.08310911830001
>> lat (Real) = 44.963133226799997
>> data (Real) = 3
>> mapped dat (Real) = 68.000000000
>>
>> The above commands were executed in Linux with gdal installed. After
>>     
> transferring grid folder to windows, I can open them, but nothing show
> up (I tried ENVI and FWTool). For example, in FWTool, it seemed that the
> shape file can be opened, but this is what showed in the Shape
>   
>> Attributes window,
>>
>> Where did I do wrong?
>>
>> Thanks
>> Xiaodong
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>     
>
>
>
>
>   



More information about the gdal-dev mailing list