Raster tiling

Zenon Panoussis oracle at PROVOCATION.NET
Sat Jul 22 11:50:31 PDT 2006


Hello all

I am trying to cut an SRTM30 global raster into smaller tiles. Like
this, in grass 6.0.2:

g.region n=90 s=-60 w=-180 e=180 nsres=0.00833333 ewres=0.00833333
r.colors map=srtm30_full rules=srtm
for s in `seq 0 5 85`
do
  for w in `seq 0 5 175`
  do
    n=$(($s+5))
    e=$(($w+5))
    region="s=$s w=$w n=$n e=$e"
    reg="${n}n${s}s${w}w${e}e"
    g.region $region
    r.resample output=srtm30_$reg input=srtm30_full
    r.out.tiff -t -v in=srtm30_$reg out=srtm30_$reg
  done
done

The resulting tiles have the right size and geometry. When they are
overlayed in grass' own monitor with d.rast -o map=srtm30_$reg they
look like http://gis.fundiaperu.com/tmp/grass_out.png , that is,
perfectly alright.

I then run gdaltindex srtm30_idx.shp srtm30_*.tif on the output tiffs
and feed the .shp to mapserver. The result in mapserver looks like
http://gis.fundiaperu.com/tmp/mapsrv_out.png , not OK at all. The
colours keep shifting from one tile to another for no apparent reason.
The .map file is very simple:

  LAYER
    NAME "SRTM30"
    TYPE RASTER
    STATUS DEFAULT
#    PROCESSING "DITHER=YES"
    PROCESSING "SCALE=AUTO"
    TILEINDEX "srtm30_idx.shp"
  END

Does anyone understand what I'm doing wrong and/or how to get it right?

Z



More information about the MapServer-users mailing list