Question

DEM height to polygons

  • 11 June 2019
  • 3 replies
  • 42 views

Badge

Hi there,

 

I have a single band raster DEM. (z-coordinates.) In my workflow i have to use this raster dataset to give overlapping polygons the 3rd Dimension. Following up, each polygon should always get the height of the smallest z-value in one of its vertices(z_min) through the 3DForcer.

 

This is my workflow (one the whole workflow is finished:)

 

The Input dataset are 2D and 3D Polygons. Through the DimensionExtractor I am checking if the polygon already has a third Dimension or not. If not (Failed Output of the TesterTransformer) I have to retrieve the z-coordinate from the DEM.

 

Therefore I imported the DEM. Secondly I set my 0 values (for the area outside of my clipped area) as NoData. (-> RasterBandNoDataSetter) Then i buffered my polygons (to be on the secure side) with 1 meter. Then I clipped my raster dataset with my polygons (to increase the Performance and decrease the amount of data processed.) (-> Clipper) As next step I usded the RasterCellCoercer to create a Polygons out of each raster cell and took the "ExtractBandValues as: Attributes" option.

In a next step I would calculate the statistics of the Elevation "band" -> _band{0}.value. (The _min value I would then Need for each polygon as height)

At this point I get stuck. At which part can I hand over the raster elevation for each each of my polygons? I already tried it with the FeatureMerger or Matcher but failed.

 

This is the workspace:

 

 

Thanks a lot for your suggestions!

 

 


3 replies

Userlevel 1
Badge +10

Are you merging attributes in your clipper? You want the clippee to inherit an ID from your polygon which you can then use in the featuremerger.

 

I find you get much better performance if you convert the raster to a point cloud

Badge

Are you merging attributes in your clipper? You want the clippee to inherit an ID from your polygon which you can then use in the featuremerger.

 

I find you get much better performance if you convert the raster to a point cloud

thanks a lot @egomm! I actually did not merge the attributes in the Clipper, just added this adjustment. How should I approach the FeatureMerger then? The requestors ID (polygons) is stored in the _count and from the supplier i need the value _min. (minimum height of each ) But i guess I need 2 rows that store the same values from the two input ports Requestor and Supplier...

The Thing is the following: Also if I merged the attributes of Clipper and Clippee in the ClipperTransformer, the attributes are not showing up in the next transfomer anymore (RasterCellCoercer has the rasterband as attribute). Am I missing something here?

 

Thanks a lot for your help.

 

 

Userlevel 1
Badge +10

thanks a lot @egomm! I actually did not merge the attributes in the Clipper, just added this adjustment. How should I approach the FeatureMerger then? The requestors ID (polygons) is stored in the _count and from the supplier i need the value _min. (minimum height of each ) But i guess I need 2 rows that store the same values from the two input ports Requestor and Supplier...

The Thing is the following: Also if I merged the attributes of Clipper and Clippee in the ClipperTransformer, the attributes are not showing up in the next transfomer anymore (RasterCellCoercer has the rasterband as attribute). Am I missing something here?

 

Thanks a lot for your help.

 

 

You will also want to group by _count in your statistics calculator, then you will have _count available to use on both sides of the featuremerger. The requestor will then inherit the min value from the supplier

Reply