How to calculate 3d intersection using SQL Query

199
3
a month ago
BattulgaGantulga
New Contributor II

Hi, I try to Intersect 3d polygon and Lines on SQL Server. But it's not working. Please support me on this issue. How to correct dynamically calculate intersection of 3D Line and Polygon?

I wrote following SQL Query.

SELECT 
    P.*,
    L.Shape.STIntersection(P.Shape).ToString() AS IntersectionPoint,
    L.Shape.STIntersection(P.Shape).STLength() AS IntersectionLength
FROM 
    (
        SELECT 
            geometry::UnionAggregate(Shape) AS Shape
        FROM 
            Geol_LicenseBoundary3DA
        WHERE 
            Layer LIKE 'LB_XXX%' AND last_edited_date IS NULL
    ) AS P
JOIN 
    (
        SELECT  
            geometry::UnionAggregate(Shape) AS Shape
        FROM 
            Geol_DH_ActualTraceL 
        WHERE 
            HOLEID = 'UGDXXX'
    ) AS L 
ON 
    P.Shape.STIntersects(L.Shape) = 1;

 

Thanks

Tags (1)
0 Kudos
3 Replies
JesseCloutier
Esri Community Manager

Thanks for bringing your question to Esri Community, @BattulgaGantulga.

Which ArcGIS product are you using? I'd like to help get this post moved to a more relevant Board where it's more likely to be seen and responded to by members with relevant expertise.

Jesse Cloutier
Community Manager, Engagement & Content
0 Kudos
BattulgaGantulga
New Contributor II

Hi Jesse Cloutier,

   Our Database is SDE Spatial Database on MS SQL Server. We are using ArcGIS Products (ArcGIS Enterprise, ArcGIS Pro)

Thanks 

0 Kudos
JesseCloutier
Esri Community Manager

Thanks for following up, @BattulgaGantulga. I've moved your post to our ArcGIS Pro Questions Board. All the best!

Jesse Cloutier
Community Manager, Engagement & Content