Skip to main content
Solved

PointOnRasterValueExtractor

  • May 16, 2013
  • 4 replies
  • 63 views

Forum|alt.badge.img
Hello,

 

 

I have a single band raster having elevation value in .jp2 format.

 

I want to extract the values of band{0}.value (as Z value) as an attribute on the locations of a point shapefile.

 

I tried to use PointOnRasterValueExtractor but it gives same value at each point.

 

 

Please suggest where I am wrong.

 

 

Thanks,

 

Vivek

Best answer by takashi

Hi Vivek,

 

 

Using the PointOnRasterValueExtractor is the right way to get the value of a specific location on a raster. In my experiences, it always works successfully. I don't see what's going on. If you want to set the elevation to the point as z coordinate, use the 3DForcer after the PointOnRasterValueExtractor.

 

 

Takashi
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.

4 replies

takashi
Celebrity
  • Best Answer
  • May 17, 2013
Hi Vivek,

 

 

Using the PointOnRasterValueExtractor is the right way to get the value of a specific location on a raster. In my experiences, it always works successfully. I don't see what's going on. If you want to set the elevation to the point as z coordinate, use the 3DForcer after the PointOnRasterValueExtractor.

 

 

Takashi

Forum|alt.badge.img
  • Author
  • May 21, 2013
Hi Takashi,

 

 

Thanks for your answer.

 

I was misssing band{0}.value.

 

I just put band{}.value assuming that since it is a one band raster so the values will be transferred automatically even without specifying 0.

 

 

Thanks,

 

Vivek

Hello can someone help me :)

 

I want to use the PointOnRasterValueExtractor but as a beginner i dont know how to make sure that the raster values become written ...can someone help :)


takashi
Celebrity
  • July 4, 2016

Hello can someone help me :)

 

I want to use the PointOnRasterValueExtractor but as a beginner i dont know how to make sure that the raster values become written ...can someone help :)

Hi @omarhamideg13, The PointOnRasterValueExtractor saves the band values into a list attribute called _band{}.value. If the source raster has a single band, expose '_band{0}.value' and connect it to the 'rastervalu' attribute of the writer feature type.

To expose list element(s), right-click on the list name (_band{}.value) shown under the transformer, select the 'Expose Elements' menu command, and then specify index of element(s) that should be exposed.

Alternatively, the ListIndexer can be used to extract the value of a list element at your specified index as a normal attribute.