Drawing collected multipolygons from PostGIS...

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Wed May 16 10:35:44 PDT 2007


John, a collection does not polygon make. A collection is more like an 
array of polygons and any array doe not have an exterior ring.

You might try replacing collect(the_geom) with MemGeomUnion(the_geom)

and see if you have any luck with that. It might be too slow.

-Steve W.

John Cole wrote:
> Hello,
>   I'm trying to "pretty" up a polygon layer (specifically tiger placecu). 
> I'd like to draw an outline of a collection of multipolygon objects, but it
> doesn't seem to be working.
> 
> Here is my data statement in my mapfile:
> 
> 	DATA "the_geom from (SELECT min(gid) as gid, collect(the_geom) as the_geom
> from placecu
> WHERE (gid = any (string_to_array('%PLCGID%', '^'))) 
> and (the_geom && setSRID(!BOX!, 4326)) group by name) foo USING SRID=4326,
> USING UNIQUE gid"
> 
> If I remove the min/collect the layer draws fine, but I was hoping to get
> the exterior ring of the combined polygons and draw that.  Has anyone done
> something similar?  I'd love an example.
> 
> Thanks,
> 
> John



More information about the MapServer-users mailing list