I need to add a point in an existing feature class using .NET API of ArcGIS Server 10 in C# (Visual Studio 2008). I'm using a sample from ESRI Resource Center (ArcGIS_SimpleEdit_CSharp). The following shows the portion of the code that creates the new point using X/Y coordinates.
ESRI.ArcGIS.Geometry.IPoint aoPoint =
serverContext.CreateObject("esriGeometry.Point") as ESRI.ArcGIS.Geometry.IPoint;
aoPoint.PutCoords(actionRecord.Location.X, actionRecord.Location.Y);
...
// Create a feature and set its geometry and attributes to those specified by the
// passed-in action record
ESRI.ArcGIS.Geodatabase.IFeature feature = featureClass.CreateFeature();
feature.Shape = aoPoint;
feature.set_Value(featureClass.FindField("Name"), actionRecord.name);
feature.set_Value(featureClass.FindField("LocationId"), actionRecord.id);
feature.set_Value(featureClass.FindField(actionRecord.id), "1");
int trackingNumber = feature.OID;
// Commit the new feature to the database
feature.Store();
workspaceEdit.StopEditOperation();
workspaceEdit.StopEditing(true);
But I need to use Latitude and Longitude (with decimal precision) instead of X/Y coordinates. How can I do that? Can I just use lat/lon instead of X/Y? Or I have to convert lat/lon to X/Y before assigning feature.Shape?