[postgis-devel] postgisonline.org now handles collections

Nicklas Avén nicklas.aven at jordogskog.no
Wed Mar 10 02:35:09 PST 2010


Hallo
 
Now postgisonline.org handles geometry collections and return all different tyoes in the collection. It also handles if a table has different types in different rows.
 
Everything thanks to the new function ST_CollectionExtract
 
What I do is to send every geometry to three layers in the map-file in mapserver , one with point symbol, one with line and one polygon.
Then I split the geometry like this for the polygon example:
  DATA "the_geom FROM (select ST_CollectionExtract(ST_Force_Collection(the_geom),3) as the_geom, idmap1 from userdata.%relation%) as a USING UNIQUE idmap1 USING SRID=%srid%"

 
it seems to work.
 
I didn't see any simple solution for handling geometry collections in mapserver on the net, but with PostGIS 1.5 it is no big deal :-)
 
THis approach give som overhead since the query has to be evaluted 3 times instead of one even for cases that isn't collections. But I think  it's worth it in this case because I also catch special cases like different types on different rows.
 
But the alternative of course is to make collections a special case and send those to special map-file layers.
 
 
About the firefox-problem I mentioned the other day it was of course me who had done things wrong. ow it should work.
 
/Nicklas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20100310/f0680560/attachment.html>


More information about the postgis-devel mailing list