geoadmin/mf-chsdi3 — pull request #1086 by procrastinatio (2014-10-24 09:15:53+00:00)
Title: Print proxy

Implementation of a print proxy to deal with time series layers in the current

## Spec

The spec document has to be modified the following way:

- The print template will print a timestamp, if present

` {"pages: [{"timestamp": "20111231"}]]}`

- If at least one layer has a time serie, a page will be generated for each "timestamp"

`{"layers": [{"timstamps": ["20010112", "20021231"]}]}`

- Otherwise print as usual

## Tests

example | waitress | pdf | remarks
------------|----------------------|---------------------- |-----
zeitreiehen | 39s | 580 MB | all zeitreiehn + PK base layer
zeitreiehen2 | 41s | 412MB | all zeitreiehen
zeitreiehen3 | 44s | 390MB | all zeitreiehen, scale 1:100'000
luftbild | 1m38s | 320MB | luftbild s/w + luftbild farbe + PK
luftbild 75dpi | 28s | 88MB | luftbild s/w + luftbild farbe + PK
combination | 2m05s | 782MB | all zeitreiehen + luftbild s/w + luftbild farbe

Note 'waitress' is by far more robust than 'apache2' on our dev instance (way too much process on this instance)

## Issues

1/ Apache2 timeout
Request with response time over 60 seconds will fail. I have tried to cope with this streaming results as soon as some page are available, PDF is not made for this and streaming
big files through the WSGI interface kills the server. The only way is to increase the timeout, with all issues associated to blocking apache process.

2/ Size of generated PDF
Generating PDF at 75 DPI instead of 150DPI, discarding layers which are under an opaque one, as for instance the pixelkarte under the 'zeitreihen'.