Skip to main content
Question

add surface information from raster to vector

  • October 4, 2019
  • 3 replies
  • 99 views

arjen
Participant
Forum|alt.badge.img+2
  • Participant
  • 2 replies

I have got line objects, and a rasterdataset with elevation data.

I try to get both minimum and maximum elevation values as an attribute to the lines, but just can't find out how.

Does anyone know how to do this?

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • October 4, 2019

Buffer the line by a small amount, clip the raster, RasterBandMinMaxExtractor, FeatureJoiner to attach back to the original line.

Use a counter if your lines don't already have a unique ID. It may be more efficient to convert the clipped raster to a point cloud and use the PointCloudStatisticsCalculator to get the Min/Max.

 

 


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 1637 replies
  • October 4, 2019

Hi @arjen,

Another method would be to use the SurfaceDraper transformer. Connect the elevation data to the Points/Lines input and the lines to the DrapeFeatures input. In the transformer settings, set Drape Method to MODEL. Connect the DrapedFeatures output to a BoundsExtractor to get the min/max elevations.

The lines will now have more vertices and be 3D. If this is not what you want, you can use a FeatureMerger to merge the min/max elevation info on a copy of the original features, or you can store the original geometry before draping with a GeometryExtractor and restore after getting the bounds with a GeometryReplacer.


arjen
Participant
Forum|alt.badge.img+2
  • Author
  • Participant
  • 2 replies
  • October 7, 2019

Hi @arjen,

Another method would be to use the SurfaceDraper transformer. Connect the elevation data to the Points/Lines input and the lines to the DrapeFeatures input. In the transformer settings, set Drape Method to MODEL. Connect the DrapedFeatures output to a BoundsExtractor to get the min/max elevations.

The lines will now have more vertices and be 3D. If this is not what you want, you can use a FeatureMerger to merge the min/max elevation info on a copy of the original features, or you can store the original geometry before draping with a GeometryExtractor and restore after getting the bounds with a GeometryReplacer.

Thank you, this is exactly what I was looking for.