[postgis-users] How to simplify and complex (i.e. slow) geometry

Mike Dvorak dvorak at stanford.edu
Mon Aug 20 16:55:57 PDT 2007


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


-- 
==========================================
Mike Dvorak
Atmosphere/Energy PhD student
Dept. of Civil & Environmental Engineering
Stanford University
Phone: (773) 936-8053
==========================================



More information about the postgis-users mailing list