I need to perform a postprocessing operation on an image produced by MapServer before it is handed off to the final user of that image. I am looking for a way to hand a resulting image from MapServer directly to a postprocessing program, perhaps before it is written to disk.

I'm guessing something could be performed with MapScripts somehow with PHP instructing a different program to perform the postprocessing, but with the number of requests this will need to process, I'm hoping to keep the number of processes to a minumum.

Has anyone done something like this, or knows of a way to do something similar?


You could try using node-mapserv: This is not mapscript but a Node.js interface to the stock mapserver CGI code that allows more fine grained control over the input and output without sacrificing performance. In your case you can update the example code to write the mapserver output directly to your post processing program standard input, or integrate your postprocessing logic directly into the Node.js script.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.