• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

3d vertices for shapefiles

dave hoeffgen

Resource contributor
Messages
1,439
Country
germany
Hi there,

Producing high density CVX terrain for a larger area using scenProc and OSM data I stumbled upon the followin problem:
Hydro polygons require 3d vertices as the water's elevation is taken into account just like AB_flattens.

With my data not having elevation entries I was wondering if there is a way to bake the third dimension into the vector polys from a raster DEM file.
Is that possible using GDAL or QGIS?

Thanks in advance for any help.

Regards,
Dave
 
Hi Dave:

I suspect that other GIS applications besides Global Mapper can also do what you describe, but IIRC that may require each vector hydro polygon to be selected manually one-after-another, and the elevation ("Z") value added manually or semi-autmatically to the existing Lon ("X") and Lat ("Y"), to yield a X,Y,Z type of vector SHP file.


Since we are likely performing these operations with a step-wise manual method either way, one could also perform this operation with the desired terrain mesh loaded at top priority in a FS flight session, Append the SHP file(s) into SBuilderX, and read the pertinent Altitude for the area to be enclosed by the hydro poly as described here:

http://www.fsdeveloper.com/forum/th...res-to-a-3d-terrain-model.436776/#post-738442


In your case, however, within the SBuilder work-flow, the altitude value can instead be added to all vertices of the selected hydro poly without manually editing each vertex individually ...as discussed in the linked example above.

After adding the altitude value globally to all vertices of your selected hydro poly(s), they can be compiled to individual CVX BGLs.

Those CVX BGLs can then be decompiled with CVX-Extractor to output SHP files with the desired X,Y,Z attributes for use with ScenProc and/or other FS scenery utilities. :idea:


Hope this work-flow might help you and/or others with this type of task. :)

GaryGB
 
Hi Dave:

I suspect that other GIS applications besides Global Mapper can also do what you describe, but IIRC that may require each vector hydro polygon to be selected manually one-after-another, and the elevation ("Z") value added manually or semi-autmatically to the existing Lon ("X") and Lat ("Y"), to yield a X,Y,Z type of vector SHP file.


Since we are likely performing these operations with a step-wise manual method either way, one could also perform this operation with the desired terrain mesh loaded at top priority in a FS flight session, Append the SHP file(s) into SBuilderX, and read the pertinent Altitude for the area to be enclosed by the hydro poly as described here:

http://www.fsdeveloper.com/forum/th...res-to-a-3d-terrain-model.436776/#post-738442


In your case, however, within the SBuilder work-flow, the altitude value can instead be added to all vertices of the selected hydro poly without manually editing each vertex individually ...as discussed in the linked example above.

After adding the altitude value globally to all vertices of your selected hydro poly(s), they can be compiled to individual CVX BGLs.

Those CVX BGLs can then be decompiled with CVX-Extractor to output SHP files with the desired X,Y,Z attributes for use with ScenProc and/or other FS scenery utilities. :idea:


Hope this work-flow might help you and/or others with this type of task. :)

GaryGB

Thanks for the reply, anyway because of the huge amount of data I'm dealing with SBuilderX is not an option (arguments are starting with the file size, continuing with the amount of polys to fix and finishing with usage restrictions)
There must be an automatic way or I'll have to bake raster images for 10,000 square kilometers :eek:
 
I did it in python and ArcGIS- Iterated through each polygon and found its first vertex* and then read the height from the DTM, then set all vertices Z values to that height.

* not the most best approach, but examining heights for all vertices and then finding the lowest was too computationally expensive at the time.
 
I did it in python and ArcGIS- Iterated through each polygon and found its first vertex* and then read the height from the DTM, then set all vertices Z values to that height.

* not the most best approach, but examining heights for all vertices and then finding the lowest was too computationally expensive at the time.
Sounds interesting. Do you think this would also work if each vertex was given its individual z value from the DEM?
I will also have a look if such a script API exists for QGIS as well.
 
Back
Top