I have a line layer and two point layers. I want to cut the line layer into chunks based on distance and on whether there's a point from the two points layers.
Some context: I have a line layer that goes horizontally, vertically, and diagonally & I want to place dots every 700 meters. However, these dots placed need to be within 20 meters of the first point layer and there should NOT be a point from the second point layer. If a point from the second layer is there, then skip placing a dot here and move on the next point that's 700 meters away.
Is there a tool that could help me accomplish this?
Solved! Go to Solution.
Sounds like a job for Python to me. This is sort of the scenario I was talking about. It is not uncommon for the our of the box tools not to do exactly what we want them to do and python (in my opinion, when it comes to ArcGIS Pro desktop) is the best way to customize it (for instance I think model builder would be harder than Python in this case).
Here is a good place to start for your problem Polyline—ArcGIS Pro | Documentation
Check out the Methods. In particular MeasureOnLine and positionAlongLine
I would start with the Generate Points Along Lines tool. Select all points from the result that are too far away from layer 1 or too close to layer 2 by using Select Layer by Location and then deleting those points.
I've tried Generate Points Along Lines, but it doesn't work since it doesn't take into consideration the two point layers. And there's a lot of points along the line that it would be very time consuming to remove and add points manually. Is there a more sophisticated version of the Generate Points Along Lines tool?
I don't think there is a single tool that can do what you are describing. A good place to start would be Create point features along a line—ArcGIS Pro | Documentation.
This will allow you to create the points every 700 meters along your line, but it would not exclude any points. For that you would have to use spatial analysis comparing your new points to your two existing point layers....selecting out just the new points you want and discarding the rest. Then use the resulting points to split your lines.
The only other method I can think of is writing a custom script (python probably) that would do everything you describe above.
I guess it depends on if how often you are going to run this analysis. If you are going to run it many times, or you'll want to change up the distance between points, etc. I would write the script. If it is just a one time analysis I would try the first method.
Is there a series of tools that I can use? I'm trying to do it in the most automated way possible since there will be over 50k points when placed every 700 meters. Can you think of a spatial analyst tool that would help with the second step of comparing the point layers?
I'm not familiar with ArcGIS's Python API (but I know Python outside of ArcGIS), but I would gladly learn it if it will offer more capabilities than the tools in the desktop app. Will it? Any advice is highly appreciated.
Thanks!
I would image you could use Select By Location to find all of the "line points" within 20 feet of a point in point layer one.
Then you could use the same tool with with the search distance set to zero (0) ft, the select type set to "Remove From Current Selection", and the point layer 2 as the selecting features and you should be left with just the point you want (if I understand your original post correctly).
That being said Python offers so much more. You could step through each point and compare it to not only the other points but customized criteria. If (for example) your criteria were based on a combo of proximity and attribute values or relationships, they could be addressed specifically.
You understood it correctly, but I should add that the points in point layer one are not uniform distance away from each other; some are 5ft away, some 10ft, and other 50 ft and so on. If there's no point from point layer one within 20meters from the 700th meter, then I want to place a point at the next point from point layer one (in this case its okay to be more than 700m away because it has to be within 20m of point layer one). And repeat for the next point. When using Create points along line and Select by Location, it misses these points that are more than 700m away. Additionally, let's say a point gets placed in the 900th meter because of point layer #1 then the next point needs to be 700 meter away from the 900th meter (vs Create points along lines will calculate 700m from the 700th meter). Does that make sense? Do you have any suggestions to be able to do it more accurately?
Sounds like a job for Python to me. This is sort of the scenario I was talking about. It is not uncommon for the our of the box tools not to do exactly what we want them to do and python (in my opinion, when it comes to ArcGIS Pro desktop) is the best way to customize it (for instance I think model builder would be harder than Python in this case).
Here is a good place to start for your problem Polyline—ArcGIS Pro | Documentation
Check out the Methods. In particular MeasureOnLine and positionAlongLine