I have a table with a single column of geometry
type, containing polygons. How do I get the union of all the polygons in the table?
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
you mean, if you have 2 squares, lets say
and
you end up with a rectangle:
if yes, try the GPC (General Polygon Clipper library)
This link may also help you
This worked for me:
So, apparently, the STUnion method returns null when either the instance on which it's being called or the operand is null, hence the
select top 1
hack.In SQL Server 2012:
In SQL Server 2008/R2:
SELECT DISTINCT geometry from [your table]
?