[Geoserver-users] large sized wms requests (17000 x 12000 pixels)

Hi
I want to use GeoServer for generating topographic raster maps, so it’s actually a rastererizer for a lot of different vector data plus some shaded relief. Now I’m running into troubles with requesting a 17000x12000 pixel sized map. Using curl as follows:

curl -G -o test.tif ‘http://srsofaioi12288:8080/geoserver17x/wms?STYLES=&LAYERS=Basisplan_5000_Raster&FORMAT=image/tiff&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&TRANSPARENT=true&FORMAT_OPTIONS=antialias:none&BBOX=628000,242000,632375,245000&WIDTH=17000&HEIGHT=12000&SRS=EPSG:21781

I have different kind of errors:

  • curl stops immediately
  • curl stops after a minute
  • Apache Tomcat throws some heap space errors after 8 minutes

Requesting PNG instead of TIFF works better but is also a bit a game of luck.

Is there a better way to request and save this big sized images? The image size is given so I could request smaller images but would have to paste them together afterwards.

(I’m running a 1.7.x nightly build from last thursday with 1 GiB RAM assigned.)

regards
Stefan

Mit freundlichem Gruss
Stefan Ziegler
Leiter Aufsicht

Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
Rötistrasse 4
4501 Solothurn
Telefon 032 627 75 96
Telefax 032 627 75 98
stefan.ziegler@anonymised.com
http://www.so.ch

Ziegler Stefan wrote:

Hi
I want to use GeoServer for generating topographic raster maps, so it's actually a rastererizer for a lot of different vector data plus some shaded relief. Now I'm running into troubles with requesting a 17000x12000 pixel sized map. Using curl as follows:

curl -G -o test.tif 'http://srsofaioi12288:8080/geoserver17x/wms?STYLES=&LAYERS=Basisplan_5000_Raster&FORMAT=image/tiff&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&TRANSPARENT=true&FORMAT_OPTIONS=antialias:none&BBOX=628000,242000,632375,245000&WIDTH=17000&HEIGHT=12000&SRS=EPSG:21781

I have different kind of errors:
- curl stops immediately
- curl stops after a minute
- Apache Tomcat throws some heap space errors after 8 minutes

Requesting PNG instead of TIFF works better but is also a bit a game of luck.

Is there a better way to request and save this big sized images? The image size is given so I could request smaller images but would have to paste them together afterwards.

(I'm running a 1.7.x nightly build from last thursday with 1 GiB RAM assigned.)

Hum, let's do some back of the envelope calculation.
Each pixel of your image is going to require
4 bytes in memory while we do the rendering, so the uncompressed
in memory image we're drawing against is:
17000x12000x4/1024 -> 800MB (more or less)

If any of the vector layer uses more than one feature type style
inside the style, an extra back buffer will be allocated in memory
for each fts beyond the first one in the style (that is another 800MB
for each fts beyond the first inside your SLD).

Then there is the JAI tile cache, which will be used when loading
the shaded relief, and that by default is allowed the usage of
a portion of your heap... I guess 50%? That would mean only 500MB
would remain for the rest.

It is safe to lower that percentage to a smaller value, especially
if what you're doing is to use geoserver for one off image
geneartions instead of real web serving (where caching helps),
but I would still suggest to give geoserver more memory too.

Cheers
Andrea

PS: the Jai cache size is configured in config/server