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

HHNK peilgebieden URL not working #334

Closed
OnnoEbbens opened this issue Apr 15, 2024 · 1 comment
Closed

HHNK peilgebieden URL not working #334

OnnoEbbens opened this issue Apr 15, 2024 · 1 comment

Comments

@OnnoEbbens
Copy link
Collaborator

I try to download HHNK peilgebieden shapes using:

import nlmod

extent = (96500, 151000, 487000, 555000)
wb = "Hollands Noorderkwartier"
gdf = nlmod.read.waterboard.get_data(wb, data_kind="level_areas", extent=extent)

I get this error:

	"name": "Exception",
	"message": "Error code 400: Invalid or missing input parameters.",
	"stack": "---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
c:\\Users\\oebbe\\02_python\
lmod\\tests\\test_001_model.py in <cell line: 5>()
      3 extent = (96500, 151000, 487000, 555000)
      4 wb = \"Hollands Noorderkwartier\"
----> 5 gdf = nlmod.read.waterboard.get_data(wb, data_kind=\"level_areas\", extent=extent)

~\\02_python\
lmod\
lmod\\read\\waterboard.py in get_data(wb, data_kind, extent, max_record_count, config, **kwargs)
    561     # % download and plot data
    562     if server_kind == \"arcrest\":
--> 563         gdf = webservices.arcrest(
    564             url,
    565             layer,

~\\02_python\
lmod\
lmod\\read\\webservices.py in arcrest(url, layer, extent, sr, f, max_record_count, timeout, table, **kwargs)
     78     params[\"returnIdsOnly\"] = True
     79     url_query = f\"{url}/{layer}/query\"
---> 80     props = _get_data(url_query, params, timeout=timeout, **kwargs)
     81     params.pop(\"returnIdsOnly\")
     82     if \"objectIds\" in props:

~\\02_python\
lmod\
lmod\\read\\webservices.py in _get_data(url, params, timeout, **kwargs)
    229         code = data[\"error\"][\"code\"]
    230         message = data[\"error\"][\"message\"]
--> 231         raise (Exception(f\"Error code {code}: {message}\"))
    232     return data
    233 

Exception: Error code 400: Invalid or missing input parameters."

and these logs:

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): kaarten.hhnk.nl:443
DEBUG:urllib3.connectionpool:https://kaarten.hhnk.nl:443 "GET /arcgis/rest/services/ws/ws_peilgebieden_vigerend/MapServer?f=json HTTP/1.1" 200 2730
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): kaarten.hhnk.nl:443
DEBUG:urllib3.connectionpool:https://kaarten.hhnk.nl:443 "GET /arcgis/rest/services/ws/ws_peilgebieden_vigerend/MapServer/4/query?f=geojson&outFields=%2A&outSR=28992&where=1%3D1&spatialRel=esriSpatialRelIntersects&geometry=96500%2C487000%2C151000%2C555000&geometryType=esriGeometryEnvelope&inSR=28992&returnIdsOnly=True HTTP/1.1" 200 84

It seems to me that the URL (https://kaarten.hhnk.nl/arcgis/rest/services/NHFLO/Peilgebied_beheerregister/MapServer) is not working anymore or at least not as it used to. See also issue #320 for previous problems.

OnnoEbbens added a commit that referenced this issue Apr 17, 2024
OnnoEbbens added a commit that referenced this issue Apr 19, 2024
@OnnoEbbens
Copy link
Collaborator Author

fixed in the dev branch

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