Get height from tin at specific coordinate(s)

2481
5
Jump to solution
07-10-2017 02:05 AM
RehmSoftware
Regular Contributor

Hi,

I need to get the height from a tin for a given point (or a sequence of points) using the ArcGis Pro SDK.

I successfully created a tin layer with the 3D Analyst Tool "Create Tin" and it looks very good in ArcGis Pro. But now I wonder how it's possible to actually get a height value from this layer? I'm aware of "Intersect3DLineWithSurface_3d" but that seems like overkill and I'd prefer to do it in plain code instead of calling a python function.

Also: Extracting the polygons from the tin via the "TIN Triangle" tool gave me the tin as polygons and I tried to intersect a polygon with a polyline representing a vertical ray.. but I had no success in obtaining the height.

Any help would be greatly appreciated. Thanks!

Best Regards,

Christian

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

I'm guessing Charlie meant to say look at GetZsFromSurfaceAsync Method

View solution in original post

0 Kudos
5 Replies
ClaytonCrawford
Esri Contributor

Sorry, there isn't a TIN specific API call in Pro to do this yet. Therefore, calling a GP tool is probably the way to go. Instead of Intersect3DLineWithSurface look at InterpolateShape, which will produce 3D points from your 2D query locations, or AddSurfacceInformation, which will add a height attribute to your 2D query point features. 

We are evaluating TIN API requirements and are seeking input. Aside from spot height query, do you have other needs from a TIN API?

Regards, Clayton

0 Kudos
CharlesMacleod
Esri Regular Contributor

Sent from my iPhone

by Anonymous User
Not applicable

I'm guessing Charlie meant to say look at GetZsFromSurfaceAsync Method

0 Kudos
RehmSoftware
Regular Contributor

Hi Sean,

thank you, that's what I was looking for!

Best Regards,

Christian

0 Kudos
RehmSoftware
Regular Contributor

Hi Clayton,

thank you as well for your suggestions. The InterpolateShape_3d tool did work as well but I prefer to do it via the GetZsFromSurfaceAsync-method. Maybe I need to get accustomed to using tools in my c# code first, it doesn't really feel natural to me so far.

Apart from querying the tin for heights at specific coordinates there's not really much I need in a tin API to be honest. Especially since there are already tools like "Decimate Nodes" when working with a tin

Best Regards,

Christian

0 Kudos