Can I turn a 2D polyline into a 3D polyline by embedding points (elevation attribute) vertices?

I have two shape files, one a polyline and the second a point dataset with an elevation attribute.

I need to embed the points (regularly spaced at 10 metres) as vertices into the polyline thereby converting the 2D polyline to a  3D polyline Z and visualize as 3D.

Is this possible?

Best Answer

  • sphillipssphillips Posts: 205
    Answer ✓
    Sorry for the delay in getting back to you - I have been very busy lately. As far as I know there is no direct way to apply the vertex elevations to the line directly. I have tried and failed myself. I have also looked through previous questions and I believe this is not possible. If I am wrong maybe someone else could enlighten us?

    I have however attached a zipped folder containing a brief video on how to convert the data to a 3D track using an alternative workaround. My apologies for moving so quickly through it - I am using Snagit and it will remove frames if there is any inactivity. 

Answers

  • 946946 Global Mapper User Posts: 152Trusted User
    Create 1m buffer from your 3d points.
    Select the buffers and create flatten terrain from selected areas.
    Select the polyline and apply elevation from the surfaces.
  • If you want the polyline to have vertices every 10m:

    1. Grid the points to create a terrain
    2. Select the Polyline with the Digitizer tool 
    3. Right-click > Move/Reshape Feature(s) > Resample/Split Selected...
    4. Sample Features at Fixed Distance 
    5. Enter 10 meters for the Sample Spacing
    6. Select the Polyline with the Digitizer tool 
    7. Right-click > Attribute/Style Functions > Apply Elevations to Selected Feature(s)

    If you want to convert a polyline directly to 3D using a terrain (vertex spacing based on pixel data)

    1. Grid the points to create a terrain
    2. Select the Polyline with the Digitizer tool 
    3. Right-click > Analysis/Measurement > Path Profile - Generate Path Profile From Lines
    4. File > Save Profile Line(s) To New Layer
    5. The 3D polyline will be saved to a new layer called 'Path Profile'
  • 46 said:
    Create 1m buffer from your 3d points.
    Select the buffers and create flatten terrain from selected areas.
    Select the polyline and apply elevation from the surfaces.

    Thanks,

    I understand the concept but we're not quite there yet, refer above.





  • sphillips said:
    If you want the polyline to have vertices every 10m:

    1. Grid the points to create a terrain
    2. Select the Polyline with the Digitizer tool 
    3. Right-click > Move/Reshape Feature(s) > Resample/Split Selected...
    4. Sample Features at Fixed Distance 
    5. Enter 10 meters for the Sample Spacing
    6. Select the Polyline with the Digitizer tool 
    7. Right-click > Attribute/Style Functions > Apply Elevations to Selected Feature(s)

    If you want to convert a polyline directly to 3D using a terrain (vertex spacing based on pixel data)

    1. Grid the points to create a terrain
    2. Select the Polyline with the Digitizer tool 
    3. Right-click > Analysis/Measurement > Path Profile - Generate Path Profile From Lines
    4. File > Save Profile Line(s) To New Layer
    5. The 3D polyline will be saved to a new layer called 'Path Profile'


    Thanks ... same result, see attached (I probably didn't explain myself all that well ... the points are on the line)

     



    46 said:
    Create 1m buffer from your 3d points.
    Select the buffers and create flatten terrain from selected areas.
    Select the polyline and apply elevation from the surfaces.

    Thanks,

    I understand the concept but we're not quite there yet, refer above.




    46 said:
    Create 1m buffer from your 3d points.
    Select the buffers and create flatten terrain from selected areas.
    Select the polyline and apply elevation from the surfaces.

    Thanks,

    I understand the concept but we're not quite there yet, refer above.




    46 said:
    Create 1m buffer from your 3d points.
    Select the buffers and create flatten terrain from selected areas.
    Select the polyline and apply elevation from the surfaces.

    Thanks,

    I understand the concept but we're not quite there yet, refer above.





  • Can you share the shapefiles?
  • Certainly can
  • This is how you could convert the vertices to a 3D line directly:

    1. Select the points with the digitizer
    2. Right-click > Advanced Feature Creation Option > Create New Line Feature from Selected Points
    3. Specify 0 
    4. Call it something like 'Track from vertices'
    5. Note in your case that there are regions with no vertices so you may have to manually insert vertices to adjust your line to follow the track

    This is how to generate a terrain from the 3D line:

    1. Select the 'Track from vertices' line with the digitizer
    2. Right-click > Advanced Feature Creation Option > Buffer
    3. Buffer a fixed distance e.g. 20 meters
    4. Name it 'Buffer'
    5. Select the 'Buffer' layer with the digitzer tool
    6. Right-click > Advanced Feature Creation Option > Buffer
    7. Select the 'Buffer' layer with the digitzer tool
    8. Grid the layer and choosing Crop to Selected Area Feature(s) via the Grid Bounds tab (0.00005 arc degrees)

    This is how to drape the 2D track onto the terrain:

    1. Select the 'Track from vertices' Polyline with the Digitizer tool 
    2. Right-click > Attribute/Style Functions > Apply Elevations to Selected Feature(s)
  • I'm almost there, just one more query.

    In the final section, draping the 2D track onto the terrain, I expected to be able to use the TRACK.shp file (selected feature) from the above *.zip.

    When I do, the message I get is "Unable to update elevations for any selected features".

    Any thoughts on what I need to do to enable?

    thanks

  • Thanks ... I appreciate your persistence.
Sign In or Register to comment.