Skip to main content
Solved

How can I select object by attribute from aggregated objects


Forum|alt.badge.img
Hi,

 

How can I select object by attribute from aggregated objects

 

I have an excel files with 1000 lines and shapefile with 100 lines and I have a common id.. I did a Featuremerge to add attributes from excel to geometry. In the result I have 1000 lines (or 100 lines if I do an aggregation with id). I want to have in the result only 100 objects with the recent date (Example for object with id=5 I have in excel date=2015/05/12 with type =x1 and 2015/01/01 with type x2 and I want that id =5 have the attribute of 2015/05/12 with x1)..

 

Thanks for help

Best answer by takashi

Hi,

 

 

I would try filtering the Excel line features, before the FeatureMerger. e.g.

 

Sort the Excel lines by the date descending with a Sorter, and select the first line (i.e. most recent) in each group of lines having the same "id" with a DuplicateRemover (Key Attributes: id). 

 

 

Takashi
View original
Did this help you find an answer to your question?
<strong>This post is closed to further activity.</strong><br /> It may be a question with a best answer, an implemented idea, or just a post needing no comment.<br /> If you have a follow-up or related question, please <a href="https://community.safe.com/topic/new">post a new question or idea</a>.<br /> If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Evangelist
  • Best Answer
  • October 14, 2015
Hi,

 

 

I would try filtering the Excel line features, before the FeatureMerger. e.g.

 

Sort the Excel lines by the date descending with a Sorter, and select the first line (i.e. most recent) in each group of lines having the same "id" with a DuplicateRemover (Key Attributes: id). 

 

 

Takashi

Forum|alt.badge.img
  • Author
  • October 15, 2015
thanks.. it works... (I did the Sort and DuplicateRemover after FeatureMerger and it is ok also)

 

 

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