Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

What is the correct format of ogr2ogr for converting the ADF grid to SHP file? I tried this, but it fails.

$ ogr2ogr -where "OGR_GEOMETRY='Point'" -f "ESRI Shapefile" SHP.shp ADF.adf
share|improve this question
1  
is there an error? or do you just get an empty file? please add the output of orginfo SHP.shp aswell –  iant Jul 8 '13 at 7:41
    
FAILURE: Unable to open datasource 'ADF.adf' with the following drivers. –  wing suet cheung Jul 8 '13 at 8:11
    
that's the problem then - OGR doesn't know how to open your ADF file or your ADF file is broken –  iant Jul 8 '13 at 8:18
    
do not specify ADF.adf, just ADF in the command line option. –  klewis Jul 8 '13 at 18:36

1 Answer 1

Your command will fail on a couple of counts. Firstly ogr2ogr is used to convert between vector formats and not to convert raster (hdr.adf) to vector (shp). Secondly, the 'where' clause is an SQL selection statement to select a subset of your input vector data and not used to define the output geometry.

Try looking at the GDAL utilities instead. Unfortunately there isn't a handy utility to convert directly from a raster to a point shapefile, however you could use GDAL_translate to convert from the ADF to and XYZ format and then treat the XYZ as a CSV and convert to a shapefile if required.

OTOH if you are trying to open an ESRI Arc/Info vector Coverage then you need to be aware that it is not just a single file but a whole directory of files many of which have the '.adf' extension. OGR will not just open one of them, which is why you get an error. Reference the coverage not a subset of it. The PAR.adf file is just the tolerances file for a double precision Coverage (the equivalent of TOL.adf for single precision).

share|improve this answer
    
This adf is not in raster format. It is in vector. It includes par.adf file. QGIS can read it and save it in shp. But I look for a batch conversion. –  wing suet cheung Jul 8 '13 at 8:08
    
See my edited answer. –  MappaGnosis Jul 8 '13 at 12:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.