Hi,
I want to create a tool which splits rectangles on the basis of clicks.
In the below rectangle, x denotes the click location.
|-----------------------------|
| x |
|-----------------------------|
Output:
|------ |----------------------|
| | |
|-------|----------------------|
I'm completely new to ArcGIS Pro SDK, so would like to know whether it is even possible to create a tool with such functionality.
If it is possible, I will be very grateful if someone can guide me on how to proceed with creating such a tool.
Have you seen the ArcGIS Pro SDK documentation?
Yes, but going through the available tutorials only provides an introductory overview of the ArcGIS Pro SDK. I was hoping that someone with experience will point me to the relevant parts of the SDK for implementing the said functionality.
Hi Sarthak,
Please check out this sample,
https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Editing/SketchToolDemo
This sample demonstrates a 'cut' tool that allows an editor to sketch a line over a set of existing features, if a polygon is intersected by the sketch line, the polygon will be cut by the sketched line.
Thanks
Uma
Hi Sarthak and Uma,
Quick update, the sample is available here:
https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Editing/SketchToolDemo
Thanks,
-Max
Thanks for the sample, going through the sample code provided a good overview of some of the functionalities in the SDK. Few follow-up questions:
- Is it possible to access the edges of the polygon which were intersected by the line geometry?
- Can we also obtain length of the edges of polygon geometry?
- Can the line geometry be translated by a certain distance (the translated line will be parallel to the original line)?