Select to view content in your preferred language

Difference in Simplify result compared to ArcObjects

376
0
05-23-2020 07:16 AM
Vamsi_KrishnaYarramaasu
Emerging Contributor

Following code snippets shows the conversion/replacement code I have for migrated code. ArcObjects code returns false and Pro SDK returns true. Am I missing something here ?

//ArcObjects 
CType(lineFeature.Shape, ESRI.ArcGIS.Geometry.ITopologicalOperator2).IsKnownSimple_2 = False
If Not CType(lineFeature.Shape, ESRI.ArcGIS.Geometry.ITopologicalOperator2).IsSimple Then
	//Show message that feature is not simple
End If

//Pro SDK
GeometryEngine.Instance.SimplifyAsFeature(shape);
if (!GeometryEngine.Instance.IsSimpleAsFeature(shape))
{
	//Show message that feature is not simple
}

Sample geometry:
X1 556998.34520000033
Y1 4220274.6404
X2 556921.31929999962
Y2 4220191.6895
X3 556998.34520000033
Y3 4220274.6404

0 Kudos
0 Replies