[mapserver-users] getting rid of GD and dependencies

Jan Hartmann jhart at frw.uva.nl
Wed Jul 17 08:44:06 EDT 2002


It is not very difficult to replace all GD routines with something from
other graphic libraries; Mapserver only uses about 30 basic GD calls and
they can very easily be translated into some other package, which can be
linked into the MapServer executable. I tried this out with the Ming library
to get Flash output. However, just replacing the base GD-calls will not give
you better looking output. Lots of rasterizing is done within MapServer
itself (e.g. filling polygons), so the more advanced functions of your
graphics package won't be used at al. To use those, you  have to rewrite
MapServer vector functions on a much higher level, and this is really much
more complex than just rewriting the base GD-calls. Moreover, GD-bitmaps are
used exensively within MapServer as internal buffers, and this will
certainly cause problems when ported to other systems.

Probably a better way would be to wait for the extended vector output
facilities of MapServer 3.7. Perhaps you could do something with formats
like Flash, GML or SVG.

Jan Hartmann
Department of Geography
University of Amsterdam
jhart at frw.uva.nl


-----Original Message-----
From: owner-mapserver-users at lists.gis.umn.edu
[mailto:owner-mapserver-users at lists.gis.umn.edu]On Behalf Of Alex Rice
Sent: Wednesday, July 17, 2002 10:33 AM
To: mapserver-users at lists.gis.umn.edu
Subject: [mapserver-users] getting rid of GD and dependencies


I have this crazy idea to take the Mapserver code base and rip out all
the GD/libJPEG/libPNG/etc. code and rewrite the graphics routines to use
Cocoa's AppKit rendering on Mac OS X. Cocoa is Apple's Objective-C
framework, formerly called OpenStep. The advantages of this that I can
see:

1) It would remove most or all of the difficult compile and dependency
problems that mapserver has on OS X. It might be necessary to wrap
mapserver in an Objective-C application, or a loadable bundle, but that
won't present a problem.

2) I suspect it would look a whole lot better. Cocoa has a
Postscript-like imaging model and uses PDF, antialiasing and vector
graphics. No jaggies! Just nice smooth images. Appkit also has a lot of
neat features for compositing images with both raster and vector
content. And Unicode support. It's just a really neat graphics
environment through and through.

3) Whatever work I did could theoretically, eventually be ported to
GNUStep, and thus run on any other Unix platform.
(http://www.gnustep.org). Although I hear that currently the GnuStep
Appkit stuff still needs a lot of refinement.

So mainly I just want to bounce this idea off you all...

-- Would anyone take offense if I did this to the mapserver source code?

-- Is there anyone on the list who knows Objective-C and Appkit
programming?

-- Good idea? Crazy idea?

-- The license to mapserver looks very um, flexible. Are there any
commercial products based on it? I don't know if this project I am
describing would be open-source or not, I haven't talked with my
employer about legal shtuff yet. I would push it to be open-source
though.

Thanks in advance,

Alex Rice, Software Developer
Architectural Research Consultants, Inc.
alex_rice at arc.to
alrice at swcp.com





More information about the mapserver-users mailing list