Date
1 - 3 of 3
Problem with passing CRS to warpedVRT
stefan.jozefowicz@...
I am getting the folllowing error when I am trying pass a crs object to WarpedVRT
``` rasterio.errors.CRSError: The PROJ4 dict could not be understood. OGR Error code 5
``` my code: ``` import rasterio``` My setup - Ubuntu 20, rasterio 1.2.10, GDAL 3.3.2. Any help will be greatly appreciated |
|
Sean Gillies
Hi, If I read your code correctly, you are misusing the WarpedVRT constructor. You are passing a dict as the second positional argument to WarpedVRT(). This ends up being bound to the name src_crs in https://github.com/rasterio/rasterio/blob/master/rasterio/_warp.pyx#L820 and then can't be understood by PROJ as a CRS. That is invalid usage. Instead, try with WarpedVRT(mr, **output_params) as vrt: This unpacks the dict into the separate keyword arguments that the constructor expects. On Sun, Jan 2, 2022 at 2:25 PM <stefan.jozefowicz@...> wrote: I am getting the folllowing error when I am trying pass a crs object to WarpedVRT --
Sean Gillies |
|
stefan.jozefowicz@...
Thank you, that indeed solves the problem. Much appreciated, big fan of your work!
|
|