Select to view content in your preferred language

Create a clip a polyline based on the polygon geometry

298
1
Jump to solution
04-03-2024 02:39 AM
SaiPeketi
New Contributor III

Hi,

I'm able to create a horizontal and vertical line to make a grid on top of a polygon based on xmin, ymin, xmax and ymax but it's coming out of the polygon.

How can I make grid restrict with the polygon boundary? Thanks in advance.

 

SaiPeketi_0-1712137115354.png

Please find the code: https://codepen.io/Andy0206/pen/yLrpXjp?editors=1000

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

You can use geometryEngine.intersect method to get a new geometry from intersection between two geometries. I updated your codepen to show this: https://codepen.io/U_B_U/pen/jORYZmN?editors=1000

 

View solution in original post

1 Reply
UndralBatsukh
Esri Regular Contributor

Hi there, 

You can use geometryEngine.intersect method to get a new geometry from intersection between two geometries. I updated your codepen to show this: https://codepen.io/U_B_U/pen/jORYZmN?editors=1000