Solved

RasterDEMGenerator not carrying feature attributes through to output

  • 14 January 2019
  • 6 replies
  • 9 views

Badge +1

In my LAS reader I have selected fme_basename to be outputted as an attribute with the feature.

In the data inspector I can see it has correctly populated this attributed with the filename of my LAS.

The dropdown under DEMRaster in the ReasterDemGenerator shows that fme_basename is an attribute.

 

However when I look in the data inspector it doesn't contain my LAS filename but instead 'RasterDEMGenerator'

Is this correct? I was going to read multiple LAS files and output a DEM for each file, using the fme_basename as the filename for the DEM. Seeing it's not being carried through though I've had to create a user parameter and process one file at a time now.

Thanks in advance.

icon

Best answer by takashi 14 January 2019, 08:02

View original

6 replies

Badge +4

@rclarkenz

for some reason the pictures in your post are not visible.

When reading a LAS file, the reader allows you to set the FeatureTypeName either from File Name(s): Generates one feature type per source filename or from Format Name: Produces only a single feature type containing the format name.

Check if you have set this to format name?

LAS Reader Parameters

hope that helps

happy fme-ing :-)

srg

Userlevel 2
Badge +17

As you have observed, some raster transformers such as RasterDEMGenerator, NumericeRasterizer etc. generate/overwrite "fme_basename" with the transformer name. It seems to be the correct behavior, though I don't know why Safe's developers designed like that.

A possible workaround is to expose "fme_feature_type" in the LAS reader, and set it to the Group By parameter in the RasterDEMGenerator. You can then set the value of "fme_feature_type" to "fme_basename" with the AttributeCreator or the AttributeManager, if necessary.

Badge +3

@rclarkenz

 

Use the Group By in the RasterDEMGenerator and set it to basename (or featuretypename.)

Use same GroupBy in the fanout of the DEM writer.

 

These attributes are often replaced by the transformer name ( dem generated could be from a single featuretype, more or none. )

Badge +1

@rclarkenz

for some reason the pictures in your post are not visible.

When reading a LAS file, the reader allows you to set the FeatureTypeName either from File Name(s): Generates one feature type per source filename or from Format Name: Produces only a single feature type containing the format name.

Check if you have set this to format name?

LAS Reader Parameters

hope that helps

happy fme-ing :-)

srg

Thanks for this.

Not sure why pics don't showed up. They are showing on my screen. Weird.

happy fme-ing to you too :o)

Badge +1

As you have observed, some raster transformers such as RasterDEMGenerator, NumericeRasterizer etc. generate/overwrite "fme_basename" with the transformer name. It seems to be the correct behavior, though I don't know why Safe's developers designed like that.

A possible workaround is to expose "fme_feature_type" in the LAS reader, and set it to the Group By parameter in the RasterDEMGenerator. You can then set the value of "fme_feature_type" to "fme_basename" with the AttributeCreator or the AttributeManager, if necessary.

This has worked :o)

I guess I had seen fme_basename retain the filename in the past so was expecting it to do so here too.

I've learnt something new now so thank you.

Userlevel 2
Badge +17

As you have observed, some raster transformers such as RasterDEMGenerator, NumericeRasterizer etc. generate/overwrite "fme_basename" with the transformer name. It seems to be the correct behavior, though I don't know why Safe's developers designed like that.

A possible workaround is to expose "fme_feature_type" in the LAS reader, and set it to the Group By parameter in the RasterDEMGenerator. You can then set the value of "fme_feature_type" to "fme_basename" with the AttributeCreator or the AttributeManager, if necessary.

Hi @rclarkenz,

The output of the vector to raster transformers is extremely different from the input, with attributes only on the overall raster rather than the individual pixels, so we felt it was most accurate to discard any attributes that did not apply to the entire raster (ie. those chosen in the Group By).

The fme_basename attribute is a format attribute, and is often used to fan out the output data, so instead of being discarded, it is given the transformer name to signal that a vector to raster conversion has been applied to the data.

This is the reasoning behind the present behavior, but we are always happy to hear of ways that can be changed to improve our user's experience with FME.

Reply