I have a bunch of large, high resolution GeoTIFFs, that I am serving using GeoServer. I also have a prototype client I wrote using Leaflet. The resolution of the TIFFs is quite high, but despite that I get unpleasant, low resolution imagery on my client and also on the layer previews using the GeoServer interface.

The GeoTIFFs are stored as an Image Mosaic; I then created a Layer from it and then seeded the tiles using the GeoWebCache interface.

In my Javascript client I use this code to add the layer to my map:

app.currentTileLayer = L.tileLayer.wms('http://mygeoserver:8080/geoserver/wms', {
            layers: 'myworkspace:layer-name',
            format: 'image/png',
            version: '1.1.1',
            transparent: true,
            tiled: true,
            attribution: '© Myself',

I get the layer all right, but, as mentioned above, it is very low resolution - pixelated is the word I'd use. Also, despite the tile caching, it takes such a very long time to actually get the tiles.

Obviously I must have set some options incorrectly. What could I check?

Edit: I'll copy here an edited version of one of the tile requests from Firebug: http://myserver:8080/geoserver/wms?SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.1&LAYERS=myworkspace%3Alayer-name&STYLES=&FORMAT=image%2Fpng&TRANSPARENT=true&HEIGHT=256&WIDTH=256&TILED=true&SRS=EPSG%3A3857&BBOX={coordinates}

Edit 2: I posted screenshots of a part of an original TIFF and of the rendering on the browser at http://imgur.com/gallery/0H08m/new .

  • can you show us an example of the input and output, what request you have made, how you configured the mosaic to start with. Also do you have native JAI installed
    – Ian Turton
    Commented Feb 26, 2015 at 14:25
  • @iant : I added some extra information - input and output images, the request - to the original post. JAI is installed. The only things to configure for the image mosaic are the location - a file:// URL to the directory with the TIFFs - and a checkbox to enable it, which is checked.
    – Btz
    Commented Feb 26, 2015 at 16:29
  • Original tiffs in image mosaic does not guarantee that result is fast. Keywords are: internal tiling in tiffs and having overviews (pyramid layers). Some good hints are in slideshare.net/geosolutions/geoserver-on-steroids.
    – user30184
    Commented Mar 3, 2015 at 6:45

1 Answer 1


I think this guide will help you. It shows you how to turn a large geotiff into map tiles for use with leaflet.

  • Finally got around trying this. First thing I got - this message: gdal2tiles.py: error: Processing of several input files is not supported. Please first use a tool like gdal_vrtmerge.py or gdal_merge.py on the files. This unfortunately is not viable for me, I have too many files that are way too large to merge in a single manageable one.
    – Btz
    Commented Mar 11, 2015 at 16:37
  • Sorry, I'm not sure what to tell you. I don't know how those merging tools work and don't know of a solution that would merge and then tile things for you.
    – pk.
    Commented Mar 11, 2015 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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