[mapserver-users] [Solved] PHP-MapScript, Postgis & fills of polygons /w inner rings

Morten Hulden morten at ngb.se
Tue Apr 2 19:10:35 EST 2002


Yes, it works, even for 'lakes on islands in lakes'.

The problem was that I did not realize that EOO files contain the polygons 
in the PAL section twice - once as inner rings inside other polygons and 
once as free outer rings.

The holes were there, but covered with the second instance of the same
polygons, now as free outer rings and thus of the same color.

I changed my e00->postgis script so free outer rings are ignored unless 
they are on top level and, surprise, I got the topology out of the 
e00-files.

My script (Perl) is available for anyone interested at 
http://untamo.ngb.se/download/e002pgis.pl

It's nothing fancy - it will just extract polygons, nothing else, and (for
now) only handles single precision data. But it will rebuild topology
directly as a sequence of INSERT statements for Postgis.

Thanks to all who responded. It's much easier to debug when you know
something works for others. Then you know your own scripts are to blame.

Morten Hulden


On Mon, 1 Apr 2002, Steve Lime wrote:

> Holes are supported, as are polygons with multiple outer rings. I'm not
> aware of any issues with shapefiles/SDE/inline features. The other
> authors would have to comment about their supported file formats.
> 
> Steve
> 
> Stephen Lime
> Data & Applications Manager
> 
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937
> 
> >>> Morten Hulden <morten at ngb.se> 04/01/02 03:18PM >>>
> 
> 
> For some reason my mapserver does not honor inner rings of polygons,
> but fills everything, islands and all.
> 
> Didn't find an explanation in tutorials or FAQs, so I though I should
> ask 
> here.
> 
> Is this specific to PHP-Mapscript? Or to Postgis (I use geometry
> POLYGON)? 
> Does it work with CGI-version? Shapefiles? Or is it that GD can't do
> it?
> 
> M.
> 
> 
> 




More information about the mapserver-users mailing list