Transformer with MercatorAConversion with lat/lon of natural origin returns ProjError
See original GitHub issuelatlon_crs = CRS("EPSG:4326")
conv = MercatorAConversion(latitude_natural_origin=0.1, longitude_natural_origin=0.1)
merc_crs = ProjectedCRS(conversion=conv)
transform_func = Transformer.from_crs(latlon_crs, merc_crs, always_xy=True).transform
Problem description
The above code returns ProjError: Input is not a transformation.
If latitude_natural_origin=0
and longitude_natural_origin=0
, no error is returned.
Expected Output
No error.
Environment Information
- Output from:
pyproj -v
pyproj info:
pyproj: 3.3.1
PROJ: 9.0.0
data dir: /Users/kpenner/dev/pyproj/share/proj
user_data_dir: /Users/kpenner/Library/Application Support/proj
PROJ DATA (recommended version): 1.9
PROJ Database: 1.2
EPSG Database: v10.054 [2022-02-13]
ESRI Database: ArcMap 12.9 [2022-02-18]
IGNF Database: 3.1.0 [2019-05-24]
System:
python: 3.10.4 | packaged by conda-forge | (main, Mar 24 2022, 17:45:10) [Clang 12.0.1 ]
executable: /Users/kpenner/dev/pyproj/bin/python
machine: macOS-12.4-x86_64-i386-64bit
Python deps:
/Users/kpenner/dev/pyproj/lib/python3.10/site-packages/_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
certifi: 2022.05.18.1
Cython: None
setuptools: 62.3.2
pip: 22.1.2
Installation method
- conda
Conda environment information
Environment (
conda list
):
# Name Version Build Channel
proj 9.0.0 h2364a93_1 conda-forge
pyproj 3.3.1 py310h6c09501_0 conda-forge
Details about
conda
and system ( conda info
):
active environment : pyproj
active env location : /Users/kpenner/dev/pyproj
shell level : 2
user config file : /Users/kpenner/.condarc
populated config files : /Users/kpenner/.condarc
conda version : 4.12.0
conda-build version : not installed
python version : 3.7.12.final.0
virtual packages : __osx=10.16=0
__unix=0=0
__archspec=1=x86_64
base environment : /Users/kpenner/miniconda3 (writable)
conda av data dir : /Users/kpenner/miniconda3/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/osx-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/kpenner/miniconda3/pkgs
/Users/kpenner/.conda/pkgs
envs directories : /Users/kpenner/dev
/Users/kpenner/miniconda3/envs
/Users/kpenner/.conda/envs
platform : osx-64
user-agent : conda/4.12.0 requests/2.27.1 CPython/3.7.12 Darwin/21.5.0 OSX/10.16
UID:GID : 501:20
netrc file : None
offline mode : False
Issue Analytics
- State:
- Created a year ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
Transformer - pyproj 3.4.1 documentation - GitHub Pages
– If true, the transform method will accept as input and return as output coordinates using the traditional GIS order, that is longitude,...
Read more >Pyproj4 Pyproj Statistics & Issues - Codesti
Projecting numpy masked arrays returns plain numpy arrays, closed ... Transformer with MercatorAConversion with lat/lon of natural origin returns ProjError ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For completeness sake when creating CRS and exporting to WKT. This may be needed even if PROJ does not support it for transformations.
See MercatorBConversion
Thanks! I am thinking since it is invalid, a CRSError should be raised in the initialization around here.