Read XML File, create 3D Data for environment model

Hello,

from the enclosed XML file, I would like to extract the Data for the measurements of the buildings (X,Y,Z) coordinates, the distance between the, and the roof type and height.
Could you help me with that?
I found some Lunchbox options like XML to Assoc or read XML by Tag but it did not bring me further.

Thanks in advance and BR.

LoD2_32_639_6035_1_SH.xml (12.6 MB)

Hi @Frederic3
Heron’s ImportVectorLite and ImportVector can import your XML file. If you are looking to do a simple import which ends up far from origin, use ImportVectorLite. If you want your data close to the origin, use ImportVector and SetEAP.

ImportVectorLite
20240424_XML ImportVectorLite.gh (7.7 KB)

ImportVector
20240424_XML ImportVector.gh (15.8 KB)

-Brian

Hello Brian,

thanks for the support.
I downloaded the Heron Plugin and tried to work on it, but there were 2 errors occurring.

Furthermore no drawing or volume was shown in Rhino 7 like in your example files.

Enclosed you find the screenshots.

Thanks and BR

Frederic


Apologies @Frederic3 , OgrInfo is available in Heron v0.4.3-beta.1 in the pre-releases. Can you update to this beta and try again?

I did the update and it worked well, but how to create 3D Models out of the output of polyline curves. Especially extract the variables like e.g. 13 MeasuredHeight_uom from fields, import vector and assign it the the right polyline curve (featureGeometry) in Z direction was not apparent to me.

Or even to sort the list to create the 3D Model manually, but having the
general building type by hand and where it is placed.

BR

I’ve taken a pass at extruding the footprints and coloring them by “function”.
20240428_XML ImportVector Extrude Color by Function.gh (27.8 KB)

A few things to note:

  1. There are some very short line segments in the data so make sure your document tolerance is set accordingly (ie if you are in meters, set tolerance to 0.001). When you want to create a closed polyline of the building footprint with the Join Curves component, if the document tolerance is too high, Join Curves will have trouble and may not join the curves as expected.
  2. The footprints are actually not planar, so Boundary Surfaces will fail. It appears the footprint outline may be following a topography so you will need to use either Fragment Patch or Heron’s Multi Mesh Patch to create a Brep or mesh for extruding. Multi Mesh Patch has an input for extrusion, so you can pipe measuredHeight directly in without requiring extra components for the extrusion step.
  3. A non-planar base also means the extrusion tops will also not be planar. If you want the roofs to be planar, I can modify the definition to show you how it can be done.
  4. Some of the measuredHeight values are “null”, so you will need to replace these with 0.

-Brian