Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPSG codes are failing in process_crs #1329

Closed
1 task done
jsignell opened this issue Apr 23, 2024 · 1 comment · Fixed by #1330
Closed
1 task done

EPSG codes are failing in process_crs #1329

jsignell opened this issue Apr 23, 2024 · 1 comment · Fixed by #1330
Labels
geo type: bug Something isn't working
Milestone

Comments

@jsignell
Copy link
Member

ALL software version info

hvplot.__version__ = '0.9.2' 
geoviews.__version__ = '1.11.1' 
rasterio.__version__ = '1.3.9' 
xarray.__version__ = '2024.3.0' 
cartopy.__version__ = '0.22.0' 
pyproj.__version__ = '3.6.1' 

Description of expected behavior

process_crs should work for all EPSG codes. This works when using cartopy.crs directly:

import cartopy.crs as ccrs

ccrs.epsg(6933)

I think this was introduced in #1139

Complete, minimal, self-contained example code that reproduces the issue

from hvplot.util import preprocess_crs

preprocess_crs(6933)

Stack traceback and/or browser JavaScript console output

---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
Exception: Unknown projection cea

The above exception was the direct cause of the following exception:

ValueError                                Traceback (most recent call last)
Cell In[64], line 3
      1 from hvplot.util import process_crs
----> 3 process_crs(6933)

File [/srv/conda/envs/notebook/lib/python3.11/site-packages/hvplot/util.py:288](https://hub.openveda.cloud/srv/conda/envs/notebook/lib/python3.11/site-packages/hvplot/util.py#line=287), in process_crs(crs)
    285     except Exception as e:
    286         errors.append(e)
--> 288 raise ValueError(
    289     "Projection must be defined as a EPSG code, proj4 string, "
    290     "WKT string, cartopy CRS, pyproj.Proj, or pyproj.CRS."
    291 ) from Exception(*errors)

ValueError: Projection must be defined as a EPSG code, proj4 string, WKT string, cartopy CRS, pyproj.Proj, or pyproj.CRS.

Screenshots or screencasts of the bug in action

  • I may be interested in making a pull request to address this
@jsignell
Copy link
Member Author

I will have a PR up shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
geo type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants