GVZ Hydranten Finder App to GPX File Converter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Tobias Brunner 3ce64a2cce initial commit 2 months ago
.vscode initial commit 2 months ago
.gitignore initial commit 2 months ago
README.md initial commit 2 months ago
Swisstopo-REFRAME-Web-API.pdf initial commit 2 months ago
main.py initial commit 2 months ago
poetry.lock initial commit 2 months ago
pyproject.toml initial commit 2 months ago

README.md

Fire Hydrants Data Converter

NOTE: This information and scripts apply only to Kanton Zurich, Switzerland.

Unfortunately coordinates of fire hydrants are seemingly not common Open Data in Kanton Zurich. Stadt Zürich has a very nice Open Data strategy, data is openly accessible here https://data.stadt-zuerich.ch/dataset/geo_hydranten.

There is an Android App called GVZ Hydranten Finder which is able to display locations of fire hydrants on a map, but it's very limited and the data is seemingly not accessible.

But: The app has to have to data from somewhere. When extracting this data and feed it to this little Python script, the fire hydrants are then available as GPX file. The data is stored in an SQLite database locally. It is retrieved on startup from a Google Firebase database.

Get the data

  • Install the Android App
  • Start the App, the data is now downloaded
  • Copy the SQLite database to your computer, e.g. with adb pull /storage/1AD5-130B/hydrants_live.sqlite The data is located on the device under `/data/data/ ... TODO

Convert the data

Run the script python main.py <PLZ> > hydranten.gpx and you're done.

About the data and coordinates

The data is stored in a single table hydrants with the following columns:

  • id
  • status
  • easting
  • northing
  • abgaenge
  • installationsjahr
  • hydrantennummer
  • plz
  • ort
  • strasse

The coordinates are stored in LV95 format which needs to be converted to WGS95 to be compatible with the GPS format. This seems to be a conversion which isn't very accurate, so the position of the fire hydrants is not very accurate as well. But it seems to be "good enough".

Conversion of the coordinates happen with a local function, the source is from here: libracore/erpnextswiss/. This code is AGPLv3 licensed.

An alternative to convert the coordinates could be the REST service REFRAME of Swisstopo.