I have two files. A polyline shapefile of highways and a spreadsheet that contains beginning and ending coordinates with descriptions of segments of the highways. For example:

BegX, BegY, EndX, EndY, DescriptionField1, DescriptionField2
-80.0, 30.0, -80.1, 30.1, Hwy1Partial, 1
-80.1, 30.1, -80.2, 30.2, Hyw1Partial, 2

I need to create a new polyline shapefile that breaks up the highway segments from the original polyline file into a new one that has the beginning and ending coordinates from the spreadsheet.

I've attempted to join the data but can't figure out how to get it to extract the polyline that starts at the begin coordinate and ends at the end coordinate. I've used the XY to Line tool, but that just gives me a line connecting the begin coordinate to the end coordinate. I need to match it up with the polyline from the highway shapefile.

The shapefile I am using does not have M values. The spreadsheet I have contain latitude/longitude coordinates that look to have originally came from the shapefile (they fall directly on top of it when plotted). I need a polyline file that matches the spreadsheet exactly. Meaning the spreadsheet would become the new shapefiles attribute table, and each record would represent a polyline that was extracted between the beginning coordinate and end coordinate.


The black line represents the shapefile that I have. The two coordinates are examples of beginning and ending lat/lon coordinates that are in the spreadsheet. What I want is to extract the blue line from the shapefile into a new polyline file with the attributes of the original spreadsheet.

I have played around with making XY point layers out of my beginning and ending coordinates then splitting the file based on those new points. The problem is that my shapefile has more lines than I actually need. The resulting file doesn't split it completely the way I need, and I cannot find a way to relate my attributes from the original spreadsheet back to it. What I really need is a custom query that takes in a begin lat/lon, then an end lat/lon and queries the shapefile to get the resulting line. After it finds the new line it would take it to a new shapefile; copying the attributes over from the spreadsheet to be associated with the newly created line.

  • 1
    Probably want to look at linear referencing (help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/…). Guessing you'll want to treat your start/end XYs as discrete point events since you don't have interceding vertices. – Roland Jan 27 '14 at 17:35
  • After doing some research on linear referencing, I'm not sure if it is exactly what I need. Either that, or I'm not researching in the correct area that will lead me to my solution. – jsmith Jan 27 '14 at 19:47
  • 1
    I find that stuff a bit daunting in general, but thought you could make events for your points and then create routes between the events on the lines (which wouldn't need all the vertices to follow the original lines), with the routes giving you what you're after. Alternatively, you could used a plain old Intersect or similar operation to break the lines where your points are located (which I'm just noticing @radouxju has suggested)... – Roland Jan 27 '14 at 21:58
  • Would you be able to include a diagram explaining the units of your values and how they relate to your highway segments? My first thought is "sounds like chainage/linear referencing/dynamic segmentation" but I'm confused by what look like XY coordinates rather than measures along. – PolyGeo Jan 27 '14 at 22:23
  • @PolyGeo Updated to try and answer your question as best I can. – jsmith Jan 28 '14 at 16:06

you have two pairs of coordiantes per line, so this look like points and not like linear referencing (which would use only 2 values, M start and M end). Therefore my suggestion is to create the two points in your spreadsheet using "Make XY event Layer". Once for the "begins" and once for the "ends". The next step is then to split your highways at the closest location from those points (split line at points). You then have your segments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.