<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Horizontal, Vertical, Lenfth Units and NaN values in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/horizontal-vertical-lenfth-units-and-nan-values/m-p/694788#M18634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;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.&amp;nbsp; 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.&amp;nbsp; 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).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&amp;nbsp; However, that&amp;nbsp; 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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So my primary issue is:&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;How do I extract the Horizontal and Vertical units from the feature class'&amp;nbsp; SpatialReference so I can standardize the output to match the horizontal length units reported by the feature class?&amp;nbsp; (Assumes a measure factor of 1.)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Related issues:&amp;nbsp; What approach should I adopt if the Vertical units are Unknown (request user input?, asssume same units as horizontal length units?, assume meters?, etc.)?&amp;nbsp; 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?)?&amp;nbsp; Should I only use linear 3D length measures or should I optionally allow geodeesic length measures?&amp;nbsp; If I accomdate both, what is a reasonable approach to get geodesic lengths, given that I am not a Surveyor or mathematician?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any input.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 30 Oct 2011 14:32:56 GMT</pubDate>
    <dc:creator>RichardFairhurst</dc:creator>
    <dc:date>2011-10-30T14:32:56Z</dc:date>
    <item>
      <title>Horizontal, Vertical, Lenfth Units and NaN values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/horizontal-vertical-lenfth-units-and-nan-values/m-p/694788#M18634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;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.&amp;nbsp; 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.&amp;nbsp; 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).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&amp;nbsp; However, that&amp;nbsp; 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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So my primary issue is:&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;How do I extract the Horizontal and Vertical units from the feature class'&amp;nbsp; SpatialReference so I can standardize the output to match the horizontal length units reported by the feature class?&amp;nbsp; (Assumes a measure factor of 1.)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Related issues:&amp;nbsp; What approach should I adopt if the Vertical units are Unknown (request user input?, asssume same units as horizontal length units?, assume meters?, etc.)?&amp;nbsp; 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?)?&amp;nbsp; Should I only use linear 3D length measures or should I optionally allow geodeesic length measures?&amp;nbsp; If I accomdate both, what is a reasonable approach to get geodesic lengths, given that I am not a Surveyor or mathematician?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any input.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Oct 2011 14:32:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/horizontal-vertical-lenfth-units-and-nan-values/m-p/694788#M18634</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2011-10-30T14:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Horizontal, Vertical, Lenfth Units and NaN values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/horizontal-vertical-lenfth-units-and-nan-values/m-p/694789#M18635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Affter reading some of the help on working with the Spatial Reference I can see I am opening a can of worms in trying to accomodate all possible coordinate systems.&amp;nbsp; But I am looking for a some education on the subject.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I kind of understand that Projected Coordinate Systems (PCSs) have Linear Units and seem like they can be combined with Z Linear Units and outputted to the standard Horizontal Linear unit without a lot of difficulty.&amp;nbsp; There are some code examples for extracting parameters of PCSs.&amp;nbsp; But I am not sure what to do with the Angular units of a Geographic Coordinate System (GCSs) to combine them with Z Linear Unit values and output to a standard length unit value.&amp;nbsp; Also it is not clear whether the same parameter examples for PCSs apply to GCSs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know there are people on the forum who have looked into this far more than I have and I can definitely use some guidance and help in breaking it down.&amp;nbsp; Links to helpful code samples (preferably in C# or VB .Net) would also be appreciated.&amp;nbsp; It looks like Melita Kennedy at Esri gives most of the help on Coodinate Systems, so I hope she will pick up on this post to help me start a crash course on the subject.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Oct 2011 21:41:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/horizontal-vertical-lenfth-units-and-nan-values/m-p/694789#M18635</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2011-10-30T21:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Horizontal, Vertical, Lenfth Units and NaN values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/horizontal-vertical-lenfth-units-and-nan-values/m-p/694790#M18636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For a projected coordinate system (pcs), you can go directly to IProjectedCoordinateSystem::CoordinateUnit which returns ILinearUnit. You can then get its MetersPerUnit value from ILinearUnit. Similarly with a gcs, but now CoordinateUnit returns IAngularUnit with RadiansPerUnit. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Starting at ArcGIS 10, you can calculate the geodesic length with IPolycurveGeodetic::LengthGeodetic. This is a 2D (well, on the spheroid/ellipsoid surface) calculation. We don't yet support geodesic distance calculations that include heights. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know the 3D team calculates a conversion value when horizontal coordsys is geographic to match up with the z values. It helps that data is usually large scale, so you can make an assumption. A rough equivalency is that 1 deg north-south is about 110 km. However, this only holds east-west at the equator. A rough estimate for east-west is 110 km * cos(latitude). Thus, at 60N or 60S, a degree is around 55 km. How the 3D team balances that out, I don't know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melita&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2011 00:48:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/horizontal-vertical-lenfth-units-and-nan-values/m-p/694790#M18636</guid>
      <dc:creator>MelitaKennedy</dc:creator>
      <dc:date>2011-11-03T00:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Horizontal, Vertical, Lenfth Units and NaN values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/horizontal-vertical-lenfth-units-and-nan-values/m-p/694791#M18637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Melita:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for commenting on this thread.&amp;nbsp; Your suggestions have helped me with PCS layers and have put me on the right track for GCS layers.&amp;nbsp; If I get stuck I will post back here.&amp;nbsp; Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2011 13:27:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/horizontal-vertical-lenfth-units-and-nan-values/m-p/694791#M18637</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2011-11-03T13:27:51Z</dc:date>
    </item>
  </channel>
</rss>

