Skip to main content
Solved

can't get name of las file


gklein_idl

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?

Best answer by ebygomm

"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

View original
Did this help you find an answer to your question?

2 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • December 7, 2018

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:


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • Best Answer
  • December 7, 2018

"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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings