I need to be able to replicate with ogr2ogr a coordinate transformation that was executed in ArcGIS for Desktop.

Both ArcGIS and ogr2ogr are based on EPSG standard definition.

There's not only one way to transform data from a reference system A to a reference system B, but many transformations are possible (T1, T2 ... Tn).

After a lot of reading i understood that EPSG codes define, among many other things, CRS (coordinate reference systems, A and B in the previous example), and possible transformation between them (T1...Tn).

When in gis one performs a coordinate transformation ArcGIS prompts the user with the choice of a transformation. On the other side ogr2ogr simply works specifying the source and destination CRS.

two questions then arise:

  • what kind of transformation does ogr2ogr performs? is it still based on the transformation defined within the epsg standard?
  • Is it possible to force ogr2ogr to use a transformation specified via an epsg code?

please keep in mind that my goal is to replicate a transformation executed in gis (thus identified by an epsg code), with a call to ogr2ogr.

1 Answer 1


ogr2ogr provides 3 command line options dealing with coordinate systems

-a_srs srs_def:
    Assign an output SRS
-t_srs srs_def:
    Reproject/transform to this SRS on output
-s_srs srs_def:
    Override source SRS

The one you are looking for it -t_srs to transform, though you may also need -s_srs if your source data does not have it's coordinate system set correctly

To specify a coordinate system by an EPSG code you can use the format EPSG:nnnn

for example to transform a shapefile to EPSG 4326

ogr2ogr -f "ESRI Shapefile" output.shp input.shp -t_srs EPSG:4326 

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.