Finding points that are close to each other using a line-shapefile

2293
5
02-14-2017 02:02 AM
SofiaWillebrand
New Contributor

Hi guys!

So I'm working with a dataset with two shapefiles, one with about 2000 points and another shapefile with about 1000 lines bound together which looks something like this (a small part of the total map):

 Example_PointsandLines

The map shows railways and stations along the railway. The points are located on the lines, with the help of the tool Near. What I want is to figure out which points are closest to each other using the line-shapefile, not just measuring the distance straight between the points. This is beacause i want to create links between the stations, and in the existing line-file there are more links (lines) than I have. I have tried looking a bit at the network analysis tools, but cant figure out how to convert it to a network dataset, and I am wondering if there is an easier way of doing this? Feel free to ask questions, since it is a bit difficult describing the issue optimaly for your understanding. I am quite new at GIS, and know only of the basic tools and am still trying to grasp the details. 

I am using ArcGIS 10.4.1. 

Tags (1)
0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

if the points are on the line, then http://desktop.arcgis.com/en/arcmap/latest/tools/analysis-toolbox/how-intersect-analysis-works.htm may be useful, otherwise split lines at points would give you a dissected line output

SofiaWillebrand
New Contributor

Hi Dan, thank you for answering! I tried using the split function, however the issue is that I need information for which points it used to split in the new layer, which only contains the split lines. Say it splits between A and B, and then B and C in the picture below, I would like that information in the new file. Do you know if there is any tool that simply measures the distance between each point using the line to measure?

0 Kudos
ChrisDonohue__GISP
MVP Alum

It sounds like there are multiple line segments in some cases between each point pair.  If that is the case, I'd suggest running the geoprocessing tool Dissolve on the lines to create a new aggregated line layer, then use one of the techniques Dan Patterson suggested to split the aggregated lines.  Then each point will be connected to another point by one line segment.

Note - when running the Dissolve, you will fill in the tool setting "Dissolve Field(s) (optional)" to use a Route ID field so as to keep the areas where routes overlap from dissolving down to a single line.  For example, in your original image, in the upper right, there will need to be some sort of route distinguishing field for where lines meet and overlap.

ArcGIS Help (10.2, 10.2.1, and 10.2.2) - Dissolve (Data Management)

Chris Donohue, GISP

DarrenWiens2
MVP Honored Contributor

I don't know the answer to your overall problem, but your picture (A->B->C) is basically describing Linear Referencing, specifically Locating Features Along Routes:

TedKowal
Occasional Contributor III

I do not believe there is a straight forward way of doing it... I use GeoWizards and renode and buffering to apply  number of lane changes to the split point.... 

In your case, quickly looking at your problem... I would suggest to do as Dan Indicated and split the rail lines at each station.  Hopefully each railstation has an unique ID... if not create one....  I would then buffer each rail station so that it overlaps both sides of each rail.  Then use the intersection query and transfer the pertinent node/(Rail Stations) data to the segmented rail line so each rail segment (line) would have 2 nodes(stations) identified a begin station and end station ...  from there it becomes a database join query to analyze .