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

[Bug][Jupyter Widget]Polygon shifts when moving the map #2903

Open
RollingCP opened this issue Jan 10, 2025 · 2 comments
Open

[Bug][Jupyter Widget]Polygon shifts when moving the map #2903

RollingCP opened this issue Jan 10, 2025 · 2 comments
Assignees
Labels
jupyter keplergl for Jupyter

Comments

@RollingCP
Copy link

Describe the bug
I encountered this problem in Jupyter, but I think it applies to the engine.
I visualize a polygon (as a one-row geopandas df). The df is originally in the following crs

<Compound CRS: COMPD_CS["CH1903+ / LV95 + LN02 height",PROJCS["CH ...>
Name: CH1903+ / LV95 + LN02 height
Axis Info [cartesian|vertical]:
- [east]: Easting (metre)
- [north]: Northing (metre)
- [up]: Gravity-related height (metre)
Area of Use:
- undefined
Datum: CH1903+
- Ellipsoid: Bessel 1841
- Prime Meridian: Greenwich
Sub CRS:
- CH1903+ / LV95
- LN02 height

When I drag and move the base map, the relative position of the polygon to the base map shifts. It's very easy to observe when zoomed in. The issue persists after I re-project the df to other crs such as EPSG:3035 and EPSG:4326

To Reproduce
The GeoJSON file is uploaded (changed the extension to json, otherwise cannot upload).
gemeinde.json
Steps to reproduce the behavior:

gdf = gpd.read_file('path/to/gemeinde.geojson')
map = KeplerGl(height=600)
map.add_data(gdf_gem, 'gemeinde')
map

Expected behavior
I would expect the relative position between the polygon and the base map to be constant.

Environment (please complete the following information):

  • Python version: python3
  • keplergl Widget version: 0.3.6
@RollingCP RollingCP added the jupyter keplergl for Jupyter label Jan 10, 2025
@RollingCP RollingCP changed the title [Bug][Jupyter Widget]Polygon Shift When moving the map [Bug][Jupyter Widget]Polygon shifts when moving the map Jan 10, 2025
@ibgreen
Copy link
Collaborator

ibgreen commented Jan 10, 2025

Does your polygon have any elevation? That could explain why it seems to "shift".

@RollingCP
Copy link
Author

Does your polygon have any elevation? That could explain why it seems to "shift".

Hi Ib, thanks a lot for your reply! I looked into the coordinates and indeed found the third entries for elevation, and the polygon didn't shift after I drop those entries.

I wonder if the team can add an option for enabling/disabling elevation info. Currently there is height option, but it seems to be irrelevant to elevation.

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

No branches or pull requests

3 participants