Skip to main content

I have created a custom transformer for clipping using lastools. My input readers are LAS file and the polygon shape file. When I run the translation, the LAS data is read but my polygon reader is not initiated. Hence when running the command line tool, the polygon file is not loaded and I run into an error. I disabled the LAS reader to check if my shapefile reader is working fine. I get the same error this time but because the LAS is not loaded. (Obviously!) The point is that there is nothing wrong with the reader.

So, my question is how to ensure that both the readers are read at the same time when I run the translation so the my custom transformer can get both the input files for its command line argument?

Hi @sraapril,

If you change the position Readers on Navigator?

Select the Polygon -> drag and drop above the Las.

Thanks,

Danilo


Hi @sraapril,

If you change the position Readers on Navigator?

Select the Polygon -> drag and drop above the Las.

Thanks,

Danilo

Hi @danilo_inovacao

Thank you! But, it doesn't work.

That was my question in the first place. Irrespective of the order, only the first one is being read. How can I ensure both are read at the same time before they reach the custom transformer?

Regards,

Sravanthi


Hi @danilo_inovacao

Thank you! But, it doesn't work.

That was my question in the first place. Irrespective of the order, only the first one is being read. How can I ensure both are read at the same time before they reach the custom transformer?

Regards,

Sravanthi

Could you send the templatefile ( .fmwt )?

 

 


Could you send the templatefile ( .fmwt )?

 

 

 

How do I send it? Do you have an email? I can't attach anything larger than 1MB here and my template file is 42MB

If you have 2 connections coming from one transformer, like a Creator, you can right click the connection and control the connection order. If you combine this with FeatureReaders you will get what you want.


Hi @sraapril, the second reader will be launched after the first reader has completed reading all features. It's fundamentals of FME. You will have to design the custom transformer presupposing that.

By the way, the Clipper transformer can be used to clip a pointcloud by polygons. Why not use it?


Hi @sraapril, the second reader will be launched after the first reader has completed reading all features. It's fundamentals of FME. You will have to design the custom transformer presupposing that.

By the way, the Clipper transformer can be used to clip a pointcloud by polygons. Why not use it?

Oh okay! I am not sure how to design the custom transformer keeping this in mind. Will think of something. Thank you!

 

 

Yes, the clipper can be used. I am doing that as well. Since I am new to FME, I was learning how to build a custom transformer :)

 

 


If you have 2 connections coming from one transformer, like a Creator, you can right click the connection and control the connection order. If you combine this with FeatureReaders you will get what you want.

Hi @nielsgerrits

 

 

If I try your method, I am unable to expose some attributes like fme_basename etc which I use in my custom transformer :| This is what I kind of did but my custom transformer is red now.

 


Hi @nielsgerrits

 

 

If I try your method, I am unable to expose some attributes like fme_basename etc which I use in my custom transformer :| This is what I kind of did but my custom transformer is red now.

 

I think fme_basename is deprecated in 2017? You need to use another attribute, differs per format followed by a FilenamePartExtractor to get the filename.

 


I think fme_basename is deprecated in 2017? You need to use another attribute, differs per format followed by a FilenamePartExtractor to get the filename.

 

Not only that. I need fme_dataset to even use it in filenamePartExtractor. This is also important to run the cmd function for lasclip. Using feature reader I cannot expose any of these attributes.

If you have 2 connections coming from one transformer, like a Creator, you can right click the connection and control the connection order. If you combine this with FeatureReaders you will get what you want.

Don't worry. You can expose the format attributes from the Parameters button.

 


Not only that. I need fme_dataset to even use it in filenamePartExtractor. This is also important to run the cmd function for lasclip. Using feature reader I cannot expose any of these attributes.
The AttributeExposer transformer will do exactly that for you 🙂 Just enter the attribute you want to expose, like fme_dataset, manually in it.

 


Don't worry. You can expose the format attributes from the Parameters button.

 

@takashi

 

Thank you very much! I can expose them now 🙂 However, the results are the same as before. Only one gets picked :(

 


The AttributeExposer transformer will do exactly that for you 🙂 Just enter the attribute you want to expose, like fme_dataset, manually in it.

 

@nielsgerrits

 

Yes. I know about the attribute exposer 🙂 Anyway, I tried the method by @takashi to expose it. However, the results are the same despite setting connection order etc.

 

 


Reply