[HOT] A new tool for spotting buildings that overlap by more than 50%

Harry Wood mail at harrywood.co.uk
Sun Nov 26 02:18:13 UTC 2017


It's funny, I was having the same idea recently while using the JOSM validator on "finished" areas of TM projects.
JOSM validator already has a big red error category for duplicate buildings (where there is 100% overlap). This crops up a bit in our finished projects, but it shouldn't really. It's a clear data error. We should always fix duplicate buildings. ....So I start by fixing them.
Then there's a JOSM warning called "crossing buildings". Again this is always a data error actually, and ideally we'd fix all of these, but these are very common in our finished tasks. Every case where a neighbouring building is drawn over the top of the other, even ever so slightly. (Often we see buildings up against each other in the imagery. To be purely strictly correct, these should be mapped as ways sharing nodes, but it's understandable that folks don't always get that quite right, and it doesn't actually matter that much).  I sometimes spend ages fixing all the "crossing buildings" warnings, but...
...among these there are some cases which are more important to fix, where buildings are actually a kind of duplicate, but not 100% matching. The same building drawn in twice by two different people (probably due to mapping at around the same time). 

So I've just been trying this script by first fixing the 100% duplicates using the normal JOSM validator error, then next selecting these cases using the script. It works! But it's a bit fiddly to set-up and use. I was imaging this kind of logic, but as a refinement to the JOSM validator itself. Under the "crossing buildings" warning list it could show the major/minor types of crossing buildings.
Harry

      From: john whelan <jwhelan0112 at gmail.com>
 To: "hot at openstreetmap.org" <hot at openstreetmap.org> 
 Sent: Friday, 24 November 2017, 22:50
 Subject: [HOT] A new tool for spotting buildings that overlap by more than 50%
   

Mike Thompson was kind enough to build me a JOSM script.
https://github.com/MikeTho16/ JOSM-Scripts
SelectDuplicateBuildings.js
To Run:* Install JOSM's Scripting Plugin* Place above file in a convenient location on your system * Click "Scripting" (on top menu bar)* Click "Run"* Click "..." button and select this file.* Click "Run"
Selects duplicate, or near duplicate, area buildings in JOSM's active data layer. A "near duplicate" is a building whose bounding box overlaps another building's bounding box by more than 50% (I couldn't get a pure area compare to work).  Only the first building encountered of an overlapping pair is selected. The selected buildings are added to the current selection.
Note clear the selection first then use the todo plugin to go through the duplicated buildings.  

Cheerio John
_______________________________________________
HOT mailing list
HOT at openstreetmap.org
https://lists.openstreetmap.org/listinfo/hot


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/hot/attachments/20171126/443fb2c6/attachment.html>


More information about the HOT mailing list