[mapserver-users] MS_MAXSYMBOLS
Steve Lime
steve.lime at dnr.state.mn.us
Fri Sep 6 12:21:58 PDT 2002
Actually it's "how 1990's"... Remember that portions of this code were
written circa 1995, perhaps even earlier, initially as part of a pet
project at the University of Minnesota, Department of Forest Resources.
Not exactly of hotbed of advanced programming techniques, but then again
the focus was on functionality and usability at that stage. Layers and
such are dynamically allocated but based upon a limit. Haven't had time
to go back and monkey with that. The limits become an issue for maybe
one user a year, there is a workaround and there are always more
pressing needs. If someone would like to help in converting arrays to
lists (layers/symbols/styles and so on) it would be welcomed.
The error handling is actually quite old. After all when you're
developing for an audience of 1 who cares. Perhaps a re-write for
4.0...
Shptree is also quite old. Originally written by Frank, but with no IO
component. I added an initial version years ago and another developer
built on that with the new style indexes, byte ordering and so on. I
myself have not run into the index issues so pass along what you find,
or at least shapefiles that are capable of generating the bad indexes.
The other shapetools were actually part of the shapelib distribution, so
blame them...
Steve
Stephen Lime
Data & Applications Manager
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Mark Eichin <eichin at thok.org> 09/06/02 02:00AM >>>
> Because it's good programming style to use limits. 64 is ... uhm.
Well
Not to be harsh, but, ummm.... "how 1970's" :-) The only thing limits
like this gets you is the need to edit and recompile things to fix
them. If you're not doing hard real-time programming (and indeed,
you're not) or the limit corresponds to something physical (interface
packet size limit, physical number of ports, that kind of thing)
dynamic allocation is a win, really.
Out of curiosity, from where (and when) did this code evolve? I've
never run across an error-handling API quite like msSetError before,
and given that there's code in the mapserver release tree that misuses
it[1] it would be nice to have more background from which to guess.
_Mark_ <eichin at thok.org>
[1] the shptree tools, at least in 3.6.1, don't report *any* errors,
even "permission denied", and are prone to generating corrupt .qix
files, and I can't even tell if that's due to unreported errors or
other bugs without massaging some of the code... I'll send in patches
once I figure out what's wrong, in the short term the hack of noticing
that shptreetst dumps core on the corrupt ones leads to an sh
one-liner to delete them... of course, the shptree tools are in a
different code style than the rest of the tree, likely contributed
from the Windows side of things, given the use of Hungarian notation.
More information about the MapServer-users
mailing list