3

I am trying to do a datum shift transformation using ogr2ogr on the Ubuntu Desktop 16.04 command line. All files, including the grid shift file, are in the same directory. I run the following command:

ogr2ogr -f "ESRI Shapefile" -s_srs "+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +nadgrids=ON83CSv1.gsb" -t_srs EPSG:26917 survey_marker_NAD83.shp survey_marker_csrs.shp

I get the following error:

ERROR 1: failed to load datum shift file Failed to reproject feature 0 (geometry probably out of source or destination SRS). ERROR 1: Terminating translation prematurely after failed translation of layer survey_marker_csrs (use -skipfailures to skip errors)

What am I doing wrong?

1 Answer 1

3

I solved it! In Linux you do not give the entire path to the grid file, just ./ will suffice. The following command worked:

ogr2ogr -f "ESRI Shapefile" -s_srs "+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +nadgrids=./ON83CSv1.gsb" -t_srs EPSG:26917 outfile.shp infile.shp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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