Skip to main content
Question

Extract raster Z values from intersect with vector polygon.

  • October 8, 2014
  • 7 replies
  • 137 views

Forum|alt.badge.img+1
I have a LiDAR DTM raster file.  I would like to overlay a polygon vector in TAB format onto the raster and then extract all the Z values from the raster at the points where they intersect the polygon.  I can't work out which transformers will help me do this though..  Any ideass?

 

 

Thanks,

7 replies

david_r
Evangelist
  • October 8, 2014
Hi,

 

 

take a look at the Chopper (to convert polygon vertices to points) and the PointOnRasterValueExtractor, see if they help you along.

 

 

David

Forum|alt.badge.img+1
  • Author
  • October 8, 2014
Thanks David.  The Chopper appears to be converting the TAB area to smaller areas rather than to points though... I'm not very familiar with TAB files so not sure how they operate but do I need to convert it to another format first for it to go through the chopper?

david_r
Evangelist
  • October 8, 2014
Have you set the Chopper to "By Vertex" and "Maximum vertices" to 1?

 

 

There is no need to convert the TAB files first, that's the whole point of FME :-)

 

 

David

Forum|alt.badge.img+1
  • Author
  • October 8, 2014
Thanks David, I hadn't set the Maximum Vertices to 1!

 

 

So I have the Chopper working now, but I can't figure out how to get the band{}.value attribute from the PointOnRasterValueExtractor into the output TAB file.  When I bring it across it brings over a -9999 instead of the actual Z value of the cell....

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • October 8, 2014
That would give him values at vertice location?

 

 

Why not just clip the raster?

 

Or if u need the values at polygonboundary,  buffer the polygonedge by diagonal of the rastercellsize and clip the raster.

 

Then extract the desired values.

david_r
Evangelist
  • October 8, 2014
Gio, you're right, it depends on the goal.

 

 

Perhaps some more details from 'aquamarine' is in order.

 

 

David

Forum|alt.badge.img+1
  • Author
  • October 8, 2014
Thanks Gio/David.  Getting the Z values at the vertex locations is all I need. I realised I hadn't exposed the 0 Band which was why I was getting -9999.  But I've got it working now.

 

 

Thank you both for your help :)

 


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