Pyproj – How to Use Specific Transformation in Pyproj With Python

epsgpyprojpython

I have a specific transformation code that I would like to employ to transform one set of coordinates to another. Specifically the EPSG:15851 transformation. Is there a way to create a new Transform object in Pyproj with that code?

Alternatively is there a way to search for a specific EPSG Code in the list from:

from pyproj.transformer import TransformerGroup

tg = TransformerGroup(crs_from=4267, crs_to=4326)
tg.transformers()

The last line gives you a list of all the potential transformers for your conversion, but strangely the one I am looking for is not present. So I would like to skip the specification of the from_crs and to_crs in TransformerGroup() and just grab all of them and search for the specific one that I want.

Best Answer

>>> from pyproj import Transformer
>>> tr = Transformer.from_pipeline("EPSG:15851")
>>> tr
<Transformation Transformer: pipeline>
Description: NAD27 to WGS 84 (79)
Area of Use:
- name: United States (USA) - CONUS including EEZ -onshore and offshore - Alabama; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississippi; Missouri; Montana; Nebraska; Nevada; New Hampshire; New Jersey; New Mexico; New York; North Carolina; North Dakota; Ohio; Oklahoma; Oregon; Pennsylvania; Rhode Island; South Carolina; South Dakota; Tennessee; Texas; Utah; Vermont; Virginia; Washington; West Virginia; Wisconsin; Wyoming. US Gulf of Mexico (GoM) OCS.
- bounds: (-129.17, 23.81, -65.69, 49.38)
Related Question