Compute the outer border of multiple Geometry objects in SQL Server 2008

I have a lot Polygonsof data types Geometryin SQL Server 2008. The following figure shows what the visualization of all these Geometrys looks like.

Lots of geometrys

I need to create a polygon representing the outer border of all these polygons. Therefore, I used the answer posed to the previous spatial question . I asked to create the following code:

DECLARE @test TABLE(geom GEOMETRY);

INSERT INTO @test SELECT geom FROM ForceBoundary

DECLARE @geom GEOMETRY
SELECT @geom = (SELECT TOP 1 geom FROM @test)
SELECT @geom = @geom.STUnion(geom) FROM @test

SELECT @geom

This led to the following result, which has cracks in it due to holes between the polygons:

Combined polygons with cracks

So, I updated my request with the following change:

INSERT INTO @test SELECT geom.Reduce(0.001).STBuffer(100) FROM ForceBoundary

Which improved the result, however, it does not completely solve the problem, and also violates the accuracy of the external border.

Combined polygons with less cracks

?. STxxxx, , , , , ?

+5
2

geographika GIS StackExchange:

, slivers. SQL Spatial Tools - FilterArtifactsGeometry.

.

ringTolerance:

, , (, ring.STArea < ringTolerance x ring.STLength). 0 .

() , . , , .

+2

[geom].STExteriorRing()?

0

All Articles