Skip to main content
Question

DEM height to polygons


Forum|alt.badge.img

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

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • June 11, 2019

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


Forum|alt.badge.img
ebygomm wrote:

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.

 

 


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • June 12, 2019
sara_lenakordas wrote:

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


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