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

Projection issue in backgroundmaps #240

Closed
dbrakenhoff opened this issue Aug 24, 2023 · 2 comments
Closed

Projection issue in backgroundmaps #240

dbrakenhoff opened this issue Aug 24, 2023 · 2 comments
Assignees

Comments

@dbrakenhoff
Copy link
Collaborator

When adding a backgroundmap the result is shifted slightly relative to data that was already in the EPSG:28992 coordinate reference system. By supplying the correct CRS proj string this issue is fixed. nlmod uses this new modified CRS string by default.

Old:
image

New:
image

Fix from this issue: https://gis.stackexchange.com/questions/348339/using-crs-epsg3857-but-misalignment-between-stamen-background-and-coordinates-o

@dbrakenhoff dbrakenhoff self-assigned this Aug 24, 2023
dbrakenhoff added a commit that referenced this issue Aug 24, 2023
- add custom crs definition string
dbrakenhoff added a commit that referenced this issue Aug 25, 2023
fix Projection issue in backgroundmaps #240
@dbrakenhoff
Copy link
Collaborator Author

Closed by #241

@dbrakenhoff
Copy link
Collaborator Author

dbrakenhoff commented Sep 19, 2024

For future reference:

import nlmod

extent = [110_000, 120_000, 485_000, 495_000]
ds = nlmod.get_ds(extent, crs=28992)
gdf_opp_water = nlmod.read.rws.get_gdf_surface_water(ds)

f, ax = nlmod.plot.get_map(ds.extent)
gdf_opp_water.plot(hatch="///", facecolor="none", ax=ax)
nlmod.plot.add_background_map(ax=ax, crs=28992)

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

1 participant