Hi Juanma,
I think the AnchoredSnapper with Snapping Type: Vertex Snapping should be what you're looking for:
Your points should be the anchors and the polygons the candidates.
Cheers,
Francisco
Hi Juanma,
I think the AnchoredSnapper with Snapping Type: Vertex Snapping should be what you're looking for:
Your points should be the anchors and the polygons the candidates.
Cheers,
Francisco
I knew that Transformer, and results are quite unstable (images below) since I really need to point which vertex are needed to be moved and which no. For that reason, I wanted to rebuild the entire polygon, giving then the new information where the chosen vertex has a new X,Y coordinate. Even though, I'll give a try again to the AnchoredSnapper, maybe a workaround using it could help to solve this topic.
ex1
ex2:
I'll keep trying.
Thanks @fgiron!
J.
If you know exactly what coordinates to replace with what new coordinates, this will work:
Use GeometryExtractor to extract WKT type geometry to a text attribute.
Then use StringReplacer to replace old coordinates with new coordinates.
And finally GeometryReplacer to replace geometry with WKT geometry from text attribute.
But this only works if you know the exact old coordinates and new coordinates.
If you know exactly what coordinates to replace with what new coordinates, this will work:
Use GeometryExtractor to extract WKT type geometry to a text attribute.
Then use StringReplacer to replace old coordinates with new coordinates.
And finally GeometryReplacer to replace geometry with WKT geometry from text attribute.
But this only works if you know the exact old coordinates and new coordinates.
Thanks @erik_jan , wise solution too. But I'm finding now a second block. Since could be easy to change/swap vertex values on one case (detected VERTEX-A to swap values with VERTEX-Z,... what if a polygon need to swap a couple of vertexes: VERTEX-A and VERTEX-B must be changed with VERTEX-Z and VERTEX-Y, on that precise order?
Here is an example, where I encountered that situation:
From that case, Polygon "C", those 2 vertexes (yellow and purple arrow) need to be relocated to the green and pink arrow vertex, but also on that precise order.
I'm trying to find the logic from where when it sets the
first iteration (swapping yellow TO green)
continues on with next iteration (swapping purple TO pink),
using the new "_geometry" value after used StringReplacer.
My doubt here, how could I sequentially perform that change taking into account last "_geometry" value changed?
Thanks!
@juanmahere VertexCreator has an option Replace Point at Index. Combined with CoordinateExtractor and ListSearcher that might give you what you need.
To loop through all the points, you can wrap the algorithm in a Custom Transformer
@juanmahere VertexCreator has an option Replace Point at Index. Combined with CoordinateExtractor and ListSearcher that might give you what you need.
To loop through all the points, you can wrap the algorithm in a Custom Transformer
Hi @markatsafe, let me check that option and I'll post again if it's the desired output. Thanks for your help!! ;)