1

I am trying to interpolate z values based on the example provided in this post on geonet. In it she has a set of know x,y,z locations that she turns into a Polyline Z and converts to a route (PolylineZM). Then she places (using Locate Features Along Routes) other points of interest with unknown z values on the route and uses Calculate Geometry in the attribute table to get the z values at those points. I would like to do the same, but am having issues because my 2D/x,y points won't locate themselves on my 3D/x,y,z route, or, if they are, they are refusing to calculate geometry relating to z values.

I created the route from points I had and tried to locate my route events on the route. I tried yet again after my initial post and they all showed up as route events, but they won't calculate the z geometry for my points of interest. My points are just Point M, while the geonet poster's points were PointZM. As a result, Z values aren't even an option in the Calculate Geometry menu. The only time I've been able to Calculate Geometry with z values was when I put some z values (from the route) into my route events before locating them on the route, but only those edited records would calculate geometry. I need to interpolate the unknown route event z values from the route, and it was somehow done in the above geonet post, so I'm hoping it really is possible.

Is there a way to make all of these route events into Point ZM without explicitly setting z values before locating them on the route?

I tested by putting some z values (from the known route z values) in the some of the rows of the route event table.

LinearReferencingFail

The selected points in the picture are those I assigned test/known z values to and they would generate values when I used Calculated Geometry, but I was trying to get z values for the dots without values which are yellow.

I tried adding NULL values to the z field in hopes of making clear it should be 3D and has unknown z values rather than a z value of 0, but the z values get removed when I run the Locate Events Along Route tool if there are only NULL z values, leaving me with just a PolylineM that won't interpolate z values from the route. If I try to add the z values back with Feature to 3D by Attribute, it will remove the event layer from the route and leave me with a PolylineZ. It will keep z values if there are some actual (non-zero, non-NULL) values, as when I ran my previously mentioned tests, but that still leaves me with a bad PolylineZM since, as previously mentioned, my points of interest don't have z values and so are omitted/can't have their z values interpolated from the route.

1
  • 1
    It's hard to tell from your screenshot, but it looks like some of the points may not fall exactly on the route. You can specify a search radius to pick up the points that do not intersect the route.
    – Fezter
    Commented Sep 15, 2017 at 3:51

2 Answers 2

1

Such thing like 3D routes does not exist in terms of linear referencing. If you follow this steps correctly:

arcpy.PointsToLine_management("POINTS","./theLine.shp", "Name")
arcpy.CalibrateRoutes_lr("theLine","Name","POINTS","Name","VALUE", "./theRoute.shp")
arcpy.LocateFeaturesAlongRoutes_lr("chp", "theRoute", "Name", "0.01 Meters","../a_table.dbf", "RID POINT MEAS")

You'll get what you need:

enter image description here

Please note:

  • I didn't use 3D lines at all
  • new points (chp) are labeled by value of MEAS field from "a_table" joined to "chp" table. I simply used FID for joins, this is not recommended, assign your new points good unique id before step 3 above.
6
  • Why wouldn't you consider 3D routes to exist in terms of linear referencing? 3D routes are perfectly valid. Consider a road that goes down a mountain. In plan view, it is much shorter than it actually is.
    – Fezter
    Commented Sep 15, 2017 at 5:32
  • Because z plays no role in locating events along the road. Even if I've managed to create 3d route, the results above will stay the same
    – FelixIP
    Commented Sep 15, 2017 at 5:38
  • This doesn't answer the question. There is a link to the post on how to capture the z info once you've created the event layer.
    – jbalk
    Commented Sep 15, 2017 at 6:15
  • That makes sense FelixIP, but I agree with jbalk that I do have a 3D route. If the z values aren't used in linear referencing, that makes sense, but the geonet example indicated that you could use this method to get z values for points of interest/route events from the route. As jbalk indicated, my question really is: if the Z values play no role/ aren't conferred to route events that are located on a 3D route (a Polyline ZM with valid z values), how does one use the method described in the geonet post to interpolate z values of points of interest? Commented Sep 15, 2017 at 13:44
  • Values 2, 3 ,1 in my example ARE z values or could be anything else. Frankly it takes less time to solve your task using 3 lines above, rhan theoretise about it.
    – FelixIP
    Commented Sep 15, 2017 at 17:37
1

I've had this issue before when using 'locate features along routes' with points. Although they may appear to fall exactly on the line, they are usually a small distance off the line.

To fix this, enter a reasonable search distance in the 'search radius' parameter of the tool (5m? Increase the search radius until you capture all the points). To capture the distance from the line, check the 'Include distance field on output table'. To also capture the direction (left or right of line), also tick 'Use M Direction Offsetting'.

enter image description here

Once you have captured all the points, continue to follow the steps in the post (make route event layer, then calculate the z from the line).

1
  • That makes sense. I think I was confused in my original post; the points are made into route events, but I can't calculate z geometry and it isn't converted to a ZM even though it is supposedly located on the route which is a ZM. So they are on the route, but only sort of? It won't even let me attempt to interpolate route event z values except where I already explicitly set the route event z values to match the route before locating it on the route, which defeats the purpose of the whole exercise. Commented Sep 15, 2017 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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