[mapserver-dev] New MapScript API Docs

Seth G sethg at geographika.co.uk
Sun Sep 15 12:20:35 PDT 2019

Howard - thanks for the encouragement for the docs. I guess if MapScript is to be kept alive it may as well have up-to-date docs!
I'm aware of the killing MapScript movement, and avoiding MapScript was the entire reason behind my writing the mappyfile library [1]. Sean Gillies who I believe was the last person to undertake significant MapScript changes finished up by writing the blog post "Stop Using MapScript"!

On the other hand MapScript has proved useful to many people and all with little to no maintenance for the last 15 years, and SWIG is fortunately still being maintained with a new v4 release a few months ago. 

I've come to appreciate MapScript most in the following cases:

- allowing high quality cartographic output as part of Python workflows, mainly using the `draw` functions in MapScript
- as a second testing method for MapServer along with msautotest (via the Python test suite which now has > 300 tests)
- allowing reuse of MapServer functions directly in a scripting language without having to jump out into the command line (legend generation, scalebars, querying and reusing connection configurations etc.). 

For Mapfile manipulation though I'd agree MapScript is far less useful than string templating and `fromstring` functions in the host language. 

Just to note - we have Andy to thank for setting up Perl MapScript tests earlier this year - https://github.com/mapserver/mapserver/pull/5778
Andy - if you have any interest in setting up some more Perl typemaps or starting a Perl MapScript specific docs page let me know,


[1] https://mappyfile.readthedocs.io/
[2] https://sgillies.net/2006/11/29/stop-using-mapscript.html

twitter: @geographika

On Sun, Sep 15, 2019, at 4:22 PM, Howard Butler wrote:
>> Why do you want to kill MapScript? I have poured everything into mapscript.
> To kill MapScript is a running haha-but-serious joke I've had going for a long time with some of the MapServer developers. My case to do so is that MapScript has never been on par with mapfile and the mapfile definition for specifying objects and their relationships. Object lifetimes and their relationships were historically indefinite and sometimes inconsistent in MapScript. Additionally, any backwards compatibility considerations are often accommodated in mapfile, but were not addressed consistently in MapScript.
> In my opinion, language-specific implementations were better off to use their own templating facilities and use the msLoad*FromString capability. This recognizes that mapfile is the definition of how MapServer renders images, it has validation of the object relationships, and the project does its best to protect mapfile compatibility as new versions are released. 
> Seth has done a ton of work on MapScript to fix all that and made MapScript better than it ever was. All of his work means it will probably never die :)
> Howard
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20190915/7c59550e/attachment.html>

More information about the mapserver-dev mailing list