Question

I would like to extract elevation values from a GeoTiff or ESRI Grid but to no avail. The Tiff only exposes the datatype and fme_basename. I have tried different transformers to expose the elevation value Band 0 (REAL32) but nothing has worked.

  • 30 March 2021
  • 9 replies
  • 102 views

RasterValueExtractor


9 replies

Userlevel 2
Badge +17

Hi @robeesafe​ ,

After the PointOnRasterValueExtractor, the point output will have the list attribute _band{}.value present on it. This does not seem to be exposed by the transformer, but you can expose it with an AttributeExposer transformer. Each element of the list is the value for that band, so the Band 0 value would be in attribute _band{0}.value.

I have notified our development team that the output attributes need to be exposed on the PointOnRasterValueExtractor.

Hello daveatsafe, please see my diagram that accompanied the question. I tried to use the RasterBandSeparator followed by AttributeExposer, and this too did not work. Perhaps your development team can do something about exposing Band 0 up front at the GeoTiff level. Thanks for your suggestion.

Userlevel 2
Badge +17

Hi @robeesafe​ , can't you see the list name "_band{}.value" under the output port of the PointOnRasterValueExtracter?

The list attribute stores value(s) of a raster cell matched the point location, and you can extract a band value from the list by specifying an element index (= band index). For example, you can assign 0 band value to a new attribute (e.g. called "value") with an AttributeCreator, as in;

 

pontonrastervalueextractor 

Note: Depending on FME version, the list name "_band{}.value" may not be exposed there. If so, insert the AttributeExposer to expose the list name manually, like this.

 

attributeexposer

Badge

I am attempting this same process but I am not seeing any elevation values in the output. I verified that the GeoTiff and the point files overlap. Also, when I use the Data Inspector on the GeoTiff, I see the Band 0 (REAL 32) has an elevation value. I cannot tell why this process is not working.

image 

Userlevel 2
Badge +17

I am attempting this same process but I am not seeing any elevation values in the output. I verified that the GeoTiff and the point files overlap. Also, when I use the Data Inspector on the GeoTiff, I see the Band 0 (REAL 32) has an elevation value. I cannot tell why this process is not working.

image 

Make sure that the point geometries and the GeoTIFF raster are in the same coordinate system and also the points are within extents of the GeoTIFF.

A quick way is to check the data with FME Data Inspector.

Badge

My input file's coordinate system were all "Not Set" so I changed them to "NAD27-48LL" and reran the process. I double checked and the point file overlays the GeoTiff for a large portion of each file. I am still not getting elevation data in the output.

imageimage

Userlevel 2
Badge +10

My input file's coordinate system were all "Not Set" so I changed them to "NAD27-48LL" and reran the process. I double checked and the point file overlays the GeoTiff for a large portion of each file. I am still not getting elevation data in the output.

imageimage

Hi @gcarmich​ I've tested this with my own dataset and everything seems to be working okay using the same processes (correct coordinate system > PointOnRasterValueExtractor > AttributeCreator). I have a couple questions to better understand what's going on here:

  • What version of FME are you running? I was able to get this working in FME 2021.2.0.0 (Build 21784)
  • Are you able to try this with a different dataset to see if the issue is to do with the dataset?
  • Are you able to share your source data with us? If you're not comfortable sharing your data publicly you can upload it to our Safe Software Support FTP.

 

Let me know what you find out.

Badge

I'm running  2021.1.0.0 (20210630 - Build 21607 - WIN64)

I rebuilt the process using different data and still did not get the elevation extraction in the results.

All the data is available on the Internet and is not proprietary. I have uploaded the most recent process and data to the ftp repository under:

point_on_raster_overlay_extractor.zip

My ultimate goal is to create 3D building models from LIDAR point clouds (https://community.safe.com/s/article/point-cloud-to-3d-terrain-model-with-buildings-dwg) but I need the base building elevations first and I am therefore trying to get this process working.

 

Thank you.

Badge

I changed to the 1/3 arc second from the 1 m GeoTiff and the process was sucessful. There might be an issue with reading the 1m files - I had tried a few of them for this process. 1/3 arc second will work for my needs. Thank you!

Reply