tudelft3d / bag3d

Software for generating a 3D version of the BAG dataset and more. Python + PostgreSQL + 3dfier
GNU General Public License v3.0
11 stars 11 forks source link

importing bag3d geometry into Qgis #31

Closed jasper123 closed 5 years ago

jasper123 commented 5 years ago

Hi, I'm quite new to this so I hope this doesn't sound to stupid.

How can I import 3D geometry from the bag3d dataset into Qgis?

I want to try to use Qgis to export a part of the file so I can import it into my 3d editor (Rhino). Hope someone can give me some advise to do so!

Greetings, Jasper

balazsdukai commented 5 years ago

Hi Jasper, it doesn't sound stupid at all :-)

There are multiple ways to do this, but i recommend that you use the Web Feature Service (WFS) for the 3d bag. I would to the following in QGIS:

  1. Draw the polygon of the extent that you want to export and zoom to it. Make sure that you set the correct CRS (EPSG 28992) when creating the polygon. In case you don't have the PDOK Services plugin loaded in QGIS, I recommend to do that load a topographic map of the NL (eg. opentopokaart), which will show you the context where to draw your polygon.

  2. Load the WFS of the 3d bag. Here's a tutorial how to work with WFS in QGIS: https://docs.qgis.org/3.4/en/docs/training_manual/online_resources/wfs.html

  3. Use the Vector -> Research tools -> Select by location... tool for selecting the buildings from the 3d bag layer that intersect (or within) the polygon that you drew.

  4. When you have the desired buildings selected, then "Export selected features as..." from the 3d bag layer.

In Rhino, you'll have to extrude the building footprints in order to get the 3d geometry. But I'm not familiar with Rhino, so I don't know how to do that.

Note that the building heights (eg. roof-.. and ground-.. ) are absolute elevation above the sea level (NAP). Thus in order to get the extrusion height, you need to subtract the ground height from the roof height. Choose whichever ground- and roof-height fits your use case the best, or just average them.

jasper123 commented 5 years ago

Thank you Balázs for your reply! This sounds like a good way of doing it. I am going to try it out!