You can use an AreaOnAreaOverlayer and have it create a list, then sort that list on the year/month (ListSorter) and use a ListIndexer, with index 1, to promote the attributes of the first list element to attributes on the feature itself.
Then Dissolve to merge adjacent areas with the same year/month value
You can use an AreaOnAreaOverlayer and have it create a list, then sort that list on the year/month (ListSorter) and use a ListIndexer, with index 1, to promote the attributes of the first list element to attributes on the feature itself.
Then Dissolve to merge adjacent areas with the same year/month value
Many thanks for the indications, but I couldnt do it....I dont know how to connect the list of attributes and the operators. I am not an expert in FME. psil.zip.
Could you help send me the specific model with this simple shapefile in attachment? psil.zip.If I understand a simple one, I could generate more complex
Many thansks in advance!
Many thanks for the indications, but I couldnt do it....I dont know how to connect the list of attributes and the operators. I am not an expert in FME. psil.zip.
Could you help send me the specific model with this simple shapefile in attachment? psil.zip.If I understand a simple one, I could generate more complex
Many thansks in advance!
Here you go:
overlaps.fmw
I'm using a StringSearcher to look for a regular expression in the path, in this case 20\\d{4} which means 20 followed by 4 digits, e.g. 201807, for a year/month combo. Then an AreaOnAreaOverlayer, set to create a list. So every point where 2 or more aerial photos overlap that overlap gets a list of all the year/month values. Then I use a ListSorter to sort on that year/month value, descending so the first list element is the most recent date. Finally a ListIndexer to grab the attributes from that first list element (we start counting at 0).
You can use an AreaOnAreaOverlayer and have it create a list, then sort that list on the year/month (ListSorter) and use a ListIndexer, with index 1, to promote the attributes of the first list element to attributes on the feature itself.
Then Dissolve to merge adjacent areas with the same year/month value
Easier for asking: I mean, if a I have a shapefile (many features) with a field called index (0,1,2...) in my original file in order to prioritize the overlap features (0 is more priority, then 1, 2, 3...).
I need the output shapefile promote this index field in the overlap areas (0, then 1, 2, 3..)prueba.fmwprueba.zip
When and how to connect ListSorter in the transformer "areaonareaoverlayer"? Thanks
Easier for asking: I mean, if a I have a shapefile (many features) with a field called index (0,1,2...) in my original file in order to prioritize the overlap features (0 is more priority, then 1, 2, 3...).
I need the output shapefile promote this index field in the overlap areas (0, then 1, 2, 3..)prueba.fmwprueba.zip
When and how to connect ListSorter in the transformer "areaonareaoverlayer"? Thanks
That would be the same concept: first overlay, create a list, then sort and index that list.
Here you go:
overlaps.fmw
I'm using a StringSearcher to look for a regular expression in the path, in this case 20\\d{4} which means 20 followed by 4 digits, e.g. 201807, for a year/month combo. Then an AreaOnAreaOverlayer, set to create a list. So every point where 2 or more aerial photos overlap that overlap gets a list of all the year/month values. Then I use a ListSorter to sort on that year/month value, descending so the first list element is the most recent date. Finally a ListIndexer to grab the attributes from that first list element (we start counting at 0).
Great! Many thanks! Just a question. The list sorter is not the recent month/ year, it is a different criteria. This is the promotion:
201809, 201808, 201807, 201806, 201805, 201810, 201909, 201908, 201907, 201806, 201905, 201910, 201709, 201708, 201707, 201706, 201705, 201710,
I dont know how to consider it in the model. I mean, the list sort should be:
I understand I should add a StringSearchParameter before LIstSort. Could you help me?
Many thanks!!!
Great! Many thanks! Just a question. The list sorter is not the recent month/ year, it is a different criteria. This is the promotion:
201809, 201808, 201807, 201806, 201805, 201810, 201909, 201908, 201907, 201806, 201905, 201910, 201709, 201708, 201707, 201706, 201705, 201710,
I dont know how to consider it in the model. I mean, the list sort should be:
I understand I should add a StringSearchParameter before LIstSort. Could you help me?
Many thanks!!!
You're probably going to have to use an AttributeValueMapper before the AreaOnAreaOverlayer to create a new attribute (let's call that priority) and map the year/month values to a simple 1...n range, then sort your list on that.
You're probably going to have to use an AttributeValueMapper before the AreaOnAreaOverlayer to create a new attribute (let's call that priority) and map the year/month values to a simple 1...n range, then sort your list on that.
Hello, again,
Following to overlaps.fmw, I dont understand why the output of areaonarealayer (before listsorter) consider month/year attribute of the most recent overlap. Is a criteria included in this operator? You say "Each new section has a list of year/month values" (areaonarealayer ), but I see for each section just one date/year (even it has 3 overlaps). Why?
Imean, if a feature is generated by 3 overlaps, why are not the 3 dates included and then we will include attributes selection, listsort, etc. I see the output (17 features) is the same as list shorter (17) and listindexer (17).
Anyway, I tried to include Attribute Value Mapper but it does not work. Could you please send me a model considering for example this priority in dates priority? 201705 (most priority), 201807, 201806, 201805 (less priority)?
Thanks a lot!
Hello, again,
Following to overlaps.fmw, I dont understand why the output of areaonarealayer (before listsorter) consider month/year attribute of the most recent overlap. Is a criteria included in this operator? You say "Each new section has a list of year/month values" (areaonarealayer ), but I see for each section just one date/year (even it has 3 overlaps). Why?
Imean, if a feature is generated by 3 overlaps, why are not the 3 dates included and then we will include attributes selection, listsort, etc. I see the output (17 features) is the same as list shorter (17) and listindexer (17).
Anyway, I tried to include Attribute Value Mapper but it does not work. Could you please send me a model considering for example this priority in dates priority? 201705 (most priority), 201807, 201806, 201805 (less priority)?
Thanks a lot!
In attachment a model including attributevaluemapper operator. I am doing something wrong. For example, FID 1 should be 201807 (and not 201806), FID 13 should be 201705 (and not 201806). prueba.fmwCan you help me? Thanks,
Hello, again,
Following to overlaps.fmw, I dont understand why the output of areaonarealayer (before listsorter) consider month/year attribute of the most recent overlap. Is a criteria included in this operator? You say "Each new section has a list of year/month values" (areaonarealayer ), but I see for each section just one date/year (even it has 3 overlaps). Why?
Imean, if a feature is generated by 3 overlaps, why are not the 3 dates included and then we will include attributes selection, listsort, etc. I see the output (17 features) is the same as list shorter (17) and listindexer (17).
Anyway, I tried to include Attribute Value Mapper but it does not work. Could you please send me a model considering for example this priority in dates priority? 201705 (most priority), 201807, 201806, 201805 (less priority)?
Thanks a lot!
You're probably looking at the Table View, lists don't show up there. If you select an overlapping part and check out the Feature Information window you should see the list elements:
So for that selected area, where 2 of the original polygons overlap, you'll see a _list{0} and _list{1} set of attributes, each holding the attributes of one of the original polygons.
The AttributeValueMapper would come before the AreaOnAreaOverlayer, to map the year/month values to a new attribute, FID in this case. Then change the ListSorter to sort on that attribute.