Hi,
This is an approach restoring original attributes based on spatial relationship.
Takashi
If you don't need the original polygons any more, it's also possible to transform original polygons and expend them.
Hi Takashi,
First of all thanks for your reply.
Saving all the attributes in a point feature and then getting back based on their spatial relationship is also good idea. But in my case this workflow is not the perfect one as after generalization of polygon it is quite possible that this point is not in the right polygon anymore. Please correct me if I am wrong.
What I am looking a way to use right/left polygon information and use it to join data.
Suggestions?
How much amount is the maximum moving distance of lines by the generalization? If the amount is not so large, the AnchoredSnapper (Snapping Type: Segment Snapping) could be used to fit edges of the original polygons to the generalized lines without losing their attributes.
Well maximum moving distance is 25 to 50 meters.
I have a really big doubts that AnchoredSnapper can help me.
Agree that the distance could be too large for the snapping.
The next approach. Assuming that every result polygon overlaps its original polygon:
(1) Create polygons that represent boundary moving areas based on the original boundary lines and the generalized lines (Intersector + AreaBuilder).
(2) Cut the original polygons by the moving areas to create polygons that don't overlap with the moving areas (Clipper).
(3). For the result polygons, save the geometry as attribute (GeometryExtractor), and then cut them by the moving areas as well (Clipper).
(4) Transfer attributes of the (2) polygons to the (3) polygons based on their spatial relationships (SpatialRelator).
(5) Restore geometry of the (3) polygons (GeometryReplacer).
thanks for your workflow i will give it a try.
In the mean time after spending some time on the output of Topology builder, I have found another workflow which is working perfectly.
1. Convert all multipart features to single part(Deaggregator).
2. Add ID field using Counter (Tip is start from 1 as FME feature ID is starting from 1).
3. Build Topology and extract lines out of it.
Generlization part (missing from the following workflow as i am still working on it)
5. Remove extra attributes only keep right/left polygon.
6. Now select all lines with Right polygon value and from left Polygon only select whose value is > 0(this means we dont want to select island again) and rename both of them as poly_ID.
7. Pass this both selected layers (lines) to Aggregator and then use Geometry coercer to extract polygon.
Attached is snap shot of workflow. Please let me know your views on this workflow.
Hi Irfan,
After you have created the lines from the polygons, at wich point you should have a identifier for the original polygon, you can use a intersector and set a listname.
When you create a polygon using the AreaBuilder, you can acces this list per polygon to acces the data u need/wish to keep or propagate.
One way of doing this is by Historgramming the list attributes per Object sorting them ascended and picking the largest one (listindex = 0). I usually use demoteprefix "Passed_" Then you can use a searcher to search the "Passed_value" in the list created with the intersector.
The resulting "_list_index" than can be used to acces the relevant values.
The idea is that when a area is built and each "borderline" has a list containing the ID of the original polygons, a rebuild polygon will have its own original ID as highest count (hence histogrammer)
You may want or need to preserve End points int the SherbendG.
Here isthe bit of a script that does this:
The intersector is just prior to the Areabuilder (in my case)
This bit was build with the intention of passing required attributes by the AreaBuilder (no spatial operations were allowed here)
I found that the AreaBuilder append the information about the direction of every segment line ("same" or "opposite") to the resulting areas, if you specify Polygon List Name parameter. So this workflow is also possible.
Perfect, this was exactly what i was looking, Thanks Takashi once again for your help.