Consistency of crs.is_geographic between different EPSG representations
See original GitHub issueWhen creating an EPSG:4326 projection using a proj4 string, the value of the proj.crs.is_geographic
property depends on whether definition_string()
or crs.to_proj4(4)
was used for initialization.
In [1]: import pyproj
In [2]: pyproj.Proj('EPSG:4326').crs.is_geographic
Out[2]: True
In [4]: pyproj.Proj('EPSG:4326').crs.to_proj4(4)
Out[4]: '+proj=longlat +datum=WGS84 +no_defs +type=crs'
In [5]: pyproj.Proj('EPSG:4326').definition_string()
Out[5]: 'proj=longlat datum=WGS84 no_defs ellps=WGS84 towgs84=0,0,0'
In [6]: pyproj.Proj(pyproj.Proj('EPSG:4326').crs.to_proj4(4)).crs.is_geographic
Out[6]: True
In [7]: pyproj.Proj(pyproj.Proj('EPSG:4326').definition_string()).crs.is_geographic
Out[7]: False
It seems like the extra towgs84=0,0,0
parameter in the definition_string
causes the problem. Shouldn’t this be consistent? Or is this just another example of losing information when converting CRSes to proj4 strings?
pyproj version is 2.1.3.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Well-known text representation of coordinate reference systems
A coordinate transformation operates between two coordinate reference ... of the geodetic CRS to which the prime meridian is an attribute is geographic, ......
Read more >Understand EPSG, WKT and Other CRS Definition Styles
Well-known Text ( WKT ) is a for compact machine- and human-readable representation of geometric objects. It defines elements of coordinate ...
Read more >Earth, Ellipsoid, Datum, Coordinate Reference System (CRS ...
An ellipsoid has different ways to position itself relative to Earth ... This type of CRS is Geographic Coordinate System with coordinate unit...
Read more >Well-known text representation of coordinate reference systems
Well-known text representation of coordinate reference systems (WKT or WKT-CRS) is a text markup language for representing spatial reference systems and ...
Read more >OGR Coordinate Reference Systems and Coordinate ... - GDAL
Furthermore, any geographic CRS in the EPSG database can be set by its GCS code number if ... class is used for translating...
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
Not a problem 👍. The solution is in master now if you want to give it a try.
@snowman2 Thanks for looking into it!