[Mapserver-users] Odd Error - Fixed

Jeff Berry jeffb at erlandsen.com
Wed Jan 22 10:32:46 PST 2003


The lakes are all closed polygons. Is it even possible to have an unclosed
polygon in a shapefile? In anycase, I fixed the problem by sorting the lakes
shapefile and then using MAXFEATURES.  It would only happen when I tried to
draw too many lake features at once.  I played with the MAXFEATURES value a
bit until I found a setting that worked.  If I tried to draw over 75 lakes
in the view, it caused the error, but less than that and it rendered just
fine.  I still don't understand why this was happening, but at least I found
a work around.

Thanks,
Jeff

-----Original Message-----
From: Dylan Keon [mailto:keon at nacse.org]
Sent: Monday, January 20, 2003 5:20 PM
To: Jeff Berry
Cc: mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] Odd Error


Jeff Berry wrote:
> I have a lakes polygon layer that draws just fine at large scales.
However,
> if I zoom out to the entire extent of the dataset I get the following
error:
>
> Warning: MapServer Error in msDrawShape(): Only polygon shapes can be
drawn
> using a POLYGON layer definition.
>
> This happens with a couple other polygon layers as well, when I zoom out
to
> a point where a lot of polygon features are displayed in the current
extent.
>
> What is causing this?

Could those layers contain unclosed polygons?  This is just a wild guess
since I don't know how MapServer handles that type of situation, but
perhaps the large scale views were successful because you happened to be
displaying small regions where all polygons were closed.  Then, when
zoomed to full extent, MapServer throws the error when trying to render
the unclosed polygons (?)

If you have ArcInfo at your disposal you could try converting your
shapefiles to coverages, running CLEAN to build polygon topology, and
converting back to shapefiles.

--Dylan

--
************************************************
  Dylan Keon
  GIS/Database Research Specialist
  Northwest Alliance for Computational
  Science and Engineering (NACSE)
  Oregon State University
  Corvallis, OR 97331
  keon at nacse.org        (541) 737-6608
************************************************






More information about the MapServer-users mailing list