AnsweredAssumed Answered

How to edit a polygon shape

Question asked by ManelKeddar on Aug 2, 2017
Latest reply on Aug 2, 2017 by JNery-esristaff


I have a feature Layer represented with a featureClass that contains a 2D Geometry field (polygon type)

i stored on the feature class some polygons i need to edit the shape of the polygon(the geometry) but i didn't know how to do it , i didn't find any method on Polygon class that helps me to extract any point of the polygon and try to move it for example here what i have tried but didn't work 


private async void update2D()
var featureTableUri = new System.Uri("");
var table = new ServiceFeatureTable(featureTableUri);
await table.LoadAsync();
MyMapView.Map = new Map();
var layer = new FeatureLayer(table);

var queryPoint = new MapPoint(0, 1670.82);
var buffer = GeometryEngine.Buffer(queryPoint, 5000);
//Use the buffer to define the geometry for a query
var query = new QueryParameters();
query.Geometry = buffer;
query.SpatialRelationship = SpatialRelationship.Contains;
//select features in a feature layer using the query
await layer.SelectFeaturesAsync(query, Esri.ArcGISRuntime.Mapping.SelectionMode.New);
var couche = MyMapView.Map.OperationalLayers[0] as FeatureLayer;
var coucheSelectionne = await couche.GetSelectedFeaturesAsync();

//Boucler sur tous les features dans la selection
foreach (ArcGISFeature f in coucheSelectionne)
//Load the feautre
await f.LoadAsync();

var location = (Esri.ArcGISRuntime.Geometry.Multipoint)f.Geometry ;
var pointsX = location.Points[0].X;
var pointY = location.Points[0].Y + 5000;
var newLocation = new MapPoint(pointsX, pointY);
//set the feature's new location
// f.Geometry = newLocation;
//update the feature in the local cache with the edits
await table.UpdateFeatureAsync(f);


//Apply all the edits back to the service feature table
var editResults = await table.ApplyEditsAsync();


Any help would be appreciated