Hi Tim,<div>That is exactly the sort of thing I had envisaged writing - you have nearly finished before I got started - well done!</div><div><br></div><div>Graham.<br><br><div class="gmail_quote">On 9 April 2010 22:25, TimSC <span dir="ltr"><<a href="mailto:mapping@sheerman-chase.org.uk">mapping@sheerman-chase.org.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi again,<br>
<br>
I have been working on auto tracing buildings and I'm making progress. I<br>
was slightly encouraged by Ed Avis's comments. I think one underlying<br>
difference is peoples attitude to omissions in map data. Many people<br>
think they are a good thing, particularly since they encourage the<br>
community to do high quality surveying. But I think omissions are bad in<br>
terms of actually using the map. I don't think we should be using the<br>
main map to gauge our progress. I suspect what we need is good meta data<br>
- how and when data is sourced. Anyway enough rambling...<br>
<br>
Tracing buildings. I have been using the original images, since image<br>
transformations tend to introduce degradation of quality. I use colour<br>
to select building pixels, then form edge fragments, then form polygons,<br>
then simplify the polygons using the Douglas-Peucker algorithm, then<br>
group them so we get inner and outer edges, then tranform image<br>
coordinates to GBOS then to WGS84 via OSTN02 (I ported the perl code to<br>
python), then save as OSM format and load back into JOSM. Screenshot:<br>
<a href="http://timsc.dev.openstreetmap.org/dev/josm-building-outlines.png" target="_blank">http://timsc.dev.openstreetmap.org/dev/josm-building-outlines.png</a><br>
<br>
The next steps are to improve the quality of the polygon shapes,<br>
possibly by checking if the edges are nearly orthogonal, and if so<br>
making them completely orthogonal. Also I need to write a filter to<br>
check for buildings in the area, to avoid importing duplicate buildings.<br>
I need to look at the simplification, as sometimes an extra node is<br>
added to a polygon (the initial node used as the start of the<br>
algorithm). I am also considering detecting roads that overlap buildings<br>
in the source images, since this is probably the biggest loss of<br>
quality. The result I am getting is already more spatially detailed than<br>
my own survey of the University of Surrey campus (although not as rich<br>
in information).<br>
<br>
In the medium term, I will import some buildings once I have the quality<br>
I want. I want to minimise manual work in JOSM but I don't rule it out.<br>
I will only be working in the Guildford area - it's my data to gamble<br>
around there :)<br>
<br>
TimSC<br>
<br>
<br>
_______________________________________________<br>
Talk-GB mailing list<br>
<a href="mailto:Talk-GB@openstreetmap.org">Talk-GB@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/talk-gb" target="_blank">http://lists.openstreetmap.org/listinfo/talk-gb</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Dr. Graham Jones<br>Hartlepool, UK<br>email: <a href="mailto:grahamjones139@gmail.com">grahamjones139@gmail.com</a><br>
</div>