Adding z values from points to line

4130
10
09-20-2016 01:15 AM
SBreckan
New Contributor II

I have two lines (the center line of a tunnel) that lack z values, they are currently just flat lines with start and end xy values. I do have the z values in points - but how do I get the values from the points to the lines? I have the basic license and cannot use the Split Line at Point tool.

I would like the lines to be split at each point and assigned a z value. I have two lines and approximately 400 points, the elevation of the tunnel differs between a few meters below sea level and 90 meters above.

I am using arcmap for desktop 10.3.1

Thanks in advance.

0 Kudos
10 Replies
DanPatterson_Retired
MVP Esteemed Contributor

did you try Points To Line—Help | ArcGIS for Desktop 

or in an edit session Snapping points to lines—Help | ArcGIS for Desktop 

or what have you tried?

0 Kudos
SBreckan
New Contributor II

I have tried Points to line, the result is a line that matches the original line I have, with an attribute table with only objectID, shape and shape length.

Snapping points to line I cannot use unfortunately as I only have the Basic license.

I have tried Spatial join (join one to many), but with around 400 points for each of the two lines this just results in a line with attribute table consisting of around 400 20km rows with different z values.

Thank you for your time, Dan.

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

Z values are contained within the Shape field... is the shape field a pointz type?  If it is, then you can get the values for Z by adding a field and using the field calculator to retrieve it or use this 

Add Geometry Attributes—Help | ArcGIS for Desktop 

0 Kudos
SBreckan
New Contributor II

I should have mentioned that I have already added the geometry attributes for the line, the points had them in the attribute table to start with. The line however, is Polyline and not Polyline Z so I cannot fetch elevation data from it.

0 Kudos
NeilAyres
MVP Frequent Contributor

Probably, your only solution is to build a polylineZ from the points via arcpy / python.

If you give us a look at your point data, I am sure someone can give you a start to help you do this.

SBreckan
New Contributor II

That would be great, I am not so well-known with the use of python. I have attached the point data to the original question.

0 Kudos
NeilAyres
MVP Frequent Contributor

You have left most of your shapefile behind.

There is only the *.shp. Can't do anything with that.

A shapefile has several components *.shp, *.sbx, *.dbf, *.prj and possibly several others.

What do you mean by inbound & outbound?

SBreckan
New Contributor II

Yes, I loaded those files up a bit too quick I see. Inbound and Outbound are just the names of the two lines.

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

It would be useful if you zipped the shapefile bits as one file so people don't have to download and unzip the individual components