Add or update Fire Hydrants from Urdorf
Find a file
2024-11-25 21:03:55 +01:00
data first trials 2024-11-23 14:56:21 +01:00
.gitignore duplicate hydrants helper 2024-11-25 20:04:48 +01:00
.python-version first trials 2024-11-23 14:56:21 +01:00
find-duplicates-for-josm.py duplicate hydrants helper 2024-11-25 20:04:48 +01:00
find-duplicates.py duplicate hydrants helper 2024-11-25 20:04:48 +01:00
generate-josm.py remove coordinates check 2024-11-24 19:58:14 +01:00
LICENSE docs - license - cleanup 2024-11-24 21:54:22 +01:00
pyproject.toml duplicate hydrants helper 2024-11-25 20:04:48 +01:00
README.md document overpass duplicate query 2024-11-25 21:03:55 +01:00
uv.lock duplicate hydrants helper 2024-11-25 20:04:48 +01:00

Data Converter for Fire Hydrants in Urdorf

  1. Get data from Wasserversorgung Urdorf wasserversorgung@urdorf.ch
  2. Generate file for JOSM: python generate-josm.py data/Hydranten_Urdorf_202411.csv
  3. Import into JOSM and validate (see below)
  4. Upload data to OSM

Changesets:

External tools:

Links:

Data Format

CSV

Headers:

Nummer,Adresse,Druckzone,Hydranten-Art,Abgänge,Statischer Druck,Koordinaten X (N),Koordinaten Y (E)

Example:

100,Dorfstrasse 8,DZ,Ueberflur,55/55,9,1249302.23,2673915.37

Data Validation

Open the Filter window and use these filters:

# Check hydrants by type
type:node emergency=fire_hydrant fire_hydrant:type=pillar
type:node emergency=fire_hydrant fire_hydrant:type=underground

# Check pressure zones
"description"="Druckzone Dorfzone (DZ)"
"description"="Druckzone Hochzone (HZ)"

# Check specific tag combinations
type:node couplings:type=storz -fire_hydrant:type=pillar
type:node pillar:type=dry_barrel -fire_hydrant:type=pillar

# Check coupling values
type:node couplings=2 -"couplings:diameters"=~/.*;.*/

Run the JOSM validator:

  • Tools -> Validation -> Validate (or Ctrl+Shift+V)

Duplicates

The two scripts find-duplicates.py and find-duplicates-for-josm.py will help to find duplicates.

Or directly in Overpass:

[out:json][timeout:25];
area["name"="Urdorf"]->.searchArea;
node["emergency"="fire_hydrant"](area.searchArea)->.hydrants;
foreach .hydrants -> .current_hydrant (
  node(around.current_hydrant:10)["emergency"="fire_hydrant"]["@id"!="${id}"];
  if (count(nodes) > 1) {
    .current_hydrant out body;
  }
);

Overpass Query

Simple:

[out:json];
{{geocodeArea:"Urdorf"}}->.searcharea;
node["emergency"="fire_hydrant"](area.searcharea);
out;

Complex:

[out:csv(::"type",::"id","fire_hydrant:type","fire_hydrant:position",ref,::"lat",::"lon"; true; ",")];
//[out:json];

// Geografische Eingrenzung:
{{geocodeArea:"Urdorf"}}->.searcharea;

// Filtern der Objekte
(
  nwr["emergency"="fire_hydrant"](area.searcharea);
);

// Ausgabe (ggf. andere Ausgaben wählen durch Um-Kommentieren)
//out body; >; out skel qt;
//out center qt;
out;

Disclaimer

The tool was made using Anthropic Claude with some manual adjustments.