2

I have downloaded a .kml file from this source: http://www.carpworld.co.za/index.php/dam-contours/boskop-dam. This is how it looks in Google Earth:

enter image description here

This file contains contours of Boskopdam (a local lake). The contours don't have height data/attributes, or non that I am aware of, but the task I'm trying to complete is converting or displaying these contours in a 3D fashion like this:

enter image description here

I've seen a few videos on how to use a .dem file in Blender to create a 3D mesh, but thats about all I know.

I have QGIS and have little to no knowledge on using it.

  • 1
    Welcome to GIS:SE! Make sure to read the tour and familiarize with the site. In order to narrow the focus of your question, it would be better to choose which software package you want to get and answer on (either QGIS or ESRI, but not both). – Gabriel C. Feb 25 at 18:45
4

To expand on GBG's answer, here are some details about how to proceed in QGIS.

QGIS may not be able to edit a layer in KML format. You'll know that QGIS can't edit your layer if you can't click the edit button edit button in the digitizing toolbar. If that's the case, export to a different vector format, eg shapefile.

explode the multi-part features to single features

Follow the method explained here: Exploding multipart polygons within shapefile in QGIS?

Use the PDF to manually assign elevations to the lines

Add a numerical attribute table field and start adding data to the corresponding features. Since a numerical field cannot store units of measure, it may be useful to include that in the field name. For example, if your elevation is in meters, you could call the field "Elev_m."

See the relevant section of QGIS manual for more details.

Optional: Try one of these methods to make it easy to see at a glance which contours have elevation assigned, and which still need it.

  1. Label the layer with the new elevation field.
  2. Set up rule-based styling, so that contours without elevation data are one color, and contours with elevation data are another color. Eg, set up one style with the rule "Elev_m." is not null, and a second style with the rule ELSE
  3. Set up conditional formatting of the attribute table to highlight rows where the elevation field is blank.

Be sure to save your changes to the layer once you're done. Note that QGIS has two different save buttons: one for the QGIS project, one for layer edits.

Some of the methods for the next step (interpolating a surface/creating a TIN) require points instead of lines, eg Creating Tin from Elevation Points in QGIS?

To convert your contours to points, use the Extract Vertices tool from the processing toolbox. How to convert a line to points?

Note: the contours were probably created from elevation point data. By converting the elevation point data to contours and back to points again, you've lost a lot of the details of the original information. If you can acquire the original point data, your results will be more precise.

  • "Now what?" Now proceed with the rest of the steps. I included links to more detailed instructions for each step. If those links don't lead to enough information you can easily find other sources of instruction, now that you know the technical terms to search for. If you can't figure something out after making a reasonable effort, ask a new question explaining exactly what you tried and where you're stuck. See gis.stackexchange.com/help/how-to-ask for tips on asking a question that can receive a helpful answer. – csk Feb 26 at 16:12
2

You are correct that this KML file does not have Z values. You will need Z values to generate your mesh. Your link also points to a PDF that has elevation below the lake edge. Because these data are being stored as a multi-part features (one record in the table but lots of individual lines) you would need to explode the multi-part features to single features using a GIS. Then, use the PDF to manually assign elevations to the lines. Next either interpolate a surface model or create a TIN model. Finally convert the surface to mesh. I know that QGIS has a pluging called DEMto3D for creating STL files.

Your question violates the one question rule and will likely be put on hold by a site administrator. There is information on GIS-SE for each of these steps in either ArcGIS or QGIS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.