Solved

can't get name of las file

  • 7 December 2018
  • 2 replies
  • 4 views

Simple Question:

I have a GeoTiff writer. I want the root name name of the GeoTiff to be the same as the root name from a LAS reader. So if the las file is called "cheese.las", the geotiff would end up as "cheese.tif".

I tried connecting the las reader to a FilenamePartExtractor, connecting the output of that to my geotiff writer, then setting my "Raster File Name" parameter as the "_rootname" value from that output:

 

 

Seemed logical - but now I'm getting this error:

GEOTIFF writer: Failed to obtain raster from feature. Only features with raster geometry are expected

 

It appears that new connection is sending the geometry of my las point cloud to the geotiff, when all I really need is the name of the thing.

What do I do?

icon

Best answer by ebygomm 7 December 2018, 21:40

View original

2 replies

Userlevel 2
Badge +12

I did some testing and the fme_basename itself should contain the name of the LAS file (without extension).

The fme_dataset contains the full path.

So, using fme_basename (or copying it into _rootname) should do the trick.

This image shows how I got the right output:

Badge +10

"GEOTIFF writer: Failed to obtain raster from feature. Only features with raster geometry are expected "

 

You are getting this error as you are sending two features to the writer, one of which is not a raster. You need to merge the attribute from the LAS reader onto the raster before writing

Reply