[Mapserver-users] FW: adding RASTER Layer

Charlton Purvis cpurvis at asg.sc.edu
Tue Jul 8 08:44:26 PDT 2003


This didn't seem to make the list.  Trying again.

-----Original Message-----
From: Brock Murch [mailto:bmurch at seas.marine.usf.edu] 
Sent: Tuesday, July 08, 2003 11:06 AM
To: mapserver-users at lists.gis.umn.edu; Charlton Purvis
Subject: Re: adding RASTER Layer

Charlton:

	Thanks for the try... does the list have any ideas? The error
definately has 
to do with the raster layer:

STATUS DEFAULT
error_log output:
> __START_LOG__
> [Tue Jul 08 09:31:49 2003] [error] [client 131.247.136.204] Premature
> end of
> script headers: mapserv, referer:
> http://www.imars.usf.edu/tutorial35/s2/s2ex3_test2.html
> __END_LOG__



> I cannot duplicate any of your errors that seem to be cropping up w/
> 4.0b.  Upgrading to that would require me to upgrade my gdal
libraries,
> and I'm not quite ready to take that plunge.  Wonder if that's it?
>
> Just for kicks, does running
> gdalinfo /var/www/html/tutorial35/data/raster/shdrlfi020g_ugl.tif
> give you back anything intelligible?

