Skip to content

Issues with Projected Polygons when using hv.operation.datashader.rasterize with "bokeh" backend  #743

@philipc2

Description

@philipc2

ALL software version info

Mac OS, M1 Mac

GeoViews: '1.12.0'
HoloViews: 1.19.1'

Description of expected behavior and the observed behavior

I am looking to rasterize projected polygons using HoloViews. However, when I rasterize them, the projection appears to have been lost. This only occurs with the "bokeh" backend.

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

import holoviews as hv
import geoviews as gv
import cartopy.crs as ccrs


hv.extension("bokeh")

# GeoDataFrame with polygons already pre-projected 
gdf = ... 

projection = ccrs.Robinson()

out = gv.Polygons(gdf, crs=projection).opts(projection=projection, width=700, height=350, global_extent=True)

hv.operation.datashader.rasterize(out)

Screenshots or screencasts of the bug in action

Here is the plot of the gv.Polygons()

image

When I rasterize them, I get the following:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions