Hi Raluca,
You are correct in that when I say surface I am referring to airspace surface. Those are sloped polygons. These polygons have z-values defined at each vertex. They are rendered using absolute-height. In my local scene we are extruding a point to a height chosen by the user, and the penetration is visible in the app. I would like to programmatically filter polygons that don't intersect. There can be a lot of polygons you see. and some of the polygon surfaces have steeper slopes than others. Right now every polygon that interects in 2d space is visible and is returned from the IdentifyTask. I was unable to get the Query Task to work on the map service. It seems to only accept layers within the map service by appending the layer index to the url. That could also be clarified a bit more in the API. We have many layers in the map service so I am using the IdentifyTask, eventhough the documentation states that it is not supported in a Scene View.
To perform the geometry comparison I am creating a polyline with the base and peak elevation of the obstacle with a one foot offset at the peak on the X and Y coordinates to prevent a completely vertical line. I have been building Queries and executing them on the feature layers in the app with this geometry and it does not work in 3d.
Actually calculating the penetration, or vertical distance the obstacle protrudes through the surface, is what we rely on the rasters for. In a completely separate workflow we are generating rasters from the 3d polygons by going polygon->multipatch->raster. Using an Identify Task on the rasters in a map service with a point geometry returns the pixel value for each raster at that location.
What I want to do in the Scene View is filter out the polygons (surfaces) that don't intersect the obstacle, or are outside a specified vertical clearance at the location of the obstacle without having to query the rasters.
I guess I will need to to a Geoprocessing Service to get the job done, yes? Building and using rasters with a 5x5 ft cell size for the app is outdated when a geometric intersect comparison is all we need.
I uploaded a video attachment demoing the app functionality. it is in development