Skip to content

geoviews Path fails to render  #759

Description

@dwr-psandhu

ALL software version info

Software Version Info
# Name                    Version                   Build  Channel
geoviews                  1.13.0               hd8ed1ab_0    conda-forge
geoviews-core             1.13.0             pyha770c72_0    conda-forge
holoviews                 1.19.1             pyhd8ed1ab_0    conda-forge
geopandas                 1.0.1              pyhd8ed1ab_1    conda-forge
geopandas-base            1.0.1              pyha770c72_1    conda-forge

Should render but fails with error

Conversation started on discourse https://discourse.holoviz.org/t/error-for-geoviews-path/8362/1

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

# %%
import geopandas as gpd
import geoviews as gv

gv.extension("bokeh")
import cartopy.crs as ccrs

# %%
gdf = gpd.read_file("some_channels.geojson")
# %%
gv.Path(gdf).opts(width=400, height=500)

The data file is used is here

Stack traceback and/or browser JavaScript console output

geoviews\data\geopandas.py:517, in GeoPandasInterface.split(cls, dataset, start, end, datatype, **kwargs)
    514 gt = geom_type or get_geom_type(geom)
    516 arr = geom_to_array(geom)
--> 517 d = {xdim.name: arr[:, 0], ydim.name: arr[:, 1]}
    518 d.update({vd.name: row[vd.name] for vd in dataset.vdims})
    519 ds.data = [d]

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions