[mapserver-users] toWKT() method

Frank Warmerdam warmerdam at pobox.com
Mon Jul 14 09:39:12 PDT 2008


Sven Schroeter wrote:
> Hi all,
>  
> I'm using PHP-Mapscript with GEOS (Mapserver 5) to get a WKT-String from 
> a POSTGIS-Table:
>  
> $mywkt = $shpobj->toWKT();
>  
> Everything works fine for POLYGON, LINESTRING and POINT - tables.
> If I try the "toWKT()" Method for MULTIPOLYGON-Tables I get back a 
> POLYGON WKT-String.
> What can I do?

Sven,

The MapServer internal geometry model does not differentiate between polygons
and multipolygons so it is very hard to preserve the original multipolygon
without doing a great deal of processing on the rings held by mapserver to
determine whether they are really holes in a polygon or distinct polygons
in a multipolygon.

Basically, you are out of luck.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the MapServer-users mailing list