I wrote a Python script reprojecting points from a source coordinate reference system (SCRS) to a target one (TCRS) both identified by an EPSG code. I would like my python script to retrieve details about the grid shift file it uses when doing reprojections from NAD83 to NAD27.

Such information is given by CS2CS in a terminal window when the variable PROJ_DEBUG is set to ON.

Can my python script retrieve the same information? Any ideas?


My script is:

from osgeo import osr

#Input coordinates
xin = 436898.0
yin = 5577554.0

# Transformation setup from NAD83 UTM Z15 to NAD27 UTM Z15
srs = osr.SpatialReference()
trs = osr.SpatialReference()
rsTrans = osr.CoordinateTransformation(srs,trs)

# Doing transformation
(xout, yout, zout) = rsTrans.TransformPoint(xin,yin)

Your Answer

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

Browse other questions tagged or ask your own question.