Solution for OGR Virtual polygon data

Frank Warmerdam warmerdam at POBOX.COM
Mon Feb 20 11:55:46 EST 2006


Mark Adams wrote:
> Emil,
> 
> Thanks, you are right, that works. I'd had the same response from Frank W.
> I'm not sure where the format for these strings is specified or documented -
> the only information I was able to find said to do things differently.
> 
> For the benefit of anyone else trying to use this functionality, I also
> discovered that you could create a multi-polygon as follows:
> 
> POLYGON (( 501453.34 4800585.97, 501576.14 4800590.44, 501569.85 4800522,
> 501471.61 4800521.63, 501453.34 4800585.97 ))

Mark,

The format is OpenGIS Well Known Text geometry format from the Simple
Features for SQL Specification (99-049 I think).  It is the same format
reported by ogrinfo, and the textual format of PostGIS or MySQL Spatial.

Technically the above is not a multi-polygon.  A multi-polygon (in simple
features) is a collection of polygon objects.  A polygon is one or more
rings, with one being the outer ring and the rest being inner rings.  So
in the parliance I was used to in the old days, a polygon is an island
potentially with lakes cut out of it.  A multipolygon is a much of such
islands.

Multipolygons use the MULTIPOLYGON keyword.

A 'polygon' object in a shapefile may be either a simple features POLYGON
or MULTIPOLYGON depending on whether there are multiple outer rings.

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    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list