DEV Community

Discussion on: Processing Open Street Map data with F# and .NET Interactive

Collapse
 
harry_wood profile image
Harry Wood • Edited

Great to see you describing these data filtering tricks for the F# community. I've never done any F# myself, but I remember giving a workshop using the supermarket example myself way back in 2012.

Here I was describing the use of the "osmosis" tool, which lets you apply some filters to OSM data. osmconvert also does this. Folks might find that approach more useful if the geojson conversion you describe is too heavyweight (out-of-memory errors etc). Instead take the "osm.pbf" data, and use a separate command line tool to filter it down to the shop=supermarket tag before converting to the less compact geojson.

"The data are most often injected by plain users, which puts the OSM data schema robustness ...at risk".

Contributed by folks like you and me! If you didn't try contributing to OpenStreetMap yet, give it a go. e.g. maybe you can spot some little individual data fixes that can be made when doing this kind of filtering. In fact supermarkets are a good example of data that should be pretty complete and well mapped across the UK I would expect. They're an important type of POI, which are not too numerous for the community manage to reach a good >99% complete level. As you've mentioned in your code samples, you might also want to include shop=convenience in a supermarket analysis (depending on use case) which will pick up much smaller shops, but... mapping of these will be less complete. We need more folks joining in mapping such small shops in some areas of London!

The London OpenStreetMap community (of mappers and data users) get together in a pub quite often. Follow OSMLondon if you fancy it!

Collapse
 
miastometr profile image
Paweł Stadnicki

Thanks for the hints how to work better with OSM tooling as I barely know it. I can see that your notes will be valuable during my next adventures.

I wanted to work directly with the whole geojson just to find out what it contains through plain text search. That is how I have chosen supermarkets, not only seeing it is large but very tangible. Apparently good choice, as you did it the same.

My primarily goal was to enable playing with F# lang with tangible, day to day data and to switch between them immediately (like by changing property name in the filter in the F# notebook). However if they/I decide to stick to a particular dataset then using suggested way to convert will be very handy.

Indeed, where I live (Wrocław) there is also o lot of small shops missing which is a pity as nearby facilities can impact application to improve/analyze neighborhoods etc.

I'm preparing other samples for London and I joined the group, thanks for sharing!

Collapse
 
xivk profile image
Ben Abelshausen

Hey, there is also OsmSharp github.com/OsmSharp/core for reading/writing from/to different OSM formats.