How to confined the clipping with a polygon in a specific region

288
4
04-10-2021 09:16 AM
Labels (1)
MahmoudAwadallah
New Contributor

Hi, 

I want to clip the illustrated transects with this polygon boundary. The problem is that sometime the length of the transect is long enough to interfere in another part of the polygon (upstream or downstream), and I want to limit the clipping just to be in the region of each transect (the red region for the highlighted transect). 

How to solve this issue? 

 

Thank you in advance.  

 

MahmoudAwadallah_1-1618071324912.png

 

 

0 Kudos
4 Replies
DavidPike
MVP Frequent Contributor

By 'clip' I guess your intention is to actually split the river at the intersection of those transects. Clip is a different tool/method.  Clipping  Clip (Analysis)—ArcGIS Pro | Documentation the transects by the cyan polygon would remove most of the issues, although some would still remain.

I would either alter the process of creating those transects to make them much shorter, or write a simple script or Model Builder model to shorten them.

0 Kudos
MahmoudAwadallah
New Contributor

Hi David, 

Thank you for your reply. 

The problem that the polygon is a one unit, and each transect is so as well. If I use any of intersect or clip tools still will create this hanging part. 

The transect could not be shorter since there are another parts of the transects should be that large at least. And I am limited by the one unique length for the generated transects. 

Do you know any way of scripting that would allow me to have different transect length instead of one for the whole layer? 

 

0 Kudos
DanPatterson
MVP Esteemed Contributor

You won't find one solution to fit all the things that are going to arise from your mess of transects.

Clip to begin.  Follow that by a Select by Location

Select Layer By Location (Data Management)—ArcGIS Pro | Documentation

Some sequential combination of WITHIN, WITHIN_CLEMENTINI ,CROSSED_BY_THE_OUTLINE_OF, HAVE_THEIR_CENTER_IN 

might work.

The trick might be to SWITCH the selection first, to get those segments totally OUTSIDE the river and delete them first, then try to select those that match.

Your obvious solution would be purely a coding one that extended the transect lines just to the edges of the polygon outline.  The use case for this is pretty limited so the generic "one-line-fits-all" is what the existing Pro tools offer.


... sort of retired...
0 Kudos
DavidPike
MVP Frequent Contributor

Agreed, no trivial solutio. As Dan say's, something along the lines of an expanding transect line until it intersects with the boundary of the polygon.  Further complicated where you have holes in the polygon (island banks I guess?).

Overall a complete nightmare IMHO

0 Kudos