Splitting/tiling a raster - gdaladdo - [Summary]

Stefan Schwarzer stefan.schwarzer at GRID.UNEP.CH
Wed Jul 13 05:24:54 EDT 2005


Well, this was very useful. Just for the records (and other users  
with similar questions):

1) I used a 200 MB JPEG image for building the overviews as indicated  
below by Bart.

2) gdaladdo -r average xxx.jpg 2 4 8 16

(Small error message here. But still it worked its way through.
ERROR 6: The JPEG driver does not support update access to existing  
datasets.
Corrupt JPEG data: 14964 extraneous bytes before marker 0xed
0...10...20...30...40...50...60...70...80...90...100 - done.)

3) An additional file with the extension xxx.jpg.ovr was created.

4) This file name should appear in the map file for that specific layer.

5) The total extent display is really fast. And the zooms are being  
generated very quickly too.

6) Nice, really nice. Thanks a lot...



> You can build overviews with gdaladdo:
>
> http://www.gdal.org/gdal_utilities.html#gdaladdo
>
> Eg:
>
> gdaladdo -r average abc.tif 2 4 8 16
>
> Try that first I would say.
>
> Best regards,
> Bart
>
> Bart van den Eijnden
> Syncera IT Solutions
> Postbus 270
> 2600 AG  DELFT
>
> tel.nr.: 015-7512436
> email: BEN at Syncera-ITSolutions.nl
>
>
>>>> Stefan Schwarzer <stefan.schwarzer at GRID.UNEP.CH> 07/12/05  
>>>> 12:02pm >>>
>>>>
>
>
>> Which format is your raster currently in?
>>
>
> TIF or JPEG
>
>
>>
>> If it is performance, building overviews could also help for
>> certain situations.
>>
>
> So, how can I build overviews then?
>
>
>>
>> At which scales do you display your raster? Also at full extent?
>>
>
>  From full extent (at the beginning - a couple of hundreds km wide)
> to then, when zooming, a couple of km wide.
>
>
>>
>> Best regards,
>> Bart
>>
>> Bart van den Eijnden
>> Syncera IT Solutions
>> Postbus 270
>> 2600 AG  DELFT
>>
>> tel.nr.: 015-7512436
>> email: BEN at Syncera-ITSolutions.nl
>>
>>
>>
>>>>> Stefan Schwarzer <stefan.schwarzer at GRID.UNEP.CH> 07/12/05
>>>>> 11:55am >>>
>>>>>
>>>>>
>> Thanks Bart for the quick response,
>>
>> aehh, yes, performance. But perhaps there is no need to split it up?
>> Is it that what you mean? Gush, somehow I don't really get it how
>> this tiling works, stupid me....
>>
>> Stef
>>
>>
>>
>>
>>> Hi Stefan,
>>>
>>> since gdal_translate has the option to select a subwindow (srcwin)
>>> from your sourcefile, you can use it to split your raster file into
>>> subimages.
>>>
>>> http://www.gdal.org/gdal_utilities.html#gdal_translate
>>>
>>> After that, you do use gdaltindex to create a tileindex. That part
>>> is described in the raster howto:
>>>
>>> http://mapserver.gis.umn.edu/doc44/raster-howto.html
>>>
>>> Btw, what is the exact reason you want to split up your raster?
>>> Performance?
>>>
>>> Best regards,
>>> Bart
>>>
>>> Bart van den Eijnden
>>> Syncera IT Solutions
>>> Postbus 270
>>> 2600 AG  DELFT
>>>
>>> tel.nr.: 015-7512436
>>> email: BEN at Syncera-ITSolutions.nl
>>>
>>>
>>>
>>>
>>>>>> Stefan Schwarzer <stefan.schwarzer at GRID.UNEP.CH> 07/12/05
>>>>>> 11:39am >>>
>>>>>>
>>>>>>
>>>>>>
>>> Hi,
>>>
>>> this subject is really not new. But I haven't found any real how-to
>>> for the whole story. Perhaps somebody could clarify the steps  
>>> needed.
>>> when starting with an image of some larger size and when ending with
>>> a tiled raster. Cause I guess that' what has to be done.
>>> - At least I have now one single big raster. As far as I  
>>> understood I
>>> need to split the big image into smaller ones. But how?
>>> - And then I can use gdaltindex to build the shapefile to define the
>>> tiles. Right?
>>>
>>> Thanks for clarification.
>>>
>>>
>>>
>>
>>
>



More information about the mapserver-users mailing list