Postgis Polygon

Daniel Caldeweyher calde at GMX.NET
Thu Feb 17 17:01:01 EST 2005


Hi,

I have the same problem. The data is stored in PostGIS as MULTIPOLYGON, but
when I try to process the geometry e.g. envelope(geom) to display the
bounding box, the function returns the result as a POLYGON which cannot be
displayed using the SRID.

As a work-around I used:

DATA "geom from (select oid, poa_code, geomfromtext('MULTIPOLYGON(' || trim
(leading 'POLYGON' from astext(envelope(geom))) || ')',6) as geom from
qldpoa_h_region where poa_code=4000) as foo using unique oid using srid=6"

It is only a quick and dirty method, but this works for me. If anyone has a
better solution, please let me know.

Daniel



More information about the mapserver-users mailing list