[Mapserver-users] Max number of layers craps out at about 295
Stephen Clark
stephen.clark at focus.ca
Fri Feb 13 14:47:19 PST 2004
Pericles,
I have tried the following MS versions with no luck:
> #define MS_MAXCOLORS 256
> #define MS_MAXCLASSES 50
> #define MS_MAXLAYERS 700
my MS version 4.0.1.2 -- essentially ms code version 4.0.1 plus my local
increment.
> #define MS_MAXCOLORS 256
> #define MS_MAXCLASSES 250
> #define MS_MAXLAYERS 700
my MS version 4.0.1.3.
Both MS executables display the error in a message box:
> > > > The error I get is 'The Memory could not be "read".' with some hex
> > > > codes displayed.
> > > PS: Does your web server's error log say anything about this?
> > >
> > >
No errors reported in the Apache error log.
> > > One more thing, are you sure that 295 is the max layers that your
> > > mapserv program can display, or is it that layer #295 has problems?
> > > With that many layers, debugging can't possibly be fun.
I test each layer as I add them. In this case I already know each
individual layer works. I test each layer in another map file to be sure.
I am not sure how to fix this problem.
Is there any other way to fix the problem
Stephen
----- Original Message -----
From: "Pericles S. Nacionales" <nacional at cbs.umn.edu>
To: "Stephen Clark" <stephen.clark at focus.ca>
Cc: <mapserver-users at lists.gis.umn.edu>
Sent: Friday, February 13, 2004 11:13 AM
Subject: Re: [Mapserver-users] Max number of layers craps out at about 295
> Stephen,
>
> You only need to change MS_MAXLAYERS to increase your layer #'s. You
> don't have to touch MS_MAXCLASSES and you shouldn't really touch
> MS_MAXCOLORS.
>
> I think MS_MAXCLASSES used to have a value of 50 but when I checked my
> map.h yesterday it was at 250. How many classes per layer do you
> define? I'd say you can lower this value if you need to.
>
> As for MS_MAXCOLORS, the default value is 256. I wouldn't touch it.
> Back in the days of MapServer 3.x this was the maximum # of colors
> MapServer can support--the number of colors in the color table (look-up
> table) associated with the input/output image. I'd like to think that
> this still applies to colormapped output in version 4. I'd say leave
> the default value as it is.
>
> So, why not try these value and change your MS_MAXCLASSES if necessary:
> #define MS_MAXCOLORS 256
> #define MS_MAXCLASSES 50
> #define MS_MAXLAYERS 700
>
> Good luck!
> -Perry N.
>
> On Fri, 2004-02-13 at 10:32, Stephen Clark wrote:
> > Pericles,
> >
> > I chose the number 700 for each of the following :
> >
> > #define MS_MAXCOLORS 700
> > #define MS_MAXCLASSES 700
> > #define MS_MAXLAYERS 700
> >
> >
> > because I thought that each LAYER needed the same number of CLASSES and
> > COLORS.
> >
> > So can I assume that if I have about 3 classes per layer then I can use
the
> > following:
> >
> > #define MS_MAXCOLORS 128
> > #define MS_MAXCLASSES 128
> > #define MS_MAXLAYERS 700
> >
> > or perhaps a number less than 128?
> >
> > I will try out this option and recompile MS with the above specs.
> >
> > thanks
> > Stephen
> >
> >
> > ----- Original Message -----
> > From: "Pericles S. Nacionales" <nacional at cbs.umn.edu>
> > To: "Stephen Clark" <stephen.clark at focus.ca>
> > Cc: <mapserver-users at lists.gis.umn.edu>
> > Sent: Thursday, February 12, 2004 6:17 PM
> > Subject: Re: [Mapserver-users] Max number of layers craps out at about
295
> >
> >
> > > Stephen,
> > >
> > > I have a mapfile with more than 300 layers and it works just fine. I
> > > don't know what your exact situation is but you can't possibly be
using
> > > all 700 layers at once, can you? I have noticed that you also changed
> > > your MAXCLASSES to 700 and MAXCOLORS to 700. Why? Do you really need
> > > to specify that many classes in a layer? Try lowering the MAXCLASSES
> > > and putting MAXCOLORS back to 256.
> > >
> > > Like I said, I don't really know what your situation is but you might
> > > need to rethink how you'd accomodate all those layers in MapServer.
Are
> > > each of the layers so unique that you can't combine (union, merge,
> > > whatever) them?
> > >
> > > One more thing, are you sure that 295 is the max layers that your
> > > mapserv program can display, or is it that layer #295 has problems?
> > > With that many layers, debugging can't possibly be fun.
> > >
> > > OK, I promise this is the last thing... since your error message isn't
> > > sufficiently detailed. I used to get a similar error message which
> > > turned out to be due to corrupt shptree indices (this was back in the
> > > 3.3/3.4 days but you never know). Do you have .qix files? Try moving
> > > them out of the way.
> > >
> > > Good luck!
> > > -Perry N.
> > >
> > > PS: Does your web server's error log say anything about this?
> > >
> > >
> > > On Wed, 2004-02-11 at 17:27, Stephen Clark wrote:
> > > > Hi all,
> > > >
> > > > I am trying to get the max number of layers that MS will read from a
> > > > *.map file to be 500 or more.
> > > >
> > > > Once I exceed about 295 layers the MAP file will not be displayed.
> > > >
> > > > The error I get is 'The Memory could not be "read".' with some hex
> > > > codes displayed.
> > > >
> > > > I have attached my "map.h" file as reference.
> > > > Is there some other file that have to modify to be able to increase
> > > > the number of layers?
> > > >
> > > > thanks
> > > > Stephen
> > >
> > >
> > >
> > > _______________________________________________
> > > Mapserver-users mailing list
> > > Mapserver-users at lists.gis.umn.edu
> > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> > >
> >
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> --
> "He's no geek.His tan's too good." -Benjamin Choate
>
>
More information about the MapServer-users
mailing list