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.

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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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
share|improve this answer
    
@RK - is there some documentation which lists what environmental variables I should have set up / check that are set? –  Pure.Krome Sep 27 '12 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. Sep 27 '12 at 2:58
    
Ta :) that was ze tricksies! –  Pure.Krome Sep 27 '12 at 3:36

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.