[Mapserver-users] Rasterization help, TIF->SHP

poff poff at sixbit.org
Mon Jun 23 10:55:11 PDT 2003


Hello,

I'm slightly new to this, but I tried following the instructions in the 
documentation, and I am getting a 236 byte shp file from a 20something mb 
tiff.

I will post my steps so you can perhaps tell me where I'm going wrong?

I'm using mapscript and apache on win2k.

################################
Tif file converted to 8bit uncompressed, 8192x4096, 32mb.

(if I view with ACDSee it states 256 colours, then in "properties" it 
states 24 bit - by eye you can see it's 256 colour)

Wld file made:

0.0439453125
0
0
-0.0439453125
-180
+90

With the map file:

NAME WORLD_MAP
EXTENT -180 -90 180 90
SIZE 600 300
IMAGETYPE GIF
IMAGECOLOR 0 0 128
SHAPEPATH "data"
#FONTSET "d:/www/htdocs/data/symbols/fontset.txt"
#SYMBOLSET "data/symbols/examples.sym"
UNITS DD

WEB
  IMAGEPATH "d:/www/htdocs/imgtmp/"
  IMAGEURL  "/imgtmp/"
END

LAYER # Countries
  NAME "countries"
  DATA "test"
  STATUS DEFAULT
  TYPE polygon
  CLASS
    COLOR 220 220 220
  END # end of class object

END # end of layer object

END # end of map file

Ran:

gdaltindex test.shp test.tif

Generates a 236 byte shpfile, which gives a blank map (coloured) on output 
with:

<?

$oMap = ms_newMapObj("test.map", "d:/www/htdocs/");
$oImage = $oMap->draw();

$url = $oImage->saveWebImage(MS_GIF,0,0,0);
printf("<IMG SRC=%s WIDTH=%d HEIGHT=%d>\n", $url, $oMap->width, 
$oMap->height);

?>

Anyone got any ideas what's going wrong? I'm pretty sure something is wrong 
with gdaltindex, shouldn't the shp file be a lot bigger?

I'd be very thankful for any light shed on this!

-- 
poff at sixbit.org
SDF Public Access UNIX System - http://sdf.lonestar.org



More information about the MapServer-users mailing list