You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allow_superseded calls proj_operation_factory_context_set_discard_superseded and creates a PJ object for ED50 to WGS 84 (15) with the PJ_TYPE_TRANSFORMATION when calling proj_create_operations.
Combining allow_superseded with always_xy causes an issue because the PJ object is PJ_TYPE_TRANSFORMATION. Due to this proj_coordoperation_is_instantiable returns True. However, proj_normalize_for_visualization returns a PJ object of type PJ_TYPE_CONCATENATED_OPERATION for ED50 to WGS 84 (15). This is the source of the error when attempting to create the Transformer.
frompyprojimportTransformerprint(Transformer.from_pipeline("ED50 to WGS 84 (15)").description)
"ED50 to WGS 84 (15)"
I modified the pyproj code to run proj_normalize_for_visualization on ED50 to WGS 84 (15) (cannot do this normally with the current release):
frompyproj._transformerimport_Transformer_Transformer.from_pipeline("ED50 to WGS 84 (15)", always_xy=True)
...
pyproj.exceptions.ProjError: Input is not a transformation.
This produces the error above.
@rouault is it expected for proj_normalize_for_visualization convert a PJ_TYPE_TRANSFORMATION into PJ_TYPE_CONCATENATED_OPERATION?
Example code
Ex. 1 TransformerGroup fails to list up available transformations when specifying both
always_xy
andallow_superseded
Outputs:
Ex.2 TransformerGroup should return
36
available transformations whenallow_superseded
not definedOutputs:
36
Ex.3 TransformerGroup should return
37
available transformations whenallow_superseded
is set toTrue
Outputs:
37
ct_lst = TransformerGroup("EPSG:4230", "EPSG:4326", allow_superseded=True).transformers
print(len(ct_lst))
Problem description
TransformerGroup
fails to a create a list of all available transformation objects when the user set bothalways_xy
andallow_superseded
equalsTrue
.Environment Information
pyproj version 3.6.1
python 3.11
Installation method
pip wheel
The text was updated successfully, but these errors were encountered: