Solved

PointOnRasterValueExtractor


Badge
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
icon

Best answer by takashi 17 May 2013, 02:04

View original

4 replies

Userlevel 2
Badge +17
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
Badge
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 :)

Userlevel 2
Badge +17

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.

Reply