MapServer / MapServer-import

3 stars 2 forks source link

Perl typemaps for image->write & map->process #1371

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: lfilak@medinaco.org Date: 2005/06/01 - 18:59

SWIG typemaps required for the image->write, map->processTemplate,
map->processLegendTemplate, & map->processQueryTemplate to work in PerlMapScript.
A patch file, currently for 4.4.2, will be attached and then for 4.6.0-beta3 as
soon as available.
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2005/06/01 - 20:29

I don't think there will be a 4.4.3 release, but I don't mind applying the patch.
For 4.6, we're getting away from imageObj::write() and recommending that modules
implement imageObj::getBytes() instead. It's less confusing. Only file-like
objects should be writing. The Python and Java mapscripts have getBytes for the
version 4.6. You could look at those for examples.
tbonfort commented 12 years ago

Author: lfilak@medinaco.org Date: 2005/06/02 - 20:56

I will inform the developer of the name change. The 4.4.2 patch is only intended
as a sample until the 4.6 patch is available.
tbonfort commented 12 years ago

Author: lfilak@medinaco.org Date: 2005/06/03 - 14:26

I think this method may be best left as 'write' as it is a file-like object.
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2005/06/03 - 16:01

I think this is a difference in usage style between Java/Python and Perl. With 
Python it is more natural to do this

    print imageObj.getBytes()    # send image data to stdout

I looked again at the Perl ImageMagick API and that does indeed use something
more like

    imageObj->write(STDOUT);

It is fine with me if you want to implement only the write method for Perl. The
sooner you can patch against the 4.6 beta 3, the better because I am running out
of time to help with this before the conference.
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2006/06/02 - 04:18

reassigning. i'm pretty sure i committed this one.
tbonfort commented 12 years ago

Author: lfilak@medinaco.org Date: 2006/07/13 - 22:00

(From update of attachment 546)
swig -perl5 -shadow -outdir . -o mapscript_wrap.c ../mapscript.i