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

geoviews Path fails to render #759

Open
dwr-psandhu opened this issue Oct 23, 2024 · 1 comment
Open

geoviews Path fails to render #759

dwr-psandhu opened this issue Oct 23, 2024 · 1 comment

Comments

@dwr-psandhu
Copy link
Contributor

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
@holovizbot
Copy link

This issue has been mentioned on HoloViz Discourse. There might be relevant details there:

https://discourse.holoviz.org/t/error-for-geoviews-path/8362/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants