Skip to content

Instantly share code, notes, and snippets.

@pangoSE
Created May 7, 2021 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pangoSE/7e57d5133d2b7c2e3d6f30417fc0be8b to your computer and use it in GitHub Desktop.
Save pangoSE/7e57d5133d2b7c2e3d6f30417fc0be8b to your computer and use it in GitHub Desktop.
Omars new gisdataapi for OpenStreetMap sample python code
#!/usr/bin/python3
# source https://forum.openstreetmap.org/viewtopic.php?pid=828538#p828538
# author: Wulf4096
import requests
from dataclasses import dataclass
@dataclass
class POI:
poiName: str
key: str
value: str
latitude: float
longitude: float
resp = requests.get("https://gisdataapi.cetler.se/", params={
"dataBaseName": "OSM",
"ApiKey": "omar-public",
"bufferType": "radius",
"centerPoint": "53.57003,9.95758",
"radius": "3000",
"key": "amenity",
"value": "restaurant;cafe;pub",
"data": "poi",
}).json()
for poi in resp:
print(POI(**poi))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment