Skip to content

Commit

Permalink
Update url for level areas of noorderzijlvest
Browse files Browse the repository at this point in the history
And improve test
  • Loading branch information
rubencalje committed Nov 16, 2023
1 parent 34275ec commit 3a363fc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
11 changes: 8 additions & 3 deletions nlmod/read/waterboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,17 @@ def get_configuration():
config["Noorderzijlvest"] = {
"bgt_code": "W0647",
"watercourses": {
"url": "https://arcgis.noorderzijlvest.nl/server/rest/services/Legger/Legger_Watergangen_2012/MapServer",
# "url": "https://arcgis.noorderzijlvest.nl/server/rest/services/Legger/Legger_Watergangen_2012/MapServer",
"url": "https://arcgis.noorderzijlvest.nl/server/rest/services/Watergangen/Watergangen/MapServer",
"layer": 1, # primair
# "layer": 2, # secundair
"bottom_height": [["IWS_AVVHOBOS_L", "IWS_AVVHOBES_L"]],
"bottom_width": "AVVBODDR",
"index": "OVKIDENT",
},
"level_areas": {
"url": "https://arcgis.noorderzijlvest.nl/server/rest/services/Peilbeheer/Peilgebieden/MapServer",
"layer": 3,
"url": "https://arcgis.noorderzijlvest.nl/server/rest/services/VenH/Peilgebieden/MapServer",
"layer": 2,
"index": "GPGIDENT",
"summer_stage": "OPVAFWZP",
"winter_stage": "OPVAFWWP",
Expand Down
7 changes: 5 additions & 2 deletions tests/test_008_waterschappen.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ def test_download_peilgebieden(plot=True):
cmap = "viridis"
for wb in waterboards.index:
if wb in gdf:
# gdf[wb].plot(ax=ax, zorder=0)
gdf[wb].plot("winter_stage", ax=ax, zorder=0, norm=norm, cmap=cmap)
try:
# gdf[wb].plot(ax=ax, zorder=0)
gdf[wb].plot("winter_stage", ax=ax, zorder=0, norm=norm, cmap=cmap)
except Exception as e:
print(f"plotting of {data_kind} for {wb} failed: {e}")
c = waterboards.at[wb, "geometry"].centroid
ax.text(c.x, c.y, wb.replace(" ", "\n"), ha="center", va="center")
nlmod.plot.colorbar_inside(
Expand Down

0 comments on commit 3a363fc

Please sign in to comment.