[postgis-users] Re: "Summarizing" a collection of geometries
Reid Priedhorsky
reid at umn.edu
Tue Apr 22 11:33:38 PDT 2008
Reid Priedhorsky wrote:
> Dear list,
>
> I would like to compute a "summary" of a collection of geometries
> (points, linestrings, polygons, or any combination).
>
> Here is the use case. I would like to summarize the geometry collection
> and present this summary visually so users working at a small scale can
> see, "ah, if I zoom in here, I can see more details about this geometry
> collection".
>
> The simple solution would be to compute a convex hull or bounding box,
> but this fails if the members of the collection are far apart (users
> could zoom into the middle and see nothing). In this case the summary
> would need to be a multipolygon. But the trick is figuring out when to
> split summary polygons into multipolygons.
>
> Has this been done? Do any of you have suggestions or references?
>
> It is very preferable to do this entirely in the database rather than in
> external code. Embedded procedures are fine.
>
> As you can see I am not entirely sure of my terminology, so any
> suggestions there would be welcome as well.
Just to clarify, this is something I need to do now -- I don't want to
wait until a really slick way is implemented.
Here's one idea:
1. Use ST_Buffer() to compute polygon buffers around members of the
collection. Question: ST_Buffer() docs say it can't handle
GeometryCollections. What about e.g. MultiPoint or MultiPolygon?
2. Take the ST_Union() of the result of #1, producing a MultiPolygon.
Does seem like a reasonable approach?
Thanks,
Reid
More information about the postgis-users
mailing list