0

I'm trying to use Ogr2Ogr.exe to import some shapefiles. It came installed with QGIS 1.8. When I try and run it, i get the following error:

C:\Program Files (x86)\Quantum GIS Lisboa\bin>ogr2ogr -overwrite -f MSSQLSpatial "MSSQL:serve...<snip> 

ERROR 4: Unable to open EPSG support file gcs.csv. 
Try setting the GDAL_DATA environment variable to point to the 
directory containing EPSG csv files. 
ERROR 6: No translation an empty SRS to PROJ.4 format is known.

C:\Program Files (x86)\Quantum GIS Lisboa\bin>

Can anyone help?

It looks like it's an issue with some PATHS.

I just opened up a normal command prompt, when to that directory (listed above) and ran the command.

1 Answer 1

2

You might need to set your GDAL_DATA environment variable as the error message said. It's at C:\Program Files\Quantum GIS Lisboa\share\gdal if I'm not mistaken but do check on your machine.

To manage environment variables:

  1. Right-click My Computer, and then click Properties.
  2. Click the Advanced tab.
  3. Click Environment variables.
  4. Click one the following options, for either a user or a system variable:
    • Click New to add a new variable name and value.
    • Click an existing variable, and then click Edit to change its name or value.
    • Click an existing variable, and then click Delete to remove
3
  • @RK - is there some documentation which lists what environmental variables I should have set up / check that are set?
    – Pure.Krome
    Commented Sep 27, 2012 at 2:55
  • The error message explicitly stated GDAL_DATA. Do start with that. YOu might want to consult this too trac.osgeo.org/gdal/wiki/…
    – R.K.
    Commented Sep 27, 2012 at 2:58
  • Ta :) that was ze tricksies!
    – Pure.Krome
    Commented Sep 27, 2012 at 3:36

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.