Skip to main content
Question

add surface information from raster to vector


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

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?

 

3 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • 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
  • 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
  • October 7, 2019
daveatsafe wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings