[Talk-ca] BC2020i OSM Distributed Model and Education

Stewart C. Russell scruss at gmail.com
Tue Feb 6 18:01:34 UTC 2018


On 2018-02-02 06:06 PM, john whelan wrote:
> 
> It would be useful if someone could produce a sample in R that takes a
> .osm file and counts the buildings. 

R might be rather overkill:

    grep "k='building'" file.osm | wc -l

One might have to do some clever trickery around buildings that are
relations (those with courtyards), though.

> A task from that would be to extend
> it to count the number of two storey (story) buildings.

I wonder if OSM uses the UK concept of storey, where a two storey
building has three levels (ground floor, first floor, second floor)? Was
a huge confusion for me when I first moved to Canada: first floor means
one level up.

 Stewart



More information about the Talk-ca mailing list