You are not logged in.

#1 2020-08-04 11:11:20

onthegrid007
New Member
Registered: 2020-08-04
Posts: 2

First time OSM user, 3D rendering

Hi all!

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.

Offline

#2 2020-08-04 20:15:29

Tordanik
Moderator
From: Germany
Registered: 2008-06-17
Posts: 2,686
Website

Re: First time OSM user, 3D rendering

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. smile


OSM in 3D: OSM2World

Offline

#3 2020-08-06 11:10:25

onthegrid007
New Member
Registered: 2020-08-04
Posts: 2

Re: First time OSM user, 3D rendering

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... smile

Last edited by onthegrid007 (2020-08-09 05:54:20)

Offline

Board footer

Powered by FluxBB