[postgis-users] Union, but need to exclude any void

Toby Rainthorpe toby.rainthorpe at frsltd.co.uk
Sat Nov 1 16:52:10 PDT 2008


I can confirm that the union does work correctly. My problem comes  
from using the google maps api to represent the data. As far as I can  
tell google maps polygons cannot have void / inner boundary. I think  
the only way to create the void is to find the minimum number of  
polygons that can make up the polygon with the void, but not include it.

For instance looking a 5 x 5 grid with two voids I could use a minimum  
of two polygons to create the illusion of the void.
1 = Polygon 1
2 = Polygon 2
x = Void

1	1	1	2	2
1	1	1	X	2
1	X	2	2	2
1	1	1	1	1
1	1	1	1	1

You can use a KML file, however there are size restrictions. You can  
also use collect and render all the polygons to get the desired  
effect, however this is inefficient and becomes harder to style  
correctly.

Does anyone know if a open layers, mapserver, geo server etc. setup  
would be able to deal with voids / inner boundaries of polygons  
directly. Or any other ideas of getting around this issue with the  
google maps api?

Thanks for your help,

Toby

  



More information about the postgis-users mailing list