Date
1 - 2 of 2
Understanding `+wktext` more
I posted this originally on github, but have moved it here at Sean's request. Additional details of this question/issue are discussed in the `pyproj` repository [here](https://github.com/pyproj4/pyproj/issues/357).
I discovered that `nsper` and `ob_tran` projections required the `+wktext` parameter to be accepted by rasterio's `CRS` objects. It wasn't a big deal to add this until recently where I started using pyproj's `CRS` objects as my library's container for CRS information. Using pyproj 2.0+ and its `CRS` objects, the `+wktext` of my PROJ dictionary is being ignored/removed. This means that doing `rasterio.crs.CRS.from_dict(CRS.to_dict())` fails because rasterio needs the `+wktext` parameter.
I'm not sure if this should be considered a bug in pyproj or in rasterio or not a bug at all. I found the related issues in this repository that mentioned `+wktext` but I had trouble understanding what it was for and why it was needed. Any help and information would be appreciated.
## Examples
|
|
Sean Gillies
Hi, On Mon, Jul 1, 2019 at 9:54 AM David Hoese <dhoese@...> wrote:
The latest version of pyproj uses PROJ version 6, which is based on WKT (version 2) and not on the old PROJ.4 key/value representation of projections. I think +wktext may be gone from PROJ 6 as its no longer needed to carry extra WKT information into the PROJ.4 realm. If you really want to use the pyproj.CRS class like this, you'll need to seek help from that project. Furthermore dicts are no longer the highest fidelity interface between pyproj and rasterio. To make a rasterio CRS object from a pyproj CRS object, export WKT (version 1) from the latter [1] and send that to rasterio.crs.CRS.from_wkt(). I haven't tested this, but am confident that it's the best approach. Sean Gillies |
|