Skip to main content
Question

How to enable reading two features in parallel?


Forum|alt.badge.img+1

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?

14 replies

danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • October 20, 2017

Hi @sraapril,

If you change the position Readers on Navigator?

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

Thanks,

Danilo


Forum|alt.badge.img+1
  • Author
  • October 20, 2017
danilo_fme wrote:

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


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • October 20, 2017
sraapril wrote:

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 )?

 

 


Forum|alt.badge.img+1
  • Author
  • October 20, 2017
danilo_fme wrote:
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

nielsgerrits
VIP
Forum|alt.badge.img+54

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.


takashi
Influencer
  • October 20, 2017

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?


Forum|alt.badge.img+1
  • Author
  • October 20, 2017
takashi wrote:

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 :)

 

 


Forum|alt.badge.img+1
  • Author
  • October 20, 2017
nielsgerrits wrote:

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.

 


nielsgerrits
VIP
Forum|alt.badge.img+54
sraapril wrote:
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.

 


Forum|alt.badge.img+1
  • Author
  • October 20, 2017
nielsgerrits wrote:
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.

takashi
Influencer
  • October 20, 2017
nielsgerrits wrote:

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.

 


nielsgerrits
VIP
Forum|alt.badge.img+54
sraapril wrote:
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.

 


Forum|alt.badge.img+1
  • Author
  • October 20, 2017
takashi wrote:
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 :(

 


Forum|alt.badge.img+1
  • Author
  • October 20, 2017
nielsgerrits wrote:
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


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