object beforeAfter = Type.Missing; ISpatialReference sr = CreateHighPrecisionSpatialReference(4326,false,false); IPointCollection pc = new PolylineClass(); pc.AddPoint(new PointClass() { X = 0, Y = 0, SpatialReference = sr }, beforeAfter, beforeAfter); pc.AddPoint(new PointClass() { X = 10, Y = 10, SpatialReference = sr }, beforeAfter, beforeAfter); IPolyline polyline1 = (IPolyline)pc; IPointCollection pc2 = new PolylineClass(); pc2.AddPoint(new PointClass() { X = -5, Y = 5, SpatialReference = sr }, beforeAfter, beforeAfter); pc2.AddPoint(new PointClass() { X = 5, Y = 5, SpatialReference = sr }, beforeAfter, beforeAfter); IPolyline polyline2 = (IPolyline)pc2; if (((ITopologicalOperator)pc).IsSimple) { ILongArray la; IGeometryArray targetArray = new GeometryArrayClass(); targetArray.Add(polyline1); IGeometryServer2 geomServer = new GeometryServerClass(); IGeometryArray outGeomArray = geomServer.Cut(sr, targetArray, polyline2, out la); }
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.