Skip to main content
Question

snap Roof polygon


venu
Contributor
Forum|alt.badge.img+5
  • Contributor
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

24 replies

david_r
Evangelist
  • February 10, 2014
Hi,

 

 

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

 

 

David

venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 10, 2014

 

 

 

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

 

 

Please advise me

 

 

 


david_r
Evangelist
  • February 10, 2014
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

takashi
Influencer
  • February 10, 2014
And also be aware that not-snapped polygons go to UNTOUCHED port.

venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 10, 2014
yes I have tried without group, but result is not coming as i expected.

 

 

 

 

 


takashi
Influencer
  • February 11, 2014
Try using "Vertex Snapping" as Snapping Type parameter of the Snapper.

venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 12, 2014
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.

takashi
Influencer
  • February 12, 2014
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?

venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 12, 2014
Hi Takashi,

 

 

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

 

 

Please advise me.

 

 

is there any option with python caller.

 

 

 

 

 

 

 


takashi
Influencer
  • February 12, 2014
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?

venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 12, 2014
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.

 

 

 

 

 

 


takashi
Influencer
  • February 12, 2014
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

venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 13, 2014
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

takashi
Influencer
  • February 13, 2014
I uploaded a workspace example named "PrototypeOf3DPolygonSnapper" to the Chatter. Go there and find the File.

 

This is also a test regarding the Chetter :)

takashi
Influencer
  • February 13, 2014
Updated the prototype. It's a Python Edition.

 

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

venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 14, 2014
Thanks,

 

Is there any option to set Z tolerance.

takashi
Influencer
  • February 14, 2014
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.

venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 14, 2014
please guide me how to control Z snap with tolerance

venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 14, 2014
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.

 

 

 

 


takashi
Influencer
  • February 14, 2014
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.

venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 14, 2014
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.

 

 


takashi
Influencer
  • February 14, 2014
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.

venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 14, 2014
Hi Takashi,

 

 

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

takashi
Influencer
  • February 14, 2014
Good to hear you achieved the goal.

 

I updated the workspace file in the Chatter.

 

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

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings