<br><font size=2 face="sans-serif">Paul,</font>
<br>
<br><font size=2 face="sans-serif">I am just interested in one thing:</font>
<br>
<br><font size=2 face="sans-serif">If you say &quot;breaking&quot; a single
tiff file with &quot;TILED=YES&quot; is equivalent to breaking into individual
files and using tileindex - does it mean it is ALWAYS better to create
a single file with &quot;internal&quot; tiling than create many files and
using tileindex? I suppose the answer is NO, but I would very like to know
why?</font>
<br>
<br><font size=2 face="sans-serif">For example, if you need to display
a region that covers several &quot;blocks&quot;, then in the first case
you open just one file, in the second you open several files. So the first
method has less overhead right? What are the opposite situations then?</font>
<br>
<br><font size=2 face="sans-serif">thanks very much</font>
<br>
<br><font size=2 face="sans-serif">regards, dejan</font>
<br>
<br><tt><font size=2>mapserver-users-bounces@lists.osgeo.org wrote on 18.04.2008
13:11:47:<br>
<br>
&gt; Stefan,<br>
&gt; <br>
&gt; I don't think you can specify 10'', you need something in pixels.
&nbsp;But &nbsp;<br>
&gt; the command is also probably not what you really need to do.<br>
&gt; <br>
&gt; More likely, you should be doing the following:<br>
&gt; <br>
&gt; gdal_translate -co &quot;TILED=YES&quot; gebco/bathymetry.tif gebco/
<br>
&gt; bathmetry_tiled.tif<br>
&gt; <br>
&gt; This will create a single tif file that has an internal block size
of &nbsp;<br>
&gt; 256x256 - you can think of this as having broken your tif up into
&nbsp;<br>
&gt; 256x256 tiles but keeps them all within the same file. &nbsp;This
is &nbsp;<br>
&gt; equivalent to breaking the tif up into individual files, creating
a &nbsp;<br>
&gt; shapefile that has rectangles for each individual files' extent, and
&nbsp;<br>
&gt; using that as a tile index in mapserver.<br>
&gt; <br>
&gt; Next, you want to do this:<br>
&gt; <br>
&gt; gdaladdo gebco/bathymetry.tif 2 4 6 8 16<br>
&gt; <br>
&gt; this will pre-compute smaller versions of the tif image called &nbsp;<br>
&gt; overviews at 1/2, 1/4 1/6 1/8 and 1/16 of the original size of the
tif &nbsp;<br>
&gt; - this makes it much more efficient for gdal to return exactly what
&nbsp;<br>
&gt; mapserver is asking for at any given scale. &nbsp;Depending on the
range of &nbsp;<br>
&gt; scales that you need to display your raster image at, you can add
more &nbsp;<br>
&gt; overview levels (or take some away).<br>
&gt; <br>
&gt; With this two commands, you can make your rasters much more efficient
&nbsp;<br>
&gt; for mapserver and probably avoid the need to split them up into many
&nbsp;<br>
&gt; files.<br>
&gt; <br>
&gt; It does make the file somewhat larger. &nbsp;If you are working with
very &nbsp;<br>
&gt; large files ( &gt; 4GB ) then you may run into some problems with
tiff &nbsp;<br>
&gt; and may need to investigate another format or a compressed format
like &nbsp;<br>
&gt; ECW or MrSID (both requiring commercial licenses I believe).<br>
&gt; <br>
&gt; There are also some built in compression schemes for tiffs in gdal
&nbsp;<br>
&gt; which you can apply when running gdal_translate (see http://www.<br>
&gt; gdal.org/frmt_gtiff.html <br>
&gt; &nbsp; for creation options), for instance:<br>
&gt; <br>
&gt; gdal_translate -co &quot;TILED=YES&quot; -co &quot;COMPRESS=JPEG&quot;
-co &nbsp;<br>
&gt; &quot;JPEG_QUALITY=80&quot; gebco/bathymetry.tif gebco/bathmetry_tiled.tif<br>
&gt; <br>
&gt; would compress the tif using JPEG compression (lossy) set to 80% (low
&nbsp;<br>
&gt; compression, small loss).<br>
&gt; <br>
&gt; Cheers<br>
&gt; <br>
&gt; Paul<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; On 18-Apr-08, at 5:47 AM, Stefan Schwarzer wrote:<br>
&gt; &gt; Thanks for the info.<br>
&gt; &gt;<br>
&gt; &gt; Did it like this:<br>
&gt; &gt;<br>
&gt; &gt; Library/Frameworks/GDAL.framework/Versions/1.5/Programs/ <br>
&gt; &gt; gdal_translate -outsize 10'' 10'' -co TILED=YES gebco/bathymetry.tif
&nbsp;<br>
&gt; &gt; gebco/bathymetry_tiled.tif<br>
&gt; &gt;<br>
&gt; &gt; But get the message: &quot;Segmentation fault&quot;<br>
&gt; &gt;<br>
&gt; &gt; Anything that I did wrong? Or should do differently?<br>
&gt; &gt;<br>
&gt; &gt; Thanks for a hint,<br>
&gt; &gt;<br>
&gt; &gt; Stef<br>
&gt; &gt;<br>
&gt; &gt;&gt; Hi,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Gdal_translate program has options for you:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; c:\FWTools&gt;gdal_translate<br>
&gt; &gt;&gt; Usage: gdal_translate [--help-general]<br>
&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;[-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/<br>
&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CInt16/CInt32/CFloat32/CFloat64}]
[-strict]<br>
&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;[-of format] [-b band] [-outsize
xsize[%] ysize[%]]<br>
&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;[-scale [src_min src_max [dst_min
dst_max]]]<br>
&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;[-srcwin xoff yoff xsize ysize]
[-projwin ulx uly lrx lry]<br>
&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;[-a_srs srs_def] [-a_ullr ulx
uly lrx lry] [-a_nodata value]<br>
&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;[-gcp pixel line easting northing
[elevation]]*<br>
&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;[-mo &quot;META-TAG=VALUE&quot;]*
[-quiet] [-sds]<br>
&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;[-co &quot;NAME=VALUE&quot;]*<br>
&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp;src_dataset dst_dataset<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; By playing with -srcwin or possibly with -outsize and -projwin
you &nbsp;<br>
&gt; &gt;&gt; should be able to split your image as you wish. &nbsp;Read
more from<br>
&gt; &gt;&gt; http://gdal.org/gdal_translate.html<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; -Jukka Rahkonen-<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Lähettäjä: mapserver-users-bounces@lists.osgeo.org [mailto:<br>
&gt; mapserver-users-bounces@lists.osgeo.org <br>
&gt; &gt;&gt; ] Puolesta Stefan Schwarzer<br>
&gt; &gt;&gt; Lähetetty: 18. huhtikuuta 2008 12:05<br>
&gt; &gt;&gt; Vastaanottaja: mapserver-users@lists.osgeo.org<br>
&gt; &gt;&gt; Aihe: [mapserver-users] How to tile a large TIF image?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Hi there,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I would like to use instead of single large tif image smaller
&nbsp;<br>
&gt; &gt;&gt; tiles. Although I am well aware of mapserver's and gdal's
&nbsp;<br>
&gt; &gt;&gt; possibilities to create the shapes for it, I first need to
&quot;split&quot; &nbsp;<br>
&gt; &gt;&gt; the large tif into 20 or 50 or 100 tiles.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Can anyone give me a hint with what kind of software this
is &nbsp;<br>
&gt; &gt;&gt; possible?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; There is an ArcGIS script, but it doesn't work on my machine
( <br>
&gt; http://arcscripts.esri.com/details.asp?dbid=13978 <br>
&gt; &gt;&gt; &nbsp;).<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Thanks for any hints,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Stef<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &nbsp;____________________________________________________________________<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &nbsp; Stefan Schwarzer<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &nbsp; Lean Back and Relax - Enjoy some Nature Photography<br>
&gt; &gt;&gt; &nbsp; http://photoblog.la-famille-schwarzer.de<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &nbsp; Appetite for Global Data? UNEP GEO Data Portal:<br>
&gt; &gt;&gt; &nbsp; http://geodata.grid.unep.ch<br>
&gt; &gt;&gt; &nbsp; &nbsp;<br>
&gt; &gt;&gt; ____________________________________________________________________<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; mapserver-users mailing list<br>
&gt; &gt; mapserver-users@lists.osgeo.org<br>
&gt; &gt; http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
&gt; <br>
&gt; <br>
&gt; __________________________________________<br>
&gt; <br>
&gt; &nbsp; &nbsp; Paul Spencer<br>
&gt; &nbsp; &nbsp; Chief Technology Officer<br>
&gt; &nbsp; &nbsp; DM Solutions Group Inc<br>
&gt; &nbsp; &nbsp; http://www.dmsolutions.ca/<br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; mapserver-users mailing list<br>
&gt; mapserver-users@lists.osgeo.org<br>
&gt; http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>
</font></tt>