Select to view content in your preferred language

Select By Location Missing portions of lines

380
4
Jump to solution
02-27-2025 09:02 AM
FlightDeck
Regular Contributor

Hey all,

I imported road centerlines from Open Street Maps and need to select the lines that that fall within a polygon. The issue I am seeing is that when I use "Within" it selects only the lines that fall completely within the polygon, thus missing a portion of other polylines that would also fall within. If I use the "Intersect" option it selects all of the polylines, but also includes the portion of the lines that fall outside of the polygon rather than terminating the selection at the polygon boundary. Is there something within the OSM Data that might cause this? Do I need to modify the data to allow the partial selection of a polyline?

0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Notable Contributor

The select by location tool will not split the lines for you, so if a line crosses out of the polygon with intersect, the entire line would be selected.  If you are only after the part that is completely within, you will need to split the lines at the polygon boundaries first, or, if you have advanced license, you could use the Intersect GP Tool.

This article gives you more info.

R_

View solution in original post

4 Replies
AyanPalit
Esri Regular Contributor

@FlightDeck Please review the details on each of the Relationship parameter options and you will get to the best results with a few iterations:

Select Layer By Location > Relationship

Example Graphics at: https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/select-by-location-graphical... 

Ayan Palit | Principal Consultant Esri
0 Kudos
FlightDeck
Regular Contributor

Hey Ayan,

 

I guess I'm not sure how to apply your response. I've iterated through the options and the ones that work don't provide the expected result. 

0 Kudos
AyanPalit
Esri Regular Contributor

@FlightDeck I am referring to the section below:

AyanPalit_0-1740688284729.png

You can post screenshot examples of what you get vs expectation. It is possible the data is missing some attribution or the desired selection can't be performed using the out of the box tool. 

Ayan Palit | Principal Consultant Esri
0 Kudos
RhettZufelt
MVP Notable Contributor

The select by location tool will not split the lines for you, so if a line crosses out of the polygon with intersect, the entire line would be selected.  If you are only after the part that is completely within, you will need to split the lines at the polygon boundaries first, or, if you have advanced license, you could use the Intersect GP Tool.

This article gives you more info.

R_