本当にどうしたらいいのかわからない..
DECLARE @g geography = geography::STGeomFromText('POLYGON((1 1, 3 1, 3 3, 1 3, 1 1))',4326)
DECLARE @g2 geography =geography::STGeomFromText( 'POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))',4326)
Declare @union geography = @g2.STUnion(@g)
Declare @diff geography = @g2.STDifference(@g)
SELECT @g.STArea() + @g2.STArea() - @union.STArea()
SELECT @union.STArea()+@diff.STArea()
ret: "12306061878,1564" "123060620496,501" 5 つの違いを見つける...
追加:
select @union.ToString()
戻る
POLYGON ((0 2, 0 0, 2 0, 2.0000000000000591 1.0001522971041397, 3 1, 3 3, 1 3, 1.0000000000000655 2.0003044086154023, 0 2))