View on GitHub
import InlineCode from "@esri-dx/starship-doc-components/components/InlineCode.astro";

Cut a geometry along a polyline.

Screenshot of cut geometry sample

Use case

You might cut a polygon representing a large parcel to subdivide it into smaller parcels.

How to use the sample

Tap the button to cut the polygon with the polyline and see the resulting parts (shaded in different colors).

How it works

  1. Pass a
    and a
    to the
    method to cut the geometry along the given polyline.
  2. Loop through the returned list of part geometries. Some geometries may be multi-part.
  3. Create a
    instance from the part and add it to a
    .

Relevant API

  • Geometry
  • GeometryEngine
  • Graphic
  • GraphicsOverlay
  • Polygon
  • Polyline
  • static GeometryEngine.cut(_:usingCutter:)

Tags

cut, geometry, split