Strange result of the SimplifyAsFeature method

634
4
09-14-2017 12:07 AM
MaxMax2
Occasional Contributor II

I noticed that GeometryEngine.SimplifyAsFeature method produces strange results sometimes. For this polygon:

the method produces this result:

In my opinion such results are at least unobvious. Can you explain why I get it?

I've attached the test data.

0 Kudos
4 Replies
AnnetteLocke
Esri Contributor

Hi Max,

SimplifyAsFeature removes degenerate segments. A segment is degenerate if its length is less than 2 * sqrt(2) * tolerance of the spatial reference. The spatial reference for your data has tolerance = 2.0E-5, so any segment with length less than 5.657E-5 is degenerate. The length of the two shortest segments in the polygon are 3.3E-5 and 4.3E-5, so they are removed.

Hope this helps.

Annette

MaxMax2
Occasional Contributor II

Hi Annette,

Thank you for explanation! Can you say, this formula is just heuristic or it is something that absolutely right in any case? I'm going to not perform SimplifyAsFeature for this data to preserve those segments since I don't think they are degenerated. Or I should definitely simplify the polygon with this method?

Max

0 Kudos
AnnetteLocke
Esri Contributor

This formula will be used in any case. To store the polygon in the database it has to be simplified.

Annette

0 Kudos
MaxMax2
Occasional Contributor II

Annette,

But I've attached the test data that is FGDB with unsimplified polygon, so it is definitely can be stored in database without applying the specified formula. Also I'm able to output this polygon to a new feature class without any error. Anyway thanks for information!

Max

0 Kudos