ArcGIS Pro二次开发SDK 对象分割Edit Operation Split Features
作者:互联网
var splitFeatures = new EditOperation(); splitFeatures.Name = "Split Features"; var splitPoints = new List<MapPoint>() { mp1, mp2, mp3 }; //Split the feature at 3 points splitFeatures.Split(featureLayer, oid, splitPoints); // split using percentage var splitByPercentage = new SplitByPercentage() { Percentage = 33, SplitFromStartPoint = true }; splitFeatures.Split(featureLayer, oid, splitByPercentage); // split using equal parts var splitByEqualParts = new SplitByEqualParts() { NumParts = 3 }; splitFeatures.Split(featureLayer, oid, splitByEqualParts); // split using single distance var splitByDistance = new SplitByDistance() { Distance = 27.3, SplitFromStartPoint = false }; splitFeatures.Split(featureLayer, oid, splitByDistance); // split using varying distance var distances = new List<double>() { 12.5, 38.2, 89.99 }; var splitByVaryingDistance = new SplitByVaryingDistance() { Distances = distances, SplitFromStartPoint = true, ProportionRemainder = true }; splitFeatures.Split(featureLayer, oid, splitByVaryingDistance); //Execute to execute the operation //Must be called within QueuedTask.Run splitFeatures.Execute(); //or use async flavor //await splitAtPointsFeatures.ExecuteAsync();
标签:Features,Pro,oid,featureLayer,splitFeatures,var,Split,二次开发,new 来源: https://www.cnblogs.com/gisoracle/p/16127862.html