Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have shapefile in EPSG:2834 and I want to reproject it into EPSG:4326. I am trying to use ogr2ogr in Windows; however, I get this failure output:

C:\Users\Nik\Desktop\Logan_Lines>ogr2ogr -t_srs epsg:4326 spans_4326 spans
Unable to open datasource `spans' with the following drivers.
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> SDTS
  -> TIGER
  -> S57
  -> DGN
  -> VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> NAS
  -> GML
  -> GPX
  -> KML
  -> GeoJSON
  -> Interlis 1
  -> Interlis 2
  -> GMT
  -> SQLite
  -> ODBC
  -> PGeo
  -> OGDI
  -> PostgreSQL
  -> MySQL
  -> XPlane
  -> AVCBin
  -> AVCE00
  -> DXF
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> VFK


I am hoping someone can tell me what I am doing wrong; I have little experience with this tool.

share|improve this question
up vote 5 down vote accepted

All that's happening, as far as I can see, is that it cannot find a file called spans. Make sure you provide the path to the file (either relative or absolute), and add the extension, which will be .shp in this case.

If you're still having problems, then it might be that you have a broken Shapefile, see if you can get useful information from ogrinfo, and try loading it into a GIS such as Quantum GIS.

share|improve this answer
Adding the extension worked. I was copying an example I found elsewhere that must have been wrong. Thank you much. – Nik Apr 10 '12 at 16:41
You may want to also turn off "Hide extensions for known file types" in Windows explorer. – RyanDalton Apr 10 '12 at 16:43
I have that off. – Nik Apr 10 '12 at 17:35
If the source file has no extension, you have to tell ogr2ogr which driver to use with -f "ESRI Shapefile" . – AndreJ Mar 8 at 7:29

Your Answer


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.