Take a look at ST_Simplify http://postgis.refractions.net/docs/ST_Simplify.html
Or ST_SimplifyPreserveTopology if you want to preserve boundaries: http://postgis.refractions.net/docs/ST_SimplifyPreserveTopology.html -Mike On 4 March 2011 09:44, Peter N. Schweitzer <pschweit...@usgs.gov> wrote: > > At http://tin.er.usgs.gov/geology/state/ and pages below it, I provide > geologic map units for US states in KML for use within Google Earth. > These are stored in PostgreSQL (9.0.2) with PostGIS (1.5.2). My problem > is that many of the larger geologic units are represented as polygons that > have a large number of vertices, often with many interior rings. Google Earth > doesn't want to display polygons that have 100,000 vertices (I think the > actual limit is lower, but I don't know what it is.) So my geologic maps > have large irregular holes in them when viewed in Google Earth. > > Is there a way, using PostGIS functions, to split these polygons so that > the resulting polygons have fewer vertices and thus would appear as expected > in Google Earth? It seems to me one possibility would be to intersect > these large polygons with Box2D's whose vertical dimensions were, say, > one or two degrees. But I don't yet see how to carry this operation out. > > Can anyone offer suggestions as to how this might be done? > > Here are some of the characteristics of the data. The principal table > containing the polygons is named geol_poly; the field unit_link is a > relational key to other, more interesting data, and the_geom comes through > shp2pgsql. > > select unit_link,ST_NPoints(the_geom) npt,ST_NumGeometries(the_geom) ng, > ST_NumInteriorRings(the_geom) ni from geol_poly order by npt desc; > unit_link | npt | ng | ni > -----------------+--------+----+------ > FLwater;0 | 451759 | 1 | 8945 > PAPAa;6 | 319192 | 1 | 1235 > PAPAcg;6 | 216653 | 1 | 925 > ALwater;0 | 205251 | 1 | 108 > OHPAc;0 | 201310 | 1 | 842 > OHPAm;0 | 200763 | 1 | 895 > OHPAap;0 | 196422 | 1 | 1207 > MNOl;0 | 188753 | 1 | 107 > MNCu;0 | 165061 | 1 | 86 > TNObh;6 | 152421 | 1 | 825 > PAPAp;6 | 144889 | 1 | 324 > MOOjc;0 | 144721 | 1 | 144 > MOMk;0 | 128731 | 1 | 290 > WVPAk;0 | 128402 | 1 | 934 > TXKed;0 | 124666 | 1 | 720 > TNMfp;10 | 122021 | 1 | 117 > OHMlc;0 | 116993 | 1 | 731 > TNMfp;10 | 113034 | 1 | 406 > MOOr;0 | 109195 | 1 | 136 > PAPAm;6 | 105906 | 1 | 395 > PAPAcc;6 | 105798 | 1 | 447 > WVPAm;0 | 99944 | 1 | 474 > CAQ;0 | 97086 | 1 | 455 > WVPAc;0 | 94277 | 1 | 455 > MNOm;0 | 93054 | 1 | 53 > PAPPAw;0 | 89974 | 1 | 218 > TNOca;6 | 89292 | 1 | 564 > WVPAa;0 | 89182 | 1 | 504 > MOOr;0 | 87103 | 1 | 171 > MOOg;0 | 85660 | 1 | 277 > > Peter > -- > Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192) > (703) 648-6533 FAX: (703) 648-6252 email: pschweit...@usgs.gov > <http://geology.usgs.gov/peter/> > _______________________________________________ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users