User:Flo2154/Import von Hydranten in Kirchzarten

From OpenStreetMap Wiki
Jump to navigation Jump to search

Import von Hydranten in Kirchzarten is an import of fire hydrants from the hydranten_ewk.kml dataset covering the municipality of Kirchzarten. The import is currently (as of 2025-01-09) at the dropped stage.

Goals

In the OSM community forum (link to thread), user KS-Brandschutz provided a KML file containing 309 fire hydrants (link to specific post), acquired from the local water supply company (link to specific post). They shall be imported into OpenStreetMap.

Schedule

  • 2025-01-03: KS-Brandschutz created the OSM community post.
  • 2025-01-04: flo2154 created this wiki page and notified the OSM community about the import.
  • 2025-01-05: KS-Brandschutz commented on the original post that he will add the hydrants manually, so the import will not be pursued further.
  • 2025-01-18 (estimated): If no objections arise, import will be executed then.

Import Data

Background

Data source site: https://nextcloud.ks-brandschutz.com/index.php/s/WWs34dpCo5i2LGQ (via https://community.openstreetmap.org/t/hydranten-hinzufugen/123792/11)
Data license: Unknown
Link to permission: https://community.openstreetmap.org/t/hydranten-hinzufugen/123792/13
OSM attribution: apparently not needed
ODbL Compliance verified: no

OSM Data Files

https://raw.githubusercontent.com/FloEdelmann/osm-hydrant-import/refs/heads/main/data/osm-data.geojson

Import Type

The import will be performed one time in a single changeset via JOSM, using the GeoJSON file above.

Data Preparation

Data Reduction & Simplification

  • Since all hydrants are points, no geometry simplification needs to be performed.
  • Since only 309 hydrants are included, no points will be excluded.
  • Not all attributes from the KML file are included in the GeoJSON file, see below.

Tagging Plans

All tags except emergency=fire_hydrant and fire_hydrant:type=* are up for debate.

Changeset Tags

Fill in the values your changesets will use.

Key Value
comment Import von Hydranten in Kirchzarten
import yes
source Energie- und Wasserversorgung Kirchzarten GmbH
source:url https://nextcloud.ks-brandschutz.com/index.php/s/WWs34dpCo5i2LGQ
import:page https://wiki.openstreetmap.org/w/User:Flo2154/Import_Hydrants_Kirchzarten
source:license unknown

Data Transformation

The KML file is transformed into a GeoJSON file with custom code: https://github.com/FloEdelmann/osm-hydrant-import

It roughly does the following, for each hydrant separately:

  • getCoordinates: Parse coordinates.
  • getAttributes: Assert that there are no hydrants with invalid attributes.
  • getOsmHydrantType: Convert BAUART value to fire_hydrant:type=* value.
  • getOsmStartDate: Read EINBAUJAHR value (if exists), assert that it conforms to the YYYY/MM/DD format, and only return the year for start_date=*.
  • getOsmDiameter: Read NENNWEITE1, NENNWEITE2, NENNWEITE3, NENNWEITE4, NENNWEITE5, NENNWEITE6 and NENNWEITE7 values and discard all non-number values and all numbers ≤ 0. Assert that for every hydrant, at least one of those values is cleanly divisible by 5. If all other values are equal to that number after rounding to the nearest 5, return that value for fire_hydrant:diameter=*. Otherwise, don't import a diameter for that hydrant.
  • getOsmRef: Read XTRID, ID and LOGISCHE_I and assert that they exist and are equal to one another (except for a constant prefix). Return the prefixless value for ref:ewk=*.
  • getOsmOperator: Read NUMMERIERU, assert that it equals EWK Kirchzarten, and return that value for operator=*.

Data Transformation Results

See https://github.com/FloEdelmann/osm-hydrant-import

Data Merge Workflow

Team Approach

I (flo2154) will do the import by myself, guided by comments from the community.

References

Only information from the community thread (https://community.openstreetmap.org/t/hydranten-hinzufugen/123792).

Workflow

  1. Open the GeoJSON file linked above in JOSM.
  2. Click "Upload".
  3. Enter the changeset tags listed above.
  4. Upload the changes in a single changeset.

If necessary, this single changeset can be reverted via Revert UI or similar tools.

Conflation

Currently, only 5 fire hydrants are mapped in Kirchzarten, and those are all right at the border to Freiburg im Breisgau (Freiburg-Neuhausen), see this Overpass query. The fire hydrants to be imported are far enough from any existing fire hydrants in OSM, so they can be imported without conflation.

There was one possible duplicate, which was deleted by KS-Brandschutz, not endorsed by me and other users. If it is restored, the possible duplicate will be excluded from the import.

QA

  • Hydrant positions (coordinates) were visually inspected for plausibility in JOSM, using OSM carto and Bing imagery backgrounds.
  • Possible duplicates in the border region to Freiburg-Neuhausen were visually inspected via OsmHydrant v1, see https://community.openstreetmap.org/t/hydranten-hinzufugen/123792/12.
  • In code, attributes were checked for consistency/completeness and implausible attribute values were excluded.
  • Additionally to the GeoJSON, the code also generates CSV files for the raw and processed data, which can be manually inspected in a spreadsheet software. See https://github.com/FloEdelmann/osm-hydrant-import.

See also

The post to the community forum was sent on 2025-01-04 and can be found here.