2

New to FME, and I have now spent more time than I would like to admit on this and need some pointers.

I have a GPX file that was made from a Shapefile. It has no elevation data.

I have the Terrain50 DEM as a GeoTIFF. I am using PointsOnRasterValueExtractor in FME to allocate the elevation data to the points before resaving the GPX. I have many thousands of these to do so I want to be able to batch process this.

I have checked that the two datasets are in the same projection, when I view the raster dataset in FME it has the data I need but I can't seem to populate the GPX Elev field. What am I doing wrong?

enter image description here

0

2 Answers 2

1

How are you attempting to populate the Elev field? As per the documentation for the PointsOnRasterValueExtractor transformer,

The interpolated values are added to a new list attribute, named _band{}.value and _band{}.palette{}.value, respectively.

You will need to use an AttributeManager transformer to assign these values to the Elev field. Because, the PointsOnRasterValueExtractor transformer creates list attributes, you'll need to select the position of the list of your _band{}.value. Assuming your DEM is a single band, the list index should be 0. Then, with a writer, write them to the GPX files.

3
  • Can I add a screenshot at all? My raster is returning the Band ) values and when I look at the feature information is has Band 0 (REAL32) with a value. But I still cannot get that Value to populate the ele tag in my GPX. Thank you for your help Commented Jan 18, 2021 at 9:59
  • Yes you can edit your post and insert an image.
    – Fezter
    Commented Jan 18, 2021 at 10:08
  • thank you - I've added a picture Commented Jan 18, 2021 at 11:04
0

The doc for that writer says:

Feature Attribute   GPX XML Entity 
elevation           ele (The writer ignores this value, 
                    using the z-value of the geometry instead.)

So if you put a 3DForcer transformer in there, and set it to use the value of _band{0}.value then it should write that information out to the GPX file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.