AGSLineOfSight draws the line from an observer to a target in an AGSScene. Is there any way to get the coordinates of the point on the surface where the line "disappears" (ie transitions from visible to obstructed) - the method produces the lines, but I don't see any way to get the relevant coordinates. I don't see those properties in AGSGeoElementLineOfSight
Ie if I have an observer coordinate and a line (pitch and heading), can I get targetLocation, assuming the target is on a surface?
I see "Intersect 3D Line with Surface" in arcpy:
Intersect3DLineWithSurface_3d (in_line_features, in_surfaces, out_line_feature_class, {out_point_feature_class})
How can I do this (easily) in iOS?
I did see this
Can the geometry engine in 4.7 intersect a 3d line with a 3d polygon?
but it is pretty complicated and limited...
and Java sdk has
with Output Obstruction Point Feature Class
: The output point feature class indicating the first obstruction point along the line of sight if the target is not visible.
-- looks like this last one is what I want...
Hi Russel,
AGSLineOfSight draws the line from an observer to a target in an AGSScene. Is there any way to get the coordinates of the point on the surface where the line "disappears" (ie transitions from visible to obstructed)
Unfortunately, we have not exposed `obstruction point` on `Line Of Sight` in the Runtime API. Hopefully, we'll do it in the future. Currently, there is not easy way in the API to find out line's intersection point to the surface.
Regards,
Nimesh
I haven't played with line-of-sight yet so forgive the ignorance, but are the results displayed in the AGSGraphicsOverlay?
If so you should be able to cycle through the AGSGraphics and find the line(s) that were created. If you can determine which line is the visible one you could then dive into the geometry and then drill down through AGSPolyline -> AGSPartCollection -> AGSPart and cycle through the points until you find the one furthest away (or maybe it will just be the end point depending on how the line is created).
A pain, but I've had to do something similar when implementing "distance along line" functionality since linear referencing isn't a thing in Runtime. That was in 10.2.5 though so hopefully the same thing will work in v100
Hey Michael Davis,
The output is not drawn as part of an overlay. All the rendering for the interactive GPU analysis is direct to canvas, for performance reasons, so unfortunately you won't be able to do your calculations there.
Related to Distance Along Line, it won't help you here, but in Runtime 100, AGSGeometryEngine has the pointAlongPolyline:distance:() method. Incidentally, points also now cater for M and Z values so that should be a lot less painful now.
Cheers,
Nick.
Hi Russel,
It was great talking to you at Dev Summit. Based on the functionality you are implementing in your app, I would recommend you joining the Runtime AR/VR private beta program. You can send a request to join the beta program via email to: ArcGISRuntimeARVRBeta@esri.com
Regards,
Nimesh