rfairhur24

Horizontal, Vertical, Lenfth Units and NaN values

Discussion created by rfairhur24 on Oct 30, 2011
Latest reply on Nov 3, 2011 by rfairhur24
I am wanting to enhance the VB .Net code I am developing to assign 3D length M values to a polyline according to whatever SpatialReference a user has for Horizontal and Vertical Datum.  Where a gap exists between two parts of a multi-part polyline, I want to be able to optionally calculate the 3D straight line length of the gap and add it to the measures.  Basically I am trying to emulate the behavior of the Create Route tool (except that the Route lines are already assumed to be assembled and oriented).

In the data I normally use my SpatialReference is projected and the units for horizontal length and vertical length are the same, which makes the calculations fairly easy.  However, that  configuration is not the case for everyone who might want to use the code and I would like the code to be able to handle that without requiring customization to each specific configuration.

So my primary issue is:  How do I extract the Horizontal and Vertical units from the feature class'  SpatialReference so I can standardize the output to match the horizontal length units reported by the feature class?  (Assumes a measure factor of 1.)

Related issues:  What approach should I adopt if the Vertical units are Unknown (request user input?, asssume same units as horizontal length units?, assume meters?, etc.)?  What approach should I take for segments that have nodes with NaN values for Z (provide a user specified option, read all surrounding segments until I find real values and interpolate or if one end has no real values hold the value of the other end?)?  Should I only use linear 3D length measures or should I optionally allow geodeesic length measures?  If I accomdate both, what is a reasonable approach to get geodesic lengths, given that I am not a Surveyor or mathematician?

Thanks for any input.

Outcomes