OpenStreetMap 로고 OpenStreetMap

capiscuas의 일기

최근 일기 항목

Simple script to bulk add non redundant tags on boundary=administrative ways

capiscuas님이 English로 2018년 4월 22일에 게시함. 최근 2018년 4월 24일에 업데이트됨.

Sometimes we find in some cities/countries some boundary ways (the ones that define the political borders of provinces/towns/countries) that are missing some tag(not appearing already in the relations, because it’s better to avoid redundant data.

Example of boundary way without any tag:

For the renders and 3rd party apps that is not a big problem because that way is indide the the corresponding relations with different admin_level, it can be shared by one or many relations, but what happens if we need to add a tag to those ways based on the data from their relations?

The script is the following, based on Dmitri Lebedev’s osm2python library (not python3 compatible yet, help migrating).

모든 항목 보기

Fixing Jakarta boundaries (and II)

capiscuas님이 English로 2015년 11월 30일에 게시함. 최근 2015년 12월 1일에 업데이트됨.

After few days of working with the quality assurance of the original OSM data extracted I finally finished the python script that generates the administrative boundary relations from level 5 to level 9

All the .osm files(original and results) can be downloaded here to check them out.

Here are the statistics and screenshots:

  • Original ways: 7717 (between level 8 and some level 9)
  • (after conversion) Splitted ways/segments: 21627

admin_level=9(in Indonesia: RT) 5006 Level9 in JOSM

모든 항목 보기

위치: Condongcatur, Depok, Sleman Regency, Special Region of Yogyakarta, Java, 55283, Indonesia

Fixing Jakarta's boundaries (Part I)

capiscuas님이 English로 2015년 11월 16일에 게시함.

After having announced in the Indonesia and Imports mailing list about my intentions of fixing the current administrative boundaries in Jakarta, capital of Indonesia.

So the first I did was to download the boundary:administrative ways in Jakarta area, by using the following Overpass API rule while downloading in JOSM.

(way["boundary"="administrative"];node(w); way(bn);); out meta;

Total boundary:administrative ways: 7809 of admin_level = 9 ways = 5082 of admin_level = 8 ways = 2717

I analyze the data and soon realize that there is a lot of overlapping ways, unjoined nodes with similar coordinates, and some areas that contain ways of admin_level=9 doesn’t have the father way of admin_level=8

모든 항목 보기

위치: RW 04, Gambir, Central Jakarta, Special capital Region of Jakarta, Java, 10110, Indonesia

Bulk conversion of administrative boundaries to new OSM format in Jakarta

capiscuas님이 English로 2015년 11월 12일에 게시함. 최근 2015년 11월 17일에 업데이트됨.

Hi everybody, apa kabar?, this is my first post in OpenStreetMap so I’m quite excited.

My name is Ivan Garcia and I’ve been contributing to OSM since many years now, I am currently living in Yogyakarta Indonesia where I do digital volunteering for various projects. I am an opensource python programmer and I love useful is OSM for the world, no wonder we all feel contributing back to the community when we have free time.

I realized that HOT Indonesia contributed adding most of the administrative boundaries of the Jakarta province in order to make a program for disaster management(flood related), my thumbs up for that team and their tremendous efforts, here is their blog

I see those boundaries have an obsolete OSM format to represent the boundaries, that is, still using the obsolete is_in tags, instead of the new boundary relations.

You can take a look at here:

osm.org/#map=17/-6.172219373575377/106.8088689627239 Boundary RW03 duplicates way with RW06 Boundary RW03 duplicates way with RW06

모든 항목 보기

위치: Gowongan, Jetis, Yogyakarta, Special Region of Yogyakarta, Java, 55232, Indonesia