sql server geometry convert to x,y
https://stackoverflow.com/questions/10856014/get-x-y-values-from-point-geometry-or-geography
结果发现。。
STStartPoint和STEndPoint对于geometry来说好像不行,不过可以用STPoint代替:https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/bb933908(v=sql.105)
select Shape.STPointN(1).STX as In_X, Shape.STPointN(1).STY as In_Y, Shape.STPointN(2).STX as Out_X, Shape.STPointN(2).STY as Out_Y
from xxx_EVW a
where geometry::STGeomFromText('POLYGON(())',4326).STIntersects(a.Shape)=1)