Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a large geometry (MultiPolygon) for a (fictional) world map. It basically spans a large portion of the entire world: it's the difference between a buffered extension of the union of the entire world geometry and that union itself. In other words, a coastal buffer.

The geometry is in a PostGIS table (as one record). I serve this using GeoServer over WMS. Does it make sense to (automatically) split this giant geometry up into smaller ones, or is that completely unnecessary because PostGIS and/or GeoServer use the appropriate (sufficiently fast) intersection queries?

I'm not having a performance problem with this (yet) but the question is nagging at me.

share|improve this question
up vote 3 down vote accepted

It would be better to partition it. While GeoServer clips the geometry before painting it, it reads it all from the database. Of course this trick works only if you don't paint the border of the polygons, if you need to do that you need to create two layers, one with the partitioned polygons, and one with the partitioned borders, paint the first with a polygon symbolizer and the second with a line symbolizer (otherwise you'll see the cut lines be drawn).

share|improve this answer
A response from Andrea himself, neat :-) The border issue makes sense. Luckily I only need to fill it, not draw its contour. Do you happen to know if PostGIS has built-in functions that can make this kind of partitioning easy? Doesn't need to be very efficient since this is a preprocessing step. – Wouter Lievens Aug 27 '12 at 19:18
It seems Stackexchange has the answer:… (then you have to do the intersection, which is another sql query) – Andrea Aime Aug 28 '12 at 6:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.