gdalinfo /var/www/html/tutorial35/data/raster/shdrlfi020g_ugl.tif
Driver: GTiff/GeoTIFF
Size is 2066, 1023
Coordinate System is `'
Origin = (-98.607616,49.868450)
Pixel Size = (0.009075,-0.009075)
Metadata:
  TIFFTAG_SOFTWARE=IMAGINE TIFF Support
Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved
@(#)$RCSfile: etif.c $ $Revision: 1.8 $ $Date: 2001/01/25 22:04:51Z $
Corner Coordinates:
Upper Left  ( -98.6076164,  49.8684504)
Lower Left  ( -98.6076164,  40.5847254)
Upper Right ( -79.8586664,  49.8684504)
Lower Right ( -79.8586664,  40.5847254)
Center      ( -89.2331414,  45.2265879)
Band 1 Block=2066x3 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
    0: 169,209,254,255
    1: 156,197,236,255
    2: 18,40,48,255
    3: 32,60,56,255
    4: 43,73,62,255
    5: 53,84,66,255
    6: 62,94,72,255
    7: 70,101,76,255
    8: 81,123,88,255
    9: 77,108,80,255
   10: 92,134,95,255
   11: 94,137,96,255
   12: 96,139,97,255
   13: 3,6,3,255
   14: 1,2,1,255
   15: 6,11,6,255
   16: 85,117,85,255
   17: 82,112,81,255
   18: 105,148,102,255
   19: 12,21,11,255
   20: 116,160,110,255
   21: 91,122,87,255
   22: 17,28,15,255
   23: 123,167,114,255
   24: 98,130,92,255
   25: 24,37,21,255
   26: 127,171,117,255
   27: 95,125,88,255
   28: 89,116,82,255
   29: 103,133,95,255
   30: 35,51,30,255
   31: 106,138,97,255
   32: 98,120,91,255
   33: 4,7,3,255
   34: 110,141,99,255
   35: 111,142,100,255
   36: 43,62,36,255
   37: 52,72,43,255
   38: 119,150,104,255
   39: 114,144,100,255
   40: 118,148,103,255
   41: 116,146,102,255
   42: 121,150,105,255
   43: 102,128,87,255
   44: 123,153,105,255
   45: 125,155,107,255
   46: 107,127,95,255
   47: 107,133,90,255
   48: 126,156,107,255
   49: 128,158,109,255
   50: 127,157,108,255
   51: 124,153,106,255
   52: 111,137,92,255
   53: 130,158,109,255
   54: 130,159,110,255
   55: 114,140,94,255
   56: 135,163,112,255
   57: 132,159,110,255
   58: 136,164,112,255
   59: 135,163,111,255
   60: 134,161,110,255
   61: 133,160,110,255
   62: 116,134,100,255
   63: 118,142,96,255
   64: 140,167,114,255
   65: 139,166,114,255
   66: 138,165,113,255
   67: 72,90,53,255
   68: 121,145,96,255
   69: 125,149,99,255
   70: 148,175,119,255
   71: 145,172,117,255
   72: 143,170,116,255
   73: 142,168,115,255
   74: 109,132,83,255
   75: 127,151,100,255
   76: 124,147,98,255
   77: 145,171,116,255
   78: 146,172,117,255
   79: 147,172,118,255
   80: 125,142,105,255
   81: 85,104,62,255
   82: 128,151,100,255
   83: 151,176,119,255
   84: 133,155,101,255
   85: 134,156,102,255
   86: 136,158,104,255
   87: 130,152,100,255
   88: 157,181,123,255
   89: 153,177,120,255
   90: 158,182,124,255
   91: 155,179,122,255
   92: 154,178,121,255
   93: 95,113,68,255
   94: 136,157,103,255
   95: 160,184,124,255
   96: 162,186,126,255
   97: 156,179,122,255
   98: 132,147,108,255
   99: 143,164,106,255
  100: 141,162,105,255
  101: 142,163,106,255
  102: 139,159,105,255
  103: 165,188,127,255
  104: 141,161,105,255
  105: 147,167,109,255
  106: 170,192,129,255
  107: 136,150,110,255
  108: 108,123,78,255
  109: 149,168,110,255
  110: 148,167,109,255
  111: 146,165,108,255
  112: 145,164,107,255
  113: 149,167,110,255
  114: 177,197,134,255
  115: 141,154,113,255
  116: 123,140,85,255
  117: 151,169,110,255
  118: 154,171,110,255
  119: 159,176,114,255
  120: 158,175,113,255
  121: 156,173,112,255
  122: 155,172,111,255
  123: 153,170,110,255
  124: 157,174,113,255
  125: 117,129,84,255
  126: 185,203,138,255
  127: 162,178,114,255
  128: 166,182,117,255
  129: 164,180,116,255
  130: 147,158,115,255
  131: 150,161,118,255
  132: 148,162,100,255
  133: 164,179,115,255
  134: 162,177,114,255
  135: 166,181,117,255
  136: 161,176,114,255
  137: 172,185,119,255
  138: 171,185,119,255
  139: 169,183,118,255
  140: 157,166,121,255
  141: 154,163,119,255
  142: 154,166,102,255
  143: 176,189,121,255
  144: 173,186,119,255
  145: 180,192,123,255
  146: 179,192,123,255
  147: 178,190,122,255
  148: 174,187,120,255
  149: 127,135,93,255
  150: 159,167,122,255
  151: 161,171,106,255
  152: 134,141,97,255
  153: 139,146,102,255
  154: 164,171,124,255
  155: 165,172,125,255
  156: 163,170,124,255
  157: 161,168,123,255
  158: 170,179,111,255
  159: 187,197,125,255
  160: 185,194,124,255
  161: 182,192,124,255
  162: 166,173,125,255
  163: 190,199,127,255
  164: 147,152,105,255
  165: 170,175,127,255
  166: 169,174,126,255
  167: 171,176,128,255
  168: 195,202,128,255
  169: 174,179,129,255
  170: 173,177,128,255
  171: 159,163,120,255
  172: 204,209,134,255
  173: 200,205,132,255
  174: 180,183,134,255
  175: 179,182,133,255
  176: 163,166,123,255
  177: 211,214,137,255
  178: 160,162,113,255
  179: 177,179,130,255
  180: 182,184,134,255
  181: 179,181,133,255
  182: 185,186,135,255
  183: 184,185,134,255
  184: 220,220,140,255
  185: 170,170,119,255
  186: 173,173,123,255
  187: 189,189,138,255
  188: 188,188,137,255
  189: 186,186,136,255
  190: 172,172,127,255
  191: 194,192,139,255
  192: 192,191,139,255
  193: 191,190,139,255
  194: 188,187,137,255
  195: 171,170,126,255
  196: 173,172,128,255
  197: 182,179,127,255
  198: 195,192,140,255
  199: 178,176,129,255
  200: 176,174,128,255
  201: 179,177,131,255
  202: 191,187,133,255
  203: 204,199,144,255
  204: 201,197,143,255
  205: 183,179,133,255
  206: 197,192,140,255
  207: 199,194,142,255
  208: 210,203,147,255
  209: 187,181,134,255
  210: 219,208,152,255
  211: 227,214,156,255
  212: 235,219,160,255
  213: 244,225,165,255
  214: 0,0,0,255
  215: 255,255,255,255
  216: 0,0,0,255
  217: 0,0,0,255
  218: 0,0,0,255
  219: 0,0,0,255
  220: 0,0,0,255
  221: 0,0,0,255
  222: 0,0,0,255
  223: 0,0,0,255
  224: 0,0,0,255
  225: 0,0,0,255
  226: 0,0,0,255
  227: 0,0,0,255
  228: 0,0,0,255
  229: 0,0,0,255
  230: 0,0,0,255
  231: 0,0,0,255
  232: 0,0,0,255
  233: 0,0,0,255
  234: 0,0,0,255
  235: 0,0,0,255
  236: 0,0,0,255
  237: 0,0,0,255
  238: 0,0,0,255
  239: 0,0,0,255
  240: 0,0,0,255
  241: 0,0,0,255
  242: 0,0,0,255
  243: 0,0,0,255
  244: 0,0,0,255
  245: 0,0,0,255
  246: 0,0,0,255
  247: 0,0,0,255
  248: 0,0,0,255
  249: 0,0,0,255
  250: 0,0,0,255
  251: 0,0,0,255
  252: 0,0,0,255
  253: 0,0,0,255
  254: 0,0,0,255
  255: 0,0,0,255


> Also, have you tried removing all but the raster layer from your .map?
>

removed everthing but the raster layer no effect...

> suggest you forward it to the list, and
> I'm sure you'll get some folks to bite.

> From: Brock Murch [mailto:bmurch at seas.marine.usf.edu]
> Sent: Tuesday, July 08, 2003 9:30 AM
> To: Charlton Purvis
> Subject: Re: adding RASTER Layer
>
> Charlton:
> 	Actually that can't be it. Although I did try it earlier as this
> was
> suggested in a follow-up thread to my post to the list. See the
> following...
> with the relevant changes to the map file.
>
> This is using mapserv_4.0b
>
> http://www.imars.usf.edu/tutorial35/s2/s2ex3_test2.html
> LAYER # Shaded Relief Raster
>   NAME "relief"
>   DATA "/var/www/html/tutorial35/data/raster/shdrlfi020g_ugl.tif"
>   STATUS DEFAULT
> # STATUS ON
>   TYPE RASTER
> # OFFSITE 0
> END
>
> When I access the above webpage, I get this in the error_log:
> __START_LOG__
> [Tue Jul 08 09:31:49 2003] [error] [client 131.247.136.204] Premature
> end of
> script headers: mapserv, referer:
> http://www.imars.usf.edu/tutorial35/s2/s2ex3_test2.html
> __END_LOG__
>
> http://www.imars.usf.edu/tutorial35/s2/s2ex3_test3.html
> LAYER # Shaded Relief Raster
>   NAME "relief"
>   DATA "/var/www/html/tutorial35/data/raster/shdrlfi020g_ugl.tif"
> # STATUS DEFAULT
> # STATUS ON
>   TYPE RASTER
> # OFFSITE 0
> END
> No error in the error_log
>
> http://www.imars.usf.edu/tutorial35/s2/s2ex3_test4.html
> LAYER # Shaded Relief Raster
>   NAME "relief"
>   DATA "/var/www/html/tutorial35/data/raster/shdrlfi020g_ugl.tif"
> # STATUS DEFAULT
>   STATUS ON
>   TYPE RASTER
> # OFFSITE 0
> END
> No error in the error_log
>
> Using mapserv_3.6.5 with the same map files as used above:
>
> http://www.imars.usf.edu/tutorial35/s2/s2ex3_test2_3.6.5.html
> http://www.imars.usf.edu/tutorial35/s2/s2ex3_test3_3.6.5.html
> http://www.imars.usf.edu/tutorial35/s2/s2ex3_test4_3.6.5.html
>
> As you can see this time with STATUS DEFAULT works in 3.6.5
> (s2ex3_test2_3.6.5.html). This was the only change to the map files.
> Both
> versions of mapserv were compiled against the same libs with the exact
> same
> script:
>
> #!/bin/bash
>
> CC=gcc \
> CFLAGS="-O3 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse" \
> CXX=g++ \
> CXXFLAGS="-O3 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse" \
> ./configure \
> 	-v \
> 	--with-jpeg=/usr/local/hdf \
> 	--with-gd=/usr/local/tmp/gd-2.0.15 \
> 	--with-freetype=/usr/bin/freetype-config \
> 	--with-libz=/usr/local/hdf \
> 	--with-png \
> 	--with-pdf \
> 	--with-tiff=/usr/local/tmp/tiff-v3.6.0-beta2/libtiff/ \
> 	--with-proj=/usr/local/tmp/proj-4.4.7 \
> 	--with-gdal=/usr/local/bin/gdal-config \
> 	--with-ogr \
> 	--with-postgis \
> 	--with-wfs \
> 	--with-wmsclient \
> 	--with-wfsclient \
> 	--enable-debug
>
> On the bright side, I was able to use the ersi shapefiles in the
> following
> link along with our data with mapserv 3.6.5:
>
> http://www.imars.usf.edu/tutorial35/s1/s1ex1_test4.html
>
> Do you think this is a bug? Any ideas would be appreciated.
>
> Brock
>
> On Monday 07 July 2003 1:53 pm, you wrote:
> > Brother Brock:
> >
> > It's always the obvious right under our noses that evades us!  Look
at
> > the OFFSITE directive in your .map.  In 3.7+ it needs THREE values!
I
> > don't use the OFFSITE functionality (yet), so I didn't pick it up
>
> until
>
> > now.
> >
> > So go back into the .map, and put
> > OFFSITE 0 0 0
> > You're 3.7+ (or 4.0 -- I haven't installed it yet) should be good to
>
> go.
>
> > Here is the latest .map file reference.  It's my Bible, Part II.
> > http://mapserver.gis.umn.edu/doc/mapfile-reference.html
> >
> > Also, when you get down and dirty w/ MapScript, ALWAYS rely on the
> > documentation bundled w/ whatever source you download to build it.
> > Online UMN stuff is NOT reliable.
> >
> > Cache dir stuff.  I borrowed this cron script from somewhere that
does
> > the job.  I do not believe MapServer has a limit to the amount it
will
> > write to the cache, so it's up to us good admins to clean up
> > periodically.
> >
> > #! /bin/sh
> > #
> > # MapServer temporary file cleanup - run daily by cron
> > #
> > # Flush all files from /tmp/ms_tmp older than 6 hours (360 minutes)
> > #
> > find /tmp/ms_tmp -name "*.*" -amin +360 -exec rm -f {} \;
> > exit 0
> >
> > -----Original Message-----
> > From: Brock Murch [mailto:bmurch at seas.marine.usf.edu]
> > Sent: Monday, July 07, 2003 1:25 PM
> > To: Charlton Purvis
> > Subject: Re: adding RASTER Layer
> >
> > Charlton:
> > 	Did what you did ... and d/l'ed 3.6.5 ... used my same
> > configure_it.sh to get
> > the same build:
> > #!/bin/bash
> >
> > CC=gcc \
> > CFLAGS="-O3 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse" \
> > CXX=g++ \
> > CXXFLAGS="-O3 -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse" \
> > ./configure \
> > 	-v \
> > 	--with-jpeg=/usr/local/hdf \
> > 	--with-gd=/usr/local/tmp/gd-2.0.15 \
> > 	--with-freetype=/usr/bin/freetype-config \
> > 	--with-libz=/usr/local/hdf \
> > 	--with-png \
> > 	--with-pdf \
> > 	--with-tiff=/usr/local/tmp/tiff-v3.6.0-beta2/libtiff/ \
> > 	--with-proj=/usr/local/tmp/proj-4.4.7 \
> > 	--with-gdal=/usr/local/bin/gdal-config \
> > 	--with-ogr \
> > 	--with-postgis \
> > 	--with-wfs \
> > 	--with-wmsclient \
> > 	--with-wfsclient \
> > 	--enable-debug
> >
> > Then did the tests and it appears to work fine so long as
> >
> >  STATUS DEFAULT
> >
> > and not
> >
> >   #    STATUS ON
> >
> > So it would seem that the status keyword is the issue in 4.0B
> >
> > See:
> > http://www.imars.usf.edu/tutorial35/s1/s1ex1_test4.html
> >
> > and
> >
> > http://www.imars.usf.edu/tutorial35/s2/s2ex3_test1.html
> >
> >
> > What one can do bout this is ???
> >
> > Where is the best place to really get a feel for all the tags in the
>
> map
>
> > file
> > and what they mean?
> >
> > Also curious, as in a previous post. If you are using a cache dir,
how
> > much
> > will be written there and what cleans it up?





More information about the MapServer-users mailing list