I just found out recently about OSM and such. I code mainly in C++ and have made many projects around XML parsing, 3D OpenGL Rendering, and a lot of OpenCV Processing. I have a goal to create a GLOSM clone (yes I did some research into this), my Idea is to be able to pass in any PBF OSM file and have it statically render the entire thing in a 3D world. I am however currently stuck on the reading and parsing of this file type. I am looking for help from either a simple library or someway to convert the PBF file into just raw XML which I can then read and pick out the data I need by myself. If someone can help guide me, a new, in the correct direction I would greatly appreciate it.
It’s a good idea to avoid rolling your own OSM PBF parsing, especially as there are other processing steps (such as dealing with multipolygon relations) that will come up sooner or later when working with OSM data. For C++, you probably want the Osmium library: https://osmcode.org/libosmium/
Also, good luck with your project! I’ve been working on something similar for a while: http://osm2world.org/ Feel free to poke around the code for inspiration.
Thank you @Tordanik! I looked into the Osmium Library and it seems to be exactly what I need (Low overhead, plain header files, no complex library installation). Honestly, I am attempting to ignore the metadata from the OSM XML file and just extract all of the latitudes + longitudes from every available building and street individually. It overall just seems a bit complex. I am trying to understand some of it from examining the example program source codes’, but the complexity of the library itself is making things a tad difficult to understand. I am an experienced C++ programmer yet I am finding great difficulty getting what I need from this library. If you or someone else could help point me in the correct direction to either my solution or a quick recap on what it is I should be looking for, I would greatly appreciate it! Thanks again…