Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an aerial image - almost 1.5 GB , GeoTIFF - and I have been trying to add it as a layer in GeoServer...

Adding the layer went successful, but the performance was very bad.

I tried to cache the layer using GeoWebCache, and the performance is still bad.

Any tips?

share|improve this question
up vote 12 down vote accepted

You need to tile the image and add overviews so that the whole image is never read into memory at the same time. GeoServer provides an image pyramid datastore for this purpose.

I wrote these notes describing how I set this up on my machine. The key step is to use GDAL to build the pyramid using the following command:

mkdir bmpyramid -v -r bilinear -levels 8 -ps 2048 2048 -co \
"TILED=YES" -targetDir bmpyramid \


  • -v: verbose output, allows the user to see each file creation scroll by, thus knowing progress is being made (a big pyramid construction can take hours)
  • -r bilinear: use bilinear interpolation when building the lower resolution levels. This is key to get good image quality without asking GeoServer to perform expensive interpolations in memory
  • -levels 8: the number of levels in the pyramid
  • -ps 2048 2048: each tile in the pyramid will be a 2048x2048 GeoTIFF
  • -co “TILED=YES”: each GeoTIFF tile in the pyramid will be inner tiled
  • (Not used here) -co “COMPRESS=JPEG”: each GeoTIFF tile in the pyramid will be JPEG compressed (trades small size for higher performance, try out it without this parameter too)
  • -targetDir bmpyramid: build the pyramid in the bmpyramid directory. The target directory must exist and be empty
  • bmreduced.tiff: the source file

Utility notes for

share|improve this answer
How can i get the (i'm running the geoserver under Windows XP) ? – Mathboy Mar 26 '12 at 8:23 and follow the quick install instructions – iant Mar 26 '12 at 8:38
Now i have a problem , i've created the tiles using tool , but i'm getting the following error from Geoserver while linking the layer with the tiles folder : Could not list layers for this store, an error occurred retrieving them: This plugin accepts only File, URL and String pointing to a file any suggestion? – Mathboy Mar 26 '12 at 9:05
@iant, is the slash in this piece -co \ "TILED=YES" just allowing the instruction to span a linebreak in the command window? – elrobis Mar 26 '12 at 14:25
Also, when using gdal_retile on Windows to process a high res, large-area raster, I recommend adding -useDirForEachRow. By default, retile puts all the tiles it creates in the same folder, and for large rasters, this creates a tremendous slowdown once it has about 350,000 tiles in the root folder. By contrast, -useDirForEachRow places the tiles for each row in their own folder below the tile root. This means a huge speed up on Windows. Before -useDirForEachRow a full-county image mosaic (6-inch) needed 2 months to run! After -useDir, the full process would complete overnight. – elrobis Mar 26 '12 at 14:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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