Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6888349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:00:12+00:00 2026-05-27T06:00:12+00:00

I have lots of Polygons of datatype Geometry in SQL Server 2008. The image

  • 0

I have lots of Polygons of datatype Geometry in SQL Server 2008. The image below shows how a select of all these Geometrys looks visualized.

Lots of Geometrys

What I need to do is create a Polygon which represents the outer boundary of all these polygons. So I used the response given to a 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 produced the following result, which has cracks in it due to holes between the polygons:

Combined polygons with cracks

So I updated my query with the following change:

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

Which improved the result, however it’s not solving the issue completely and it also damages the outer boundary accuracy.

Combined polygons with less cracks

What is the correct way to achieve this? From looking through a list of the STxxxx functions I couldn’t see one that seemed to provide the results I need?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:00:13+00:00Added an answer on May 27, 2026 at 6:00 am

    Answer provided by geographika at GIS StackExchange:

    It sounds like you want to remove slivers. There is a function for this in the SQL Server Spatial Tools project – FilterArtifactsGeometry.

    A blog post on using the function can be found here.

    This has an option for filtering out small poylgons using the ringTolerance parameter:

    Remove all polygon rings thinner than provided tolerance (e.g. ring.STArea < ringTolerance x ring.STLength). A value of 0 will not remove any rings.

    In practice, this allows very thin polygon rings (slivers) to be
    detected and removed while leaving more typically shaped polygon rings
    alone. The presumption is, of course, that slivers are undesirable
    but non-sliver rings are desirable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have lots of article store in MS SQL server 2005 database in a
We have lots of stored procedures written in SQL Server 2005. After database migrated
We have lots of stored procedures which all contain a lot of comments. Is
I have lots of vectors like this one below, very sparse, lots of 'NaN'.
i have lots of videos in my server and i use the following code
I have lots of anchor tags that each contain a thumbnail image: <a href=...
I have lots of variables in R, all of type list a100 = list()
I have lots of forms on a project I'm working on. All the forms
We have lots of selenium tests running through junit, and they all have a
I have lots of orders in tblOrders and a few deliveries in tblDeliveries. SELECT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.