Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Why the geometry can change when it is assigned to IFeature.Shape?

$
0
0
Hi Everybody:

I wrote a program to generate geometries for linear features. However, I found that the geometries are slightly changed after assigned to IFeature.Shape. Following is my code:

Code:

// newShape is IPolyline
m_editor.StartOperation();
m_linear_feature.Shape = newShape;
m_linear_feature.Store();
m_editor.StopOperation("Reshape linear feature");

I checked the coordinates of (newShape as IPolyline).ToPoint before and after running the line "m_linear_feature.Shape = newShape".

Before: X = -92.836516205759764, Y = 40.870457300856849, Z = 900.537152489813
After: X = -92.836516205999942, Y = 40.870457301000044, Z = 900.53715249001107

What is the reason for this change? Is there any way to avoid it?
Thank you!

Viewing all articles
Browse latest Browse all 1374

Trending Articles