Access OSM data in C++


I’m not sure this is the right forum, but I am completely new in this corner, so please bear with me. I am trying to use OSM data in a science project. I need to provide some contextual information so that people looking at my data get an idea where it is. I would like to display things like rivers and other water bodies, cities and state boundaries for example.

My question is: how would i go on about extracting that information from .osm files? Is it possible? What about doing it in C/C++? I had a quick look at Osmium, but the documentation is more than sparse. Would Osmium provide me with means to extract the data I mentioned?

I don’t want to bark up the wrong tree here. Any help greatly appreciated.

Have a look at … there are some hints to C++ progs.

and about Osmium … do you mean that is more than sparse?

if you want to convert and filter raw OSM data, also see osmfilter and osmconvert in the OSM wiki.

At least some examples are missing…

But I guess there’s no one here to really answer that question (asked it myself some time ago).

GDAL is C/C++ and has an excellent OSM driver