NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Is there a good way to find new highways from one year (or month) to the next? I tried looking at the version of ways (highways) but that doesn't seem like the way to go as version 1 of ways isn't giving me NEW roads.

asked 17 Jan '22, 18:21

gcapilot's gravatar image

gcapilot
41334
accept rate: 0%


There's no "zero effort" way I'm afraid, as you have already seen you cannot rely on version numbers. A relatively stable approach could be something along these lines:

  • import area of interest (as of today) into PostGIS database with osm2pgsql
  • import same area (as of one year ago) with a different prefix (so that you e.g. get a table planet_osm_line with today's data and old_osm_line with that of a year ago)
  • delete everything from the "new" table that is in the vicinity of something from the "old" table - one approach could be creating a buffer of, say, 20 meters around every "old" road geometry and then subtracting the resulting polygons from the "new" line geometries
  • what remains in the "new" table are those bits where one year ago there was no road within 20 meters of it.

The 20 meter rule is to account for small geometry changes. Of course you could fine-tune this to e.g. count a street as "new" also if the name has changed from earlier or so.

permanent link

answered 17 Jan '22, 19:04

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×223
×163
×37

question asked: 17 Jan '22, 18:21

question was seen: 1,022 times

last updated: 17 Jan '22, 19:04

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum