3

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
FAILURE:
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

C:\Users\Nik\Desktop\Logan_Lines>

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

1 Answer 1

6

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.

1
  • If the source file has no extension, you have to tell ogr2ogr which driver to use with -f "ESRI Shapefile" .
    – AndreJ
    Mar 8, 2016 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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