Select to view content in your preferred language

3D Midpoint of line segment?

618
5
12-22-2012 12:42 PM
ThomasColson
MVP Frequent Contributor
I suppose there's a really easy answer to this, I just can't find it! I have a 3D line FC with Z values, for which I need to derive the midpoint using 3D length. This is in very, very mountainous terrain, and the 3d length is substantially different from the 2 length. I tried adding a X and Y midpoint field, to later convert to a point FC, but that is only using 2d values. The split tool in the Arc Scene Editor Toolbar also (surprisingly) splits on 2D length, not 3D, as verified by determining 3D and 2D segement lengths after the split (2D was the same for each line half, 3D substantially different for each line half). Wishfully hoping there's a tool or script that does this, but a method of calculating 3D mid x and y will get me what I need. THanks!
Tags (1)
0 Kudos
5 Replies
T__WayneWhitley
Frequent Contributor
Not sure how to do this most efficiently, but this is a very interesting problem... though there may very well be a 3D Analyst solution, another solution may be with linear referencing - to make routes from your lines, then with precalculated midpoint distances along the lines ([polyline total length]/2) use Make Route Event with the point option to plot those points.... From there you should be able to calculate XY coords, if that is what you need.  I didn't test this, but would be surprised if this is not the 3D-accounted-for measure.
0 Kudos
AdamGuo
New Contributor II
Hi,

Did you ever end up finding an answer for this? I am in a similar debacle, I need to split a 3d line at a certain 3d length. As you mentioned, the split tool only splits in 2d.

I have also tried converting polyline z to polyline zm and tried using linear referencing, but it didn't give the correct answer. After I made the split I did a 3d calculate of the length of the result and it didn't match to the location where I wanted to split.

Any ideas?

Thank you.
0 Kudos
T__WayneWhitley
Frequent Contributor
Not 100% sure, but supposedly you can use the field calculator to directly compute geometry properties, namely the X,Y, or Z midpoint of a 'z-aware' line, would be interested to know if this works (see the table under 'performing calculations on feature geometry' and I suppose these 'geometry properties' are available under 'Calculate Geometry'):

Fundamentals of field calculations
Geodata » Data types » Tables
http://resources.arcgis.com/en/help/main/10.1/index.html#//005s00000025000000


Hope that helps.  Oh right - then from there you can split the line(s) using the point(s)...and of course, there's probably a shortcut but I'd say the trick 1st is to enable correctly calculating the midpoint (on the line, versus a centroid which is a different thing).


Wayne
0 Kudos
AdamGuo
New Contributor II
Wayne,
You are correct. The calculate Geometry can determine the XYZ of the midpoint of a polyline Z. Your solution solved this thread. Unfortunately, mine problem is still there. I can't seem to determine how to find a point based of a 3d measured length.

I've started a new thread with my problem here.

http://forums.arcgis.com/threads/86249-Locating-a-Depth-in-Polyline-Z?p=304685#post304685

Any help/ ideas would be appreciated.
0 Kudos
T__WayneWhitley
Frequent Contributor
Well, like I said there may be a shortcut... but, if you're interested, you can test the Make XY Event layer tool which is now supposedly designed to accept Z vals (it's the parameter tagged onto the end, see the syntax usage at the doc):

Make XY Event Layer (Data Management)
Desktop » Geoprocessing » Tool reference » Data Management toolbox
http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000006z000000


So, that should give you the desired points --- may be a bit of a workaround, but then you can use the point output to split lines...not sure what license you have but if your just looking for the tools provided, there's I think what is called a Split Lines at Points, something like that.  Otherwise it can be scripted...

Hope that helps.

Enjoy,
Wayne
0 Kudos