How to find the difference in elevation between points and line feature (example, ground locations and roadway in a hilly terrain) when z-value is available as attribute to these features?
Solved! Go to Solution.
Assuming that these are 3d points/lines without the elevation attributes exposed in the table, I would first convert the line to points. Expose the z-value of the converted points then do a spatial join (closest) with the point data (with exposed z-values). The z-value can then be compared in the resulting joined data.
Or if they already have the z-values in the attribute table, you can also just do a spatial join (closest) using the point as your target and the line as the join feature.
Assuming that these are 3d points/lines without the elevation attributes exposed in the table, I would first convert the line to points. Expose the z-value of the converted points then do a spatial join (closest) with the point data (with exposed z-values). The z-value can then be compared in the resulting joined data.
Or if they already have the z-values in the attribute table, you can also just do a spatial join (closest) using the point as your target and the line as the join feature.
the spatial join option worked. Thanks a lot !!!
More accurate would to create a script (python), join the point to a location on the line and interpolate the Z values of the two vertices on both sides of the projected point, based on the distance to the point. Obviously you will have to take the distance of the point to the line into consideration.
If the number of points is dense, you could create a TIN and then analyze that in relation to the Z-values of the line.
I am at level 0 in python scripting , so its gonna take some time I guess to value your suggestion. Thanx a lot anyway.
If the spatial join worked for you, than I would stick to that. Do have a look at the distance field to verify that points are not joined to distant features. In case you change your mind in the future, Python is relatively easy to learn and there are many capable people at this forum that are willing to guide you in the process.
Just don't forget to mark the answer from Mike Cusi as the correct answer.