Skip to main content
Solved

can't get name of las file

  • December 7, 2018
  • 2 replies
  • 44 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • 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+46
  • 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