[MI-L] Geometry union in SQL 2008

132 views
Skip to first unread message

Phil

unread,
May 6, 2010, 8:18:19 PM5/6/10
to MapInfo-L
I am trying to create a union of the spatial objects of a table
grouping them by a field in SQL2008. I have been using the aggregate
functions of SQL Spatial Tools but this does not allow for union of
geometries. Is there a 2008 way of doing this? (ie with STUnion)

eg I have a table of various polygon geometries (sp_geom) represented
by 'a to l' below

Group sp_geometry
2 a
2 b
4 c
4 d
5 e
5 f
5 g
8 h
8 i
9 j
9 k
9 l

I want to return the following, where '&' represents a union.

Group sp_geometry
2 a & b
4 c & d
5 e & f & g
8 h & I
9 j & k & l

Any ideas?

--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, send email to mapinfo-l+...@googlegroups.com
For more options, information and links to MapInfo resources (searching archives, posting feature requests, to visit our Wiki, visit the Welcome page at http://groups.google.com/group/mapinfo-l?hl=en

Uffe Kousgaard

unread,
May 7, 2010, 3:36:42 AM5/7/10
to mapi...@googlegroups.com
Hi Phil,

In MapInfo you can do it with the objects combine command.

It sounds as if you are trying to do this from within SQL Server 2008.
If so you may have to turn to a support forum specific for that product.

Regards
Uffe Kousgaard

Mike Taylor

unread,
May 9, 2010, 5:49:21 PM5/9/10
to mapi...@googlegroups.com
Hi

It can be done in SQL Server 2008 using the STUnion, but you'll need to do
it procedurally as you can only union 2 geometries at a time. We have also
encountered issues with using STUnion not producing good results where
geometries are touching (leaving lines along the join). Probably best to do
this in MapInfo if you can.

Regards
Mike
Reply all
Reply to author
Forward
0 new messages