geometrycutter
Description
The bundle provides tools for geometry editing. Currently supported functionality includes spliting Polygon or LineString with user drawn LineString and clipping any geometry with user drawn Polygon.
The target geometry to be cut is assumed to be rendered by the requesting functionality. Geometrycutter only renders the user drawn cutting feature and the cutting results for the duration of the cutting operation. That is, after StopGeometryCuttingRequest, map is cleared from any temporary features rendered by geometrycutter.
Usage
- Send
StartGeometryCuttingRequestwith target GeoJSON and mode - Listen to
GeometryCuttingEventfor updates (if needed) - Send
StopGeometryCuttingRequestwhen you wish to stop functionality
Bundle configuration
No configuration is required.
Requests the bundle sends out
| Request | Where/why it's used |
|---|---|
| DrawTools.StartDrawingRequest | Starts cutting geometry drawing |
| DrawTools.StopDrawingRequest | Stops cutting geometry drawing |
| MapModulePlugin.AddFeaturesToMapRequest | Shows geometry cutting results on map |
Events the bundle listens to
| Event | How does the bundle react |
|---|---|
| `DrawingEvent` | Uses drawn geometry as cutting feature |
| `FeatureEvent` | Listens to clicks. Highlights cutting results displayed on map |
Dependencies
| Dependency | Linked from | Purpose |
|---|---|---|
| JSTS | Version 1.4.0 assumed to be linked | Used for geometrical operations |