I am an experienced programmer, but new to GIS. My question: I would like to automate the creation of PDF reports from a website, using Grass GIS.

I've come across Web Processing Service (WPS) (http://www.opengeospatial.org/standards/wps/) but am unsure how this fits into any possible report automation.

Is WPS the way to automate report generation, or is some kind of direct scripting (such as with Python) a better solution?

  • I think it depends on how the reports are being used. Are they generated and then served back to the web? Are they remaining on the server? – rumski20 Jan 5 '17 at 21:55
  • We would want the report generated and then served back to the web (so the user can download and save the report). – Robert L Jan 5 '17 at 22:16
  • I don't think WPS is "the" (as in "the only") way to automate report generation. The main reason I think you would use WPS is if your server side environment is specifically tailored for it (see here for an example using Geoserver: geoserver.geo-solutions.it/edu/en/wps/wps.html). I think the best solution is the one that you can execute. Certainly python (ie. reportlab) is a viable option. – rumski20 Jan 5 '17 at 22:44
  • Thank you @rumski20 - theoretically, if I have a predefined report in Grass, using Python (or some other scripting language) would I be able to pass in some parameters from the website, then have Grass process and generate the PDF, which then serves it serves it back from the web? – Robert L Jan 6 '17 at 0:19
  • Sorry. Can't help you there. I'm not familiar with GRASS GIS. Hopefully somebody here can instruct you in that, however. – rumski20 Jan 6 '17 at 22:07

Making use of WPS is certainly not the only way of achieving this, but it might simplify a number of things. PyWPS in particular, greatly facilitates the interaction with the GRASS API.

The pywps-demo project includes an example performing a buffer with GRASS, where you can get a good idea of how to wire your process.

In your case, you can define a number of Literal inputs for the report parameters and then a Complex output for the report itself. E.g.:

def __init__(self):

        inputs  = [LiteralInput('paramA', 'Parameter A', data_type='float'), 
                   LiteralInput('paramB', 'Parameter B', data_type='string')]

        outputs = [ComplexOutput('report', 'Report',

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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