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

3
1

Hi everyone.

I'm trying to fix several buildings having very sharp angles (see photos below), looks like they were unintentionally caused by the extrude tool in JOSM. It's hard to find them by eyes as they need to be zoomed very close to be seen.

Is there a way to detect these using JOSM or another tool?

alt text

alt text

asked 30 Sep '18, 15:42

Privatemajory's gravatar image

Privatemajory
1.1k142233
accept rate: 23%

edited 30 Sep '18, 15:49


While not the actual heuristic you are looking for, JOSM's validator would detect a "building with almost-right angle" info-level validation error for your examples.

JOSM bug 15044 looks like wht you're looking for, but isn't implemented yet.

permanent link

answered 01 Oct '18, 01:01

Vincent%20de%20Phily's gravatar image

Vincent de P... ♦
17.3k18152249
accept rate: 19%

Yes, if "almost-right" angles are already detected, it shouldn't be very hard for them to implement a detection of "almost-flat" angles too.

(01 Oct '18, 04:18) Privatemajory

I believe MapBox did run such an algorithm on OSM data, but I'm not sure if all such bugs were surfaced publicly. I cant see anything in the most widely used debug/lint tools: Osmose & KeepRight. At least some of these features are known as kickbacks & spikes in GIS circles. It may be possible to find a suitable spatial validation tool which works with opensource software such as QGIS.

(01 Oct '18, 14:08) SK53 ♦

I am not sure how others are handling the issue but in most of the OSM maps the sharp angles (the spikes) are present. Besides the buildings the spiky configurations are present an other geometries like roads, roundabouts and so on. In almost all cases, spiky configurations are errors. Because of the maps' start scale, antialias rendering and object overlaps spikes are hardly visible and consequently they remain in the source indefinitely. At the same time, vector based GIS and map-makers should (and they do) have a tool to detect and remove spiky configurations. Actually, spikes are just special cases of tiny outgrowths created bay data generalisation while creating the scale/zoom levels (on fiords, peninsulas, tributaries and so on) and should be programmatically detected and removed. Therefor robust map-makers never see spikes in their maps.
The algorithms for the outgrowths is too complex and complicated to apply if only the spiky buildings are in focus. For this simple issue I have made a special algorithm presented in a meta language so anyone can make a program to detect and remove spikes on buildings in any languages. Besides, I have made a test and demo using OSM buildings for the UK. The algorithm, the demonstration, many examples and a visual analyses is presented/described with details here
https://drive.google.com/open?id=1MaLdnSnc454xKjn3eL95vDQKeoIW8zGU
The result and the analyses show that out of about 5625K buildings 2834 are with spiky configurations. These are detected and corrected. So, if interested, enjoy the paper in the link.

permanent link

answered 17 Oct '18, 07:07

sanser's gravatar image

sanser
695383955
accept rate: 5%

Thanks @sanser for this! I'm no programmer, but perhaps your algorithm could be implemented in a JavaScript/Python script and be used on JOSM through the scripting plugin? If yes, I guess we're close to a solution.

(17 Oct '18, 11:54) Privatemajory
Your answer
toggle preview

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:

×622
×252
×11
×5

question asked: 30 Sep '18, 15:42

question was seen: 2,007 times

last updated: 17 Oct '18, 11:54

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