[postgis-users] How to simplify and complex (i.e. slow) geometry
Martin Davis
mbdavis at refractions.net
Mon Aug 20 17:38:44 PDT 2007
Try using ST_Buffer(mask, 0.0). That should union all the geometries
into a single (Multi)polygon.
You could also help us to find some funding to support porting the new
JTS optimized predicates to GEOS ;^)
Martin
Mike Dvorak wrote:
> Dear PostGIS users,
>
> First off, I must say that I think the PostGIS project is absolutely
> great. I've been using PostGIS daily for my research for about 6 months
> now and have come to love it. I deal with rather larger geospatial
> databases (as large as 200 GB), so I think I have been really pushing
> PostGIS (and Postgres) to its limits but having mostly success in doing so.
>
> Here's my current problem. I have a complex 2D polygon geometry that
> I'm using as a mask, to limit what areas of wind fields from a weather
> model I insert into my database. You can find an example mask of the
> "shallow" ocean waters near the San Francisco Bay here:
> http://www.stanford.edu/~dvorak/tmp/how-to-simplify-geom-example.png
>
> The problem is that this 2D polygon, contains a lot of redundancy for a
> mask and it takes forever (i.e. tens of hours) to create the
> intersection of the 2D mask polygon and the grid of model points that I
> want to mask (approximately 200 x 240 points).
>
> I tried using ST_ConvexHull and ST_Union (with the mask for both
> arguments) without luck to simplify this example mask in the URL. Is
> there a PostGIS function that will get rid of all redundant mask objects
> i.e. objects that are completely contained within another object, or do
> I have to program this myself?
>
> Thanks for any advice!
>
> Cheers,
> Mike
>
>
>
--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022
More information about the postgis-users
mailing list