One solution might be to use the SpatialFilter (or SpatialRelator) to first detect intersecting/touching polygons, then analyze the difference in AA between them. Where the difference is within your threshold, give all those polygons a unique value (e.g. UUIDGenerator) and use it as a Group By in the Aggregator.
Hey david_r,
thx for the answer. I will give it a try.
For me it feels "not right", when I use a transformer with just one dataset and use them for both "Filter" and "Candidate" -u know what I mean? But it seams, the SpatialRelator gives me the list, which I need to solve the problem.
Thx u very much!
One solution might be to use the SpatialFilter (or SpatialRelator) to first detect intersecting/touching polygons, then analyze the difference in AA between them. Where the difference is within your threshold, give all those polygons a unique value (e.g. UUIDGenerator) and use it as a Group By in the Aggregator.
It looks, like I am getting close to my goal, but there is still one problem: the SpatialRelator compares the requestor with the supplier. In my case, the request is the same as the supplier (one dataset).
That means, that the SpatialRelator not just compares Polygone1 with Polygone2, which can have a touch and/or intersect resault, moreover it compares Polygone1 with Polygone1, which gives, of course, a intersection relationship. This match goes into the List.
Now I got a list for each polygone with one entry with the resault of it's one relationship. But the list isn't ordert (or I can see the sorting). That means, the "selfresault" isn't coercively the {0} entry of the list (that would be nice).
Now I need to find a way, which delete the "selfresault" entry out of the list. The list include the ID of the polygone. So there is one entry in the list, which got _relationships{0}.ID = ID from the Polygone (but it needn't to be the {0} entry, could be {4} or {11} entry too).
Somebody got an idea?
And thx again .
It looks, like I am getting close to my goal, but there is still one problem: the SpatialRelator compares the requestor with the supplier. In my case, the request is the same as the supplier (one dataset).
That means, that the SpatialRelator not just compares Polygone1 with Polygone2, which can have a touch and/or intersect resault, moreover it compares Polygone1 with Polygone1, which gives, of course, a intersection relationship. This match goes into the List.
Now I got a list for each polygone with one entry with the resault of it's one relationship. But the list isn't ordert (or I can see the sorting). That means, the "selfresault" isn't coercively the {0} entry of the list (that would be nice).
Now I need to find a way, which delete the "selfresault" entry out of the list. The list include the ID of the polygone. So there is one entry in the list, which got _relationships{0}.ID = ID from the Polygone (but it needn't to be the {0} entry, could be {4} or {11} entry too).
Somebody got an idea?
And thx again .
Got it, the ListSearcher is my solution with "List Attribute"=ID and "Search For"=ID. Now I need to delete the entry out of the list with the detected indexnumber (how ever??).
Okay, I would like to open a new thread, but it is forbidden, couse I linked to this thread here. So, here is the question:
Hello there,
to solve my problem, I think I, need to do some math in a list.
The Problem:
I got a lot of polygones. All of them got an unique ID. Some polygones (2 ... n) belong together (but got different values in the attributes) they got the same Parent_ID, but different Child_IDs. Now I need to aggregate the Child_IDs group by the Parent_ID if they fit some conditions.
1. They need to intersect or touch each other. To identify this, I use the SpatialRelator (thanks to david_r) group by Parent_ID and I create a list which holds the Child_ID and attribute X of the polygones, where is an intersection or touch.
2. If the difference in attribute Z, which is calculatet out of attribute X (out of the list), is =< Y for the polygones, which intersect/touch each other, they will be aggregated.
After the SpatialRelator I got all attributes from Polygone1 + a list with the information which other polygones, with the same Parten_ID, intersect/touch Polygone1 in form of:
_relationships{0}.Child_ID
_relationships{1}.AttributeX
_relationships{1}.Child_ID
_relationships{1}.AttributeX
.
.
.
_relationships{n}.Child_ID
_relationships{n}.AttributeX
To solve the problem, I need to do a math operation like
"((Polygone1.AttributeX * _relationships{0}.AttributeX)/5)=Z"
for each entry in the list
(till "((Polygone1.AttributeX * _relationships{n}.AttributeX)/5")=Z).
I hope, that I can create a new list entry in the _relationship list which holds the result for each Child_ID.
After that, I need all relations out of the list, which are => Z. This Polygones I need to aggregat.
Does someone got an Idea?
How can I make math with lists and not only for a concrete entry in the list but for each Index entry in the list.
Thank you all!
Okay, I would like to open a new thread, but it is forbidden, couse I linked to this thread here. So, here is the question:
Hello there,
to solve my problem, I think I, need to do some math in a list.
The Problem:
I got a lot of polygones. All of them got an unique ID. Some polygones (2 ... n) belong together (but got different values in the attributes) they got the same Parent_ID, but different Child_IDs. Now I need to aggregate the Child_IDs group by the Parent_ID if they fit some conditions.
1. They need to intersect or touch each other. To identify this, I use the SpatialRelator (thanks to david_r) group by Parent_ID and I create a list which holds the Child_ID and attribute X of the polygones, where is an intersection or touch.
2. If the difference in attribute Z, which is calculatet out of attribute X (out of the list), is =< Y for the polygones, which intersect/touch each other, they will be aggregated.
After the SpatialRelator I got all attributes from Polygone1 + a list with the information which other polygones, with the same Parten_ID, intersect/touch Polygone1 in form of:
_relationships{0}.Child_ID
_relationships{1}.AttributeX
_relationships{1}.Child_ID
_relationships{1}.AttributeX
.
.
.
_relationships{n}.Child_ID
_relationships{n}.AttributeX
To solve the problem, I need to do a math operation like
"((Polygone1.AttributeX * _relationships{0}.AttributeX)/5)=Z"
for each entry in the list
(till "((Polygone1.AttributeX * _relationships{n}.AttributeX)/5")=Z).
I hope, that I can create a new list entry in the _relationship list which holds the result for each Child_ID.
After that, I need all relations out of the list, which are => Z. This Polygones I need to aggregat.
Does someone got an Idea?
How can I make math with lists and not only for a concrete entry in the list but for each Index entry in the list.
Thank you all!
Generally speaking, I tend to break out Python every time I have to do something non-trivial with lists in FME. The list-based transformers are (in my opinion) lacking some basic functionality, e.g. deleting or adding a list item, sorting by multiple keys, etc.
Fortunately, the feature attribute lists map easily to Python lists through the fmeobjects API, and the list items are then very easy to manipulate if you've some previous experience in Python or similar programming languages.
Generally speaking, I tend to break out Python every time I have to do something non-trivial with lists in FME. The list-based transformers are (in my opinion) lacking some basic functionality, e.g. deleting or adding a list item, sorting by multiple keys, etc.
Fortunately, the feature attribute lists map easily to Python lists through the fmeobjects API, and the list items are then very easy to manipulate if you've some previous experience in Python or similar programming languages.
Puh... ähm -nope!
I do some SQL Statements, but thats all ... I try to workaround with the ListExploder.
If I got the solution, I will post it here ...
Generally speaking, I tend to break out Python every time I have to do something non-trivial with lists in FME. The list-based transformers are (in my opinion) lacking some basic functionality, e.g. deleting or adding a list item, sorting by multiple keys, etc.
Fortunately, the feature attribute lists map easily to Python lists through the fmeobjects API, and the list items are then very easy to manipulate if you've some previous experience in Python or similar programming languages.
Okay I got a brainknurl (if u say it like this in english):
Now I got a table like this:and the couples are right in front of my eyes!
Child_ID with LIST_Child_ID. So Polygone10 with 11, 11 with 10 (there I need to finde a solution, which kick the duplex entrys out of my table) 11 with 14 and so on.
But the brainknurl is too thick !
Generally speaking, I tend to break out Python every time I have to do something non-trivial with lists in FME. The list-based transformers are (in my opinion) lacking some basic functionality, e.g. deleting or adding a list item, sorting by multiple keys, etc.
Fortunately, the feature attribute lists map easily to Python lists through the fmeobjects API, and the list items are then very easy to manipulate if you've some previous experience in Python or similar programming languages.
Good Morning,
so yet, I didn't fix the problem. Maybe some of you can bear a hand.
I just find the Matcher, maybe he can help me?
With the projection from takashi out of this thread (https://community.safe.com/s/question/0D54Q00008531yeSAA/how-to-merge-adjacent-polygons-while-retaining-the-common-attributes) I was able too fix my problem!
How can I share with you the solution? I tried to upload a pdf file with the workflow, but it is forbidden. Can I take pictures out of FME?
Maybe several png files and I put them in paint together:
It looks, like I am getting close to my goal, but there is still one problem: the SpatialRelator compares the requestor with the supplier. In my case, the request is the same as the supplier (one dataset).
That means, that the SpatialRelator not just compares Polygone1 with Polygone2, which can have a touch and/or intersect resault, moreover it compares Polygone1 with Polygone1, which gives, of course, a intersection relationship. This match goes into the List.
Now I got a list for each polygone with one entry with the resault of it's one relationship. But the list isn't ordert (or I can see the sorting). That means, the "selfresault" isn't coercively the {0} entry of the list (that would be nice).
Now I need to find a way, which delete the "selfresault" entry out of the list. The list include the ID of the polygone. So there is one entry in the list, which got _relationships{0}.ID = ID from the Polygone (but it needn't to be the {0} entry, could be {4} or {11} entry too).
Somebody got an idea?
And thx again .
The SpatialRelator has an attributes that must differ option so you can exclude comparing a feature against itself when you are using the same data as supplier and requestor