Unfortunately the current Snapper seems not to snap z value even if input geometries are 3D. As far as I know, there is no simple way to perform snap in 3D.
My idea for a workaround is:
1) Transform polygons into individual vertex points.
2) Apply a Snapper. The points will be processed in X-Y coordinate system.
3) Extract coordinates (x, y, z) using a CoordinateExtractor.
4) Replace every point with new point (x, z, y) using a VertexCreator (Mode: Replace with Point).
5) Apply a Snapper. The points will be processed in X-Z coordinate system.
6) Extract coordinates (x, z, y) using a CoordinateExtractor.
7) Replace every point with new point (x, y, z) using a VertexCreator (Mode: Replace with Point).
8) Re-create polygons from the points.
Regarding the way of transforming polygons into vertex points and re-creating polygons, see this thread again.
I couldn't find wrong settings in the image. The number of result polygons is 531, it matches with number of input polygons. But the first Snapper seems not to work. There might be parameter setting issue.
Would you please explain concretely about the contents of unexpected result?
One possible reason is that the Snapper changed the order of vertices, so then some vertices have been omitted when connecting. To determine if this is the reason, connect Inspector to POINT and LINE of the PointConnector to see unused vertices.
If there were unused vertices, try this.
1) Insert another Counter after the Chopper to append sequential number to every vertex.
Count Output Attribute: _count2
2) Insert a Sorter before the PointConnector to restore the order of vertices.
No, there isn't Z tolerance option. The custom transformer example gives same Z value unconditionally to all vertices which have been located at the same 2D coordinate after snapping by the regular Snapper.
If you need Z tolerance option, it will have to be improved.
Brown color roofs are original and yellow color roofs are generated with 3DPolygonSnapper _V4 transformer. after run the workbench some polygons are not coming.
Workbench
is there any z value filter option within same match_id points or any loop filter and then we can use previous version 3DPolygonSnapper custom transformer.
One possible reason is that start vertex and end vertex of some lines created by the PointConnector did not match. The PointConnector outputs a polygon only if start vertex and end vertex of created line are the same coordinate. Line features come from LINE port of the PointConnector?
If lines have appeared there, try adding these two transformers.
1) Insert a Snipper before the Snapper. The Snipper with this setting transforms a polygon into a line by removing end vertex.
Snipping Mode: Vertex
Starting Vertex: 0
Ending Vertex: -2
2) Insert a LineCloser between LINE of the PointConnector and the AttributeRemover. It transforms a line into a polygon by adding end vertex which matches with start vertex.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.