STconvexhull on SToverlaps
hi all, i'm starting work spatial in sql server, have hit wall. have database of 16 million x/y points each in different record, want buffer (stbuffer) each point 10 metres, overlap (stoverlaps) each other, create new geometry polygon record in different table using stconvexhull. can in mapinfo 10,000 points, looking t-sql solution.
cheers,
bill
hi there,
everything state possible t-sql in sql server, 16 million points it's going pretty intensive operation (or, rather, set of operations). i'm curious know reason why want (and also, going one-off operation only?)
some other questions/clarifications:
- you're stbuffering each point 10 metres, , testing stoverlaps of buffered geometries. in case, you're trying in first step identify points in dataset a.stdistance(b) less 10 metres? (do want buffered geometries other reason?)
- you said want create polygon convex hull points overlap. want in case of 2 points buffers intersect? stconvexhull of these points return linestring, not polygon. or want create convexhull of buffered areas rather original points?
- i'm unclear results expect in new table. let's points table looks this:
declare @t table ( id char(1), geom geometry ); insert into @t values ('a', 'point(-12 12)'), ('b', 'point(12 12)'), ('c', 'point(0 0)'), ('d', 'point(-12 -12)'), ('e', 'point(12 -12)'); select id, geom.stbuffer(10) from @t;
if examine each point in order, you'd find buffered overlaps buffered c, you'd first create convexhull of (a,c) (a linestring).
then, examining buffered point b, overlaps buffered point c only, you'd linestring.
then you'd examine buffered point c, overlaps other points. so, stconvexhull give square polygon a->b->e->d->a
points d , e overlap point c, you'd 2 linestrings.
so, you'd end in table 4 linestrings , 1 polygon - want?
twitter: @alastaira blog: http://alastaira.wordpress.com/
SQL Server > SQL Server Spatial
Comments
Post a Comment