Skip to main content
naming
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

how How to use ogr2ogr to reproject shapefile in pythonPython

I am trying to reproject the coordinate system of a shapefile.

I know I can do it in the OSGEO4W window as ogr2ogr -s_srs EPSG:27700 -t_srs EPSG:3857 C:/test/input.shp C:/test/output.tif

However, I want to be able to do this in pythonPython. I found this documentation but can't figure out how to achieve what I want

https://pcjericks.github.io/py-gdalogr-cookbook/vector_layers.html#create-a-new-shapefile-and-add-data

how to use ogr2ogr to reproject shapefile in python

I am trying to reproject the coordinate system of a shapefile.

I know I can do it in the OSGEO4W window as ogr2ogr -s_srs EPSG:27700 -t_srs EPSG:3857 C:/test/input.shp C:/test/output.tif

However, I want to be able to do this in python. I found this documentation but can't figure out how to achieve what I want

https://pcjericks.github.io/py-gdalogr-cookbook/vector_layers.html#create-a-new-shapefile-and-add-data

How to use ogr2ogr to reproject shapefile in Python

I am trying to reproject the coordinate system of a shapefile.

I know I can do it in the OSGEO4W window as ogr2ogr -s_srs EPSG:27700 -t_srs EPSG:3857 C:/test/input.shp C:/test/output.tif

However, I want to be able to do this in Python. I found this documentation but can't figure out how to achieve what I want

https://pcjericks.github.io/py-gdalogr-cookbook/vector_layers.html#create-a-new-shapefile-and-add-data

Source Link

how to use ogr2ogr to reproject shapefile in python

I am trying to reproject the coordinate system of a shapefile.

I know I can do it in the OSGEO4W window as ogr2ogr -s_srs EPSG:27700 -t_srs EPSG:3857 C:/test/input.shp C:/test/output.tif

However, I want to be able to do this in python. I found this documentation but can't figure out how to achieve what I want

https://pcjericks.github.io/py-gdalogr-cookbook/vector_layers.html#create-a-new-shapefile-and-add-data