Urban Mapping — going over post-processing issues
Since we released the very first version of the Urban Mapping dataset, which contains 54+mln map features of buildings in Russia, we’ve been working on improving mapping accuracy of the data.
In cartographer’s work there is a bunch of tools to leverage the mapping process. Every GIS software provides tools for digitising and validation — whether it’s a set of various geometry primitives like point or rectangle or advanced vector processing like simplification, smoothing, snapping etc.
But even with the help of GIS tools there is still a need to edit a lot of features manually in order to have them fitted better to the real world objects geometry and position. And it seems to be the very routine and time-consuming work when you have to deal with hundreds and thousand of objects.
As we applied the neural network to detect the buildings in satellite imagery we also had to apply a lot of post-processing algorithms including more networks (like the one we used to predict building heights) and a number of regular properties at the stage after converting raw masks into vector polygons.
The short list of these post-processing properties may include:
- fix ovelapping polygons by shifting them apart from each other
- remove small holes inside polygons (the small holes usually refers to an error because of the polygonization while the others may refer to the buildings form — the building may have a courtyard surrounded by walls)
- filter objects by min. area — we can use it to avoid detected constructions that are likely not residential or just out of our interest
Some of the properties are less apparent, e.g.:
- load Openstreetmap objects and compare it by IOU with predicted polygons — a cartographer can use it as an accuracy metrics for the model’s output or set to replace predicted polygons with OSM ones where he gets it
In Geoalert platform (currently) it looks something like this:
- _step: FilterSmallObjects
input: buildings
min_area: 30.0
output: buildings_filtered
- _step: RemoveSmallHoles
input: buildings_filtered
min_hole_area: 50.0
output: buildings_filtered_fixed
- _step: LoadOSMBuildings
input: buildings_filtered_fixed
output: osm
- _step: MergeByReplace
input: buildings_filtered_fixed_with_osm
min_iou: 0.8
But we look forward to adding the appropriate controls for the properties that are required mostly. Please provide us with your feedback — what features would be mostly required in your work using the platform (even if they are not included in the short list above).
Buildings alignment by roads
Let us tell about one more new algorithm in the post-processing pipeline, we’ve added recently. We were not satisfied with buildings rotation clutter when tried on the rural and settlement areas. However in accordance with the better urban planning style the villagers built their houses along the straight road line. So we got the idea to download the roads network that available in Openstreetmap to use it for alignment of the buildings.
Here is how it works:
- Get polygonized building footprints
- Download OSM roads for the area
- Calculate the rotation deviation in the building clusters — in relation to road lines and to the other buildings in the single cluster
- Re-align building polygons to the right angles to the road lines if their rotation deviation values are out of some predefined range
- Remove overlaps if occurred
We consider this approach as some of the tradeoffs that helps to make averagely better (in our benchmarking maps we managed to reduce the average rotation error from 5.3 degree to 1.8 degree) — hence to reduce the time to edit maps manually by cartographers. The rotation algorithm was tested firstly on the rectangular buildings shapes, however we’ve already extended it to the so called L-shaped buildings.
Don’t forget to subscribe to our newsletter to keep updated on our news and platform’s updates.
Some references
- https://medium.com/geoalert-platform-urban-monitoring/geoalert-urban-monitoring-beta-d2d5a11a64d9 — about Geoalert platform
- https://github.com/Geoalert/urban-mapping — Buildings demo and Urban Mapping project