Speeding up projected maps in geoviews?
See original GitHub issueI’m visualizing public Landsat data with hvplot.xarray
but I think this is likely a geoviews
issue.
It takes about 3 seconds to render an image when not using the crs
:
It takes about 3 minutes to render an image when using the crs
:
Without crs
it’s using my dask cluster, but with crs
it does not use the cluster.
This is the code I’m using:
import rasterio
import xarray as xr
import hvplot.xarray
from dask.distributed import Client, progress
import cartopy.crs as ccrs
client = Client()
image_url = 'https://storage.googleapis.com/gcp-public-data-landsat/LC08/01/047/027/LC08_L1TP_047027_20130421_20170310_01_T1/LC08_L1TP_047027_20130421_20170310_01_T1_B4.TIF'
da = xr.open_rasterio(image_url, chunks={'band': 1, 'x': 2048, 'y': 2048})
band1 = da.sel(band=1).persist()
display(band1.hvplot(rasterize=True, width=600, height=400, cmap='viridis'))
crs = ccrs.UTM(zone='10n')
display(band1.hvplot(crs=crs, rasterize=True, width=600, height=400, cmap='viridis'))
Here is the notebook.
Is this expected?
Is there anything I can do to speed up visualization with crs
specified?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:18 (18 by maintainers)
Top Results From Across the Web
Speeding up projected maps in geoviews? · Issue #230 - GitHub
I'm visualizing public Landsat data with hvplot.xarray but I think this is likely a geoviews issue. It takes about 3 seconds to render...
Read more >Projections — GeoViews 1.9.5+g5eb9cd4-dirty documentation
The GeoViews package provides a library of HoloViews Element types which make it very easy to plot data on various geographic projections and...
Read more >python 3.x - Displaying Paths with Geoviews - Stack Overflow
I'm trying to use geoviews to display a path. I can get it to display ONLY the points properly: import numpy as np...
Read more >Interactive maps — Environmental Simulation Modelling
Interactive maps¶. In this notebook, we will explore other capabilities of the hvPlot ecosystem. The associated functions allow to create plots with many ......
Read more >Fancy Folium - Kaggle
My main aim was to produce interactive maps and I started off with libraries that used shapefiles such as geoviews (http://geo.holoviews.org/), this was...
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 FreeTop 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
Top GitHub Comments
I’ve opened https://github.com/pyviz/hvplot/pull/106 to add the project=True/False argument to hvplot.
Okay, I’m now wondering whether hvplot is doing something quite suboptimal, using geoviews directly things are pretty quick:
It seems like hvplot is projecting before rasterizing, which would explain the slow speed.