[mapserver-users] How to tile a large TIF image?

Doug_Newcomb at fws.gov Doug_Newcomb at fws.gov
Mon Apr 21 08:48:19 EDT 2008


Tormod,

>I'm also looking for a complete example on how to split large rasters
>1-5GB ECW and RIK's into tif tiles (10k x 10k px). Large files are
>usually not favored by filesystem cache.


      Use gdal_translate, http://www.gdal.org/gdal_translate.html, to chop
up your ECW files and output your parts as tiff.  I'd suggest using python
to get the extent and pixel size ( in projection coordinates) of each image
and have gdal_translate grab a 10k X 10k chunk starting at the lower left
corner of the image, incrementing the x coordinate by (10k * number of
units per pixel) as you work left to right.  After you finish that row,
start back at the origin x coordinate and increment the y coordinate by
(10k * number of units per pixel).  Rinse and repeat until you finish the
whole image.

      It might be worthwhile to implement a bit of overlap ( 10-15 pixels)
in the x and y direction as you chop.

Doug



Doug Newcomb
USFWS
Raleigh, NC
919-856-4520 ext. 14 doug_newcomb at fws.gov
---------------------------------------------------------------------------------------------------------

The opinions I express are my own and are not representative of the
official policy of the U.S.Fish and Wildlife Service or Dept. of Interior.
Life is too short for undocumented, proprietary data formats.


                                                                           
             Tormod Brunsby                                                
             <bytex at o2.no>                                                 
             Sent by:                                                   To 
             mapserver-users-b         mapserver-users at lists.osgeo.org     
             ounces at lists.osge                                          cc 
             o.org                                                         
                                                                   Subject 
                                       Re: [mapserver-users] How to tile a 
             04/21/2008 07:46          large TIF image?                    
             AM                                                            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




> Dejan -
>
> I NEVER say "always"...
>
> But no, I do not think one could state that one approach (a single TIFF
with
> overviews vs. multiple TIFFs at different resolutions) is ALWAYS better
than
> the other.  There are a number of factors involved, some of which depend
on
> your filesystem and disk hardware characteristics.
>
Still no good examples on how to do this i see.

I'm also looking for a complete example on how to split large rasters
1-5GB ECW and RIK's into tif tiles (10k x 10k px). Large files are
usually not favored by filesystem cache.

--
Tormod

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list