Hello;
I am trying to grab point features from an existing point layer (feature class), and add a new point feature into a different feature class at that location (based on irrelevant criterion).
What I have creates new features, however, It puts all the features on top of each other at a single location, far away from the actual points I got the geometry from. My code:
Does feature.Shape not have contain location? I thought it was complete geometry.
Do I need to manually store the Shape into the Shape field?
Thank you
I am trying to grab point features from an existing point layer (feature class), and add a new point feature into a different feature class at that location (based on irrelevant criterion).
What I have creates new features, however, It puts all the features on top of each other at a single location, far away from the actual points I got the geometry from. My code:
Code:
IFeature newConflict = fc.CreateFeature(); //feature class to create feature
newConflict.Shape = mFeat.Shape; //mFeat is where I am pulling data from into newConflict
newConflict.Shape.SpatialReference = mFeat.Shape.SpatialReference;
//check for field, then add values
if (newConflict.Fields.FindField(FieldName) != -1)
{
if (Value != null) Feature.set_Value(newConflict.Fields.FindField(FieldName), Value);
else Feature.set_Value(newConflict.Fields.FindField(FieldName), DBNull.Value);
}
newConflict.Store();
Do I need to manually store the Shape into the Shape field?
Thank you