OpenStreetMap 로고 OpenStreetMap

Checking for changes to Long Distance Paths

SomeoneElse님이 English로 2021년 7월 30일에 게시함. 최근 2021년 10월 15일에 업데이트됨.

Lyke Wake Walk relation in OSM - ways and nodes

Previously I wrote about checking National Parks in Britain and Ireland for breakage, by counting the number of valid polygons in a rendering database.

A similar approach can also be used to check line features as well as polygons. It’s possible to count the number of contiguous sections of a given polygon. For example, here’s the Lyke Wake Walk, which is in one piece:

psql -d gis -c "SELECT count(*) FROM planet_osm_line WHERE (osm_id = '-1996318');"
 count 
-------
     2
(1 row)

and here is the Sabrina Way, which isn’t:

psql -d gis -c "SELECT count(*) FROM planet_osm_line WHERE (osm_id = '-537430');"
 count 
-------
    12
(1 row)

If something is changed in OSM that introduces an extra piece, or fixes a gap, that number will change. This script can be used to count the change in the number, like this:

Change in relation components for Sabrina_Way 537430
3c3
<     12
---
>     13

If run from cron it can check every day and will only send an email alert when the number changes.

If there is a change, and can be investigated with a site such as http://ra.osmsurround.org/analyzeMap?relationId=6361532.

Edit 2: Also useful is the answer to this help question that looks for modified ways that make up a relation.

Edit 1: Where this process falls down is where a very long-distance path is added a superrelation and there’s a gap between the relations, which is what this changeset was fixing. Here two long several relations make up two super-relations that share some of their route. For completeness, the edit that I was fixing that created a gap in the Cleveland Way was actually fixing a previous edit of mine that introduced an unwanted spur to E2 at this location.

위치: Stainton Hall Farm, Danby, North Yorkshire, York and North Yorkshire, England, YO21 2JH, United Kingdom
이메일 아이콘 Bluesky 아이콘 Facebook 아이콘 LinkedIn 아이콘 마스토돈 아이콘 텔레그램 아이콘 X 아이콘

토론

댓글을 남기려면 로그인하세요