Skip to main content
Below shown image is my roof polygon, while zoom in close the roof edges are not snapped properly please check second image is my cocern.

 

 

Please advise me to clear the snap error in x,y,z

 

 

 

 

 

 

 

 

 

Thanks in advance
Hi,

 

 

take a look at the Snapper and the AnchoredSnapper. Consider using the Group By-clause, if possible.

 

 

David

 

 

 

I have tried with two option i don't know where i am doing wrong.

 

 

Please advise me

 

 

 


Hi,

 

 

remember that tolerance is in ground units of the input dataset. Make sure that the input dataset has a defined coordinate system.

 

 

To debug, try to temporarily remove the Group By-clause and to increase the Tolerance value.

 

 

David
And also be aware that not-snapped polygons go to UNTOUCHED port.
yes I have tried without group, but result is not coming as i expected.

 

 

 

 

 


Try using "Vertex Snapping" as Snapping Type parameter of the Snapper.
Yes I have tried with Vertex Snapping its working with XY coodinate not with Z coodinate.Please can guide me how to snap Z coordinates.
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.

 

Edit Vertex Z value in polygon (https://safecommunity.force.com/CommunityAnswers?id=906a0000000cwW2AAI)

 

 

In addition, if you filter the points with a Matcher (Match Geometry: 2D) after the 1st Snapper, it could become more efficient.

 

 

... even so, it looks inefficiently. Are there any other idea?
Hi Takashi,

 

 

I have tried as you suggested but its not snapping properly.

 

 

Please advise me.

 

 

is there any option with python caller.

 

 

 

 

 

 

 


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?
Before run the workbench

 

 

 

 

 

After run the workbench

 

 

 

 

 

 

I have tried with different tolerance. in some place z value is adjusted, XY also change where before its correct.

 

 

 

 

 

 


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.

 

Sorting Attribute: _count2, Numeric, Ascending
Hi Takashi,

 

 

I have tried with your suggestion, but its not snapping, looks same before I shown screens.

 

 

is there any chance with python or any custom transformer
I uploaded a workspace example named "PrototypeOf3DPolygonSnapper" to the Chatter. Go there and find the File.

 

This is also a test regarding the Chetter 🙂
Updated the prototype. It's a Python Edition.

 

Assume vertices matching on XY also should have the same Z.
Thanks,

 

Is there any option to set Z tolerance.
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.
please guide me how to control Z snap with tolerance
Hi Takashi,

 

 

 

Below shown screen shot marked with red color roof need to snap and marked with blue color roof should not snap.

 

 

Please advise me.

 

 

 

 


Updated again. Added Z Tolerance parameter. Try this.

 

https://safecommunity.force.com/069a0000003da0l

 

It's not true 3D snapping logic, is a kind of "corner-cutting" algorithm. But it probably can be used to satisfy your requirement.
Takashi,

 

 

Thanks for updation,

 

 

below screen shot 

 

 

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.
Hi Takashi,

 

 

Thanks for the support to achieve my goal and I have done it as per your guidance its working fine.
Good to hear you achieved the goal.

 

I updated the workspace file in the Chatter.

 

https://safecommunity.force.com/069a0000003da0l

 


Reply