Orthographic projection not working with rasterize=True
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 124
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
I'm not sure if this is a bug or if I'm doing something wrong, but when I try to use cartopy's `crs.Orthographic()` projection, I get this warning:
```
/mamba/envs/viz/lib/python3.10/site-packages/datashader/glyphs/quadmesh.py:659: RuntimeWarning: invalid value encountered in cast
xs = (xscaled * plot_width).astype(int)
/mamba/envs/viz/lib/python3.10/site-packages/datashader/glyphs/quadmesh.py:660: RuntimeWarning: invalid value encountered in cast
ys = (yscaled * plot_height).astype(int)
/mamba/envs/viz/lib/python3.10/site-packages/datashader/glyphs/quadmesh.py:659: RuntimeWarning: invalid value encountered in cast
xs = (xscaled * plot_width).astype(int)
/mamba/envs/viz/lib/python3.10/site-packages/datashader/glyphs/quadmesh.py:660: RuntimeWarning: invalid value encountered in cast
ys = (yscaled * plot_height).astype(int)
```
And my map looks like this:
However, if I remove `rasterize=True`, everything seems to work:
Here's the code I used to create the first map:
```
import hvplot.xarray
import numpy as np
import xarray as xr
from cartopy import crs
ds = xr.tutorial.open_dataset('ersstv5').isel(time=0)["sst"]
ds.hvplot.quadmesh(
project=True,
geo=True,
rasterize=True,
dynamic=True,
projection=crs.Orthographic(),
)
```
Versions:
- hvplot : 0.8.4
- numpy : 1.24.4
- xarray : 2023.8.0
- cartopy : 0.22.0
- datashader : 0.15.2
Contributor guide
Assessment
This issue has not been assessed yet.