[Mapserver-users] Problems: msQueryByPoint, Premature end of script headers

Gerry Creager gerry.creager at tamu.edu
Thu Aug 21 15:09:48 PDT 2003


This is a multi-part message in MIME format.
--------------000000050306070703000506
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

MS 3.7beta (I'll upgrade asap after the demo next Wed!  Really!)
RedHat 9
[root at mesonet ~]# /var/www/cgi-bin/mapserv -v
MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=PDF OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=GD2_RGB INPUT=OGR 
INPUT=GDAL INPUT=SHAPEFILE


Mapfile's attached in case that helps.  I'm at a loss...

THanks, Gerry
-- 
Gerry Creager -- gerry.creager at tamu.edu
Texas Mesonet -- AATLT, Texas A&M University	
Cell: 979.229.5301 Office: 979.458.4020
FAX:  979.847.8578 Pager:  979.228.0173
Office: 903A Eller Bldg, TAMU, College Station, TX 77843

--------------000000050306070703000506
Content-Type: text/plain;
 name="mesonet.map"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mesonet.map"

### This map file is used to control the Texas Mesonet Mapserver
########################################################################
###
###	Luke Wallace, Fall 2002 	(Thanks, Luke!)
###
########################################################################
###	Change Log
###
###	2003-07-13:	Changed Layer 'buffer' to reduce number of 
###			overlapping points and enhance readability
###			
###
########################################################################


NAME TxMeso
STATUS ON
SIZE 700 700
#SIZE 650 650
#EXTENT 388107.634400379 5203120.88405952 500896.339019834 5310243.30613897
EXTENT -106.8 25.8 -93.52 36.4
UNITS DD
SHAPEPATH "/var/www/mesonet/texas/data"
IMAGECOLOR 255 255 255
FONTSET "fonts.list"
SYMBOLSET "symbols.sym"

# you may need to change this to match your MapServer build
IMAGETYPE PNG

#
# Projection definition, consult the PROJ.4 documentation for parameter discussion
#
#PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
#END

#PROJECTION 	
#	proj=latlong
#	ellps=GRS80
#	datum=NAD83
#END

PROJECTION
#  "proj=utm"
#  "ellps=GRS80"
#  "zone=15"
#  "north"
#  "no_defs"
#
#  OR: 
#
#  "init=epsg:4267"	#nad 27 lat/long unprojected
	"init=epsg:32039"	#Texas Central LCC NAD83
END
#PROJECTION
#	"proj=longlat"
#	"ellps=clrk66"
#	"no_defs"
#	"no_defs"
#END

#
# Start of web interface definition (including WMS enabling metadata)
#
WEB
#  HEADER mesonet_header.html
  TEMPLATE "mesonet1.html"
  FOOTER mesonet_footer.html
#  ERROR "../index.php"
  MINSCALE    50000
  MAXSCALE 50000000
  IMAGEPATH "/var/www/mesonet/tmp"
  IMAGEURL "/var/www/mesonet/tmp"
  METADATA
    WMS_TITLE "MapServer Texas"
    WMS_ABSTRACT "Realtime Weather Interface"
    WMS_ACCESSCONSTRAINTS none

    # change this value to match your setup
    WMS_ONLINERESOURCE "http://mesonet.tamu.edu/index.php"

    WMS_SRS "EPSG:32039"
  END
END

#QUERYMAP
#  SIZE 200 200
#  STATUS ON
#  STYLE HILITE
#  COLOR 255 0 0
#END

#
# Start of scalebar
#
SCALEBAR 
  IMAGECOLOR 255 255 255
  LABEL
    COLOR 255 255 255
    SIZE tiny    
  END
  STYLE 1
  SIZE 150 4
  COLOR 255 255 255
#  UNITS MILES
  UNITS kilometers
  INTERVALS 4
  TRANSPARENT TRUE
  STATUS TRUE
END

#
# Legend
#
LEGEND
 STATUS ON
 IMAGECOLOR 255 255 255
 POSTLABELCACHE ON
END

#
# Start of symbol definitions (we're only using a few)
#
SYMBOL
  NAME 'circle'
  TYPE ELLIPSE
  POINTS 5 5 END
  FILLED FALSE
END
SYMBOL
  NAME 'pwvcircle'
  TYPE ELLIPSE
  FILLED TRUE
  POINTS 5 5 END
END

#
# Start of layer definitions
#

LAYER
SIZEUNITS pixels
  NAME rain
  TYPE line
  DATA rain_dd
  STATUS false
  CLASS
    NAME 'Rainfall Contours'
    COLOR 25 20 200
  END  # CLASS
END  # LAYER

# Roads
LAYER
SIZEUNITS pixels
PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
	"init=epsg:32039"
END


  NAME roads
  TYPE line
  DATA usdotrds
  STATUS false
  CLASS
    NAME 'Roads'
    COLOR 0 0 0
  END
END  # LAYER

# Lakes and Rivers
LAYER
SIZEUNITS pixels
#PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
#END
  NAME rivers
  TYPE polygon
  DATA hydgen
  STATUS false
  CLASS
    NAME 'Lakes & Rivers'
    TEMPLATE "lakes.html"
    COLOR 100 125 225

  END

  HEADER "lakes_header.html"
  FOOTER "lakes_footer.html"
  
  TOLERANCE 3

END  # LAYER

# Radar Layer
LAYER
NAME radar
SIZEUNITS pixels
PROJECTION
	"proj=longlat"
#		"proj=lcc"
#		"ellps=GRS80"
#		"lon_0=100w"
#		"lat_1=27.416n"
#		"lat_2=34.916n"
END
  DATA "tmp/radar-00.gif"
  TYPE RASTER
  OFFSITE 0 0 0
  STATUS ON
  CLASS
    NAME 'Current RADAR'
#    TEMPLATE "radar.html"
  END
END # LAYER

# Layer for County Boundaries
LAYER
SIZEUNITS pixels
PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
	"init=epsg:32039"
END

  NAME border
  TYPE POLYGON
  DATA /var/www/mesonet/texas/data/counties.shp
  STATUS DEFAULT
  LABELITEM "name"
  CLASSITEM "name"
#  LABELMAXSCALE 2000000
#  LABELMINSCALE 50000
  LABELMAXSCALE 1000
  CLASS
    #NAME 'County Boundaries'
    EXPRESSION /./
    OUTLINECOLOR 181 181 145
    LABEL
      COLOR 0 0 0
      SHADOWCOLOR 218 218 218
      SHADOWSIZE 2 2
      TYPE BITMAP
      SIZE MEDIUM
      POSITION CC
      PARTIALS FALSE
      BUFFER -5
    END
  END
END

#Airport Layer
LAYER
SIZEUNITS pixels
#PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
#END

  NAME airports
  TYPE POINT
#  DATA txairports_dd # old data file
  DATA ARPT
  STATUS OFF
  CLASS
    NAME 'Airports'
    COLOR 128 255 164
    SYMBOL 'circle'
    SIZE 7
    TEMPLATE "airports.html"
  END

  HEADER "airports_header.html"
  FOOTER "airports_footer.html"
  
END
#
# Start of Weather layers definitions
#

#
# Metar Points (Query-able)
#  <!-- Color, size changed 2003 03 23 gc  -->
#  <!-- This way, if there's no wind, and the site's clear, it looks like it -->
LAYER
SIZEUNITS pixels
#SIZEUNITS kilometers
PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
	"init=epsg:32039"
END
  NAME weather-metar
#  STATUS DEFAULT
#  STATUS off	###Changed 2003-07-13
  TYPE POINT
  DATA currentWeather
  STATUS ON
  LABELCACHE OFF
#  TOLERANCE 3
  TOLERANCE 15		#Changed 2003-07-13 gc
  CLASS
    NAME 'Weather Sites'
#    COLOR 100 200 164
    COLOR 0 0 0
    SYMBOL 'circle'
#    SIZE 7
    SIZE 8
    TEMPLATE "weather_refresh.html"
  END
END
#
# PWV values
#
LAYER
SIZEUNITS pixels
#PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
#	"init=epsg:32039"
#END
  CLASSITEM "pwv"
  NAME weather-pwv
  TYPE POINT
  DATA currentWeather  
#DATA currentPWV
  STATUS ON
  LABELCACHE ON
  LABELITEM "pwv"
  SIZEUNITS kilometers 
 CLASS
    EXPRESSION ([pwv] >= 0.0 AND [pwv] <= 0.05)
    NAME 'PWV 0.00-0.05 in'
    COLOR 224 224 224
    SYMBOL 'pwvcircle'		
    SIZE 15
    LABEL
	FORCE TRUE
      COLOR 140 0 160 
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 4
#      BUFFER -10  #-15
      BUFFER 15		### Changed 2003-07-13
      PARTIALS TRUE
    END
  END
  CLASS
    NAME '0.05-0.20 in'
    EXPRESSION ([pwv] > 0.05 and [pwv] <= 0.20)
    COLOR 117 117 0
    SYMBOL 'pwvcircle'
    SIZE 15
    LABEL
        FORCE TRUE
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
#      BUFFER -10 
      BUFFER 15
      PARTIALS TRUE
    END
  END
  CLASS
	
    NAME '0.20-0.40 in'
    EXPRESSION ([pwv] > 0.20 and [pwv] <= 0.40)
    COLOR 255 0 0
    SYMBOL 'pwvcircle'
    SIZE 15
    LABEL
        FORCE TRUE
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER 15
      PARTIALS TRUE
    END
  END
  CLASS
	
    NAME '0.40-0.60 in'
    EXPRESSION ([pwv] > 0.40 and [pwv] <= 0.60)
    COLOR 255 145 46
    SYMBOL 'pwvcircle'
    SIZE 15
    LABEL
        FORCE TRUE

      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER 15
      PARTIALS TRUE
    END
  END
  CLASS
	
    NAME '0.60-0.80 in'
    EXPRESSION ([pwv] > 0.600 and [pwv] <= 0.80)
    COLOR 255 237 26
    SYMBOL 'pwvcircle'
    SIZE 15
    LABEL
        FORCE TRUE

      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER 15 
      PARTIALS TRUE
    END
  END
  CLASS
	
    NAME '0.80-1.00 in'
    EXPRESSION ([pwv] > 0.80 and [pwv] <= 1.00)
    COLOR 166 255 18
    SYMBOL 'pwvcircle'
    SIZE 15
    LABEL
        FORCE TRUE

      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER 15 
      PARTIALS TRUE
    END
  END
  CLASS
	
    NAME '1.00-1.20 in'
    EXPRESSION ([pwv] > 1.00 and [pwv] <= 1.20)
    COLOR 102 255 0
    SYMBOL 'pwvcircle'
    SIZE 15
    LABEL
        FORCE TRUE

      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER 15 
      PARTIALS TRUE
    END
  END
  CLASS
	
    NAME '1.20-1.40 in'
    EXPRESSION ([pwv] > 1.20 and [pwv] <= 1.400)
    COLOR 15 255 128
    SYMBOL 'pwvcircle'
    SIZE 15
    LABEL
        FORCE TRUE
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER 15 
      PARTIALS TRUE
    END
  END
  CLASS
	
    NAME '1.40-1.60 in'
    EXPRESSION ([pwv] > 1.400 and [pwv] <= 1.600)
    COLOR 18 224 255
    SYMBOL 'pwvcircle'
    SIZE 15
    LABEL
        FORCE TRUE

      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER 15 
      PARTIALS TRUE
    END
  END
  CLASS
	
    NAME '1.80-1.60 in'
    EXPRESSION ([pwv] > 1.60 and [pwv] <= 1.800)
    COLOR 18 191 255
    SYMBOL 'pwvcircle'
    SIZE 15
    LABEL
        FORCE TRUE

      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER 15 
      PARTIALS TRUE
    END
  END
  CLASS
	
    NAME '1.80-2.00 in'
    EXPRESSION ([pwv] > 1.800 and [pwv] <= 2.00)
    COLOR 8 89 255
    SYMBOL 'pwvcircle'
    SIZE 15
    LABEL
        FORCE TRUE

      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER 15 
      PARTIALS TRUE
    END
  END
  CLASS
	
    NAME '>2.00 in'
    EXPRESSION ([pwv] > 2.00)
    COLOR 0 0 255
    SYMBOL 'pwvcircle'
    SIZE 15
    LABEL
        FORCE TRUE

      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER 15 
      PARTIALS TRUE
    END
  END
END

#
# Wind Barbs
#
LAYER
#SIZEUNITS pixels
#PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
#END

  NAME weather-barbs
  TYPE POINT
  DATA currentWeather
  STATUS ON
  LABELITEM "WINDCHR"
  LABELANGLEITEM "MAPWINDDIR"
  LABELCACHE ON
  CLASS
	
    LABEL
        FORCE TRUE

	COLOR 0 0 0
#	SHADOWCOLOR 128 128 128
#	SHADOWSIZE 0 0
	TYPE truetype
	FONT ESRI_weather
	SIZE 40
#        SIZE 30
	POSITION UR
 	OFFSET -4 -5 # for size 30 UR
#        BUFFER 10
        BUFFER -15
        PARTIALS TRUE
    END
  END 
END


# Metar Site Labels
LAYER
SIZEUNITS pixels
#PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
#END

  NAME weather-mlabel
  TYPE POINT
  DATA currentWeather
  STATUS OFF
  LABELITEM "ABBR"
  CLASS
	
    LABEL
        FORCE TRUE

      COLOR 180 180 180
      TYPE BITMAP
      SIZE SMALL
      POSITION CR
      OFFSET 7 0
      BUFFER 15		### changed 2003-07-13, old value == -5
      PARTIALS TRUE
    END
  END
END

LAYER
SIZEUNITS pixels
#PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
#END

  NAME weather-mrain
  TYPE POINT
  DATA currentWeather
  STATUS ON
  LABELITEM "precip"
  CLASS
	
    LABEL
        FORCE TRUE

      COLOR 20 50 250 
      TYPE BITMAP
      SIZE MEDIUM
      POSITION LR
      OFFSET 2 2
      BUFFER 15
      PARTIALS TRUE
    END
  END
END

LAYER
SIZEUNITS pixels
#PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
#END

  NAME weather-vis
  TYPE POINT
  DATA currentWeather
  STATUS ON
  LABELITEM "vis"
  CLASS
    LABEL
        FORCE TRUE

      COLOR 200 50 50
      TYPE BITMAP
      SIZE SMALL
      POSITION CL
      OFFSET 3 0
      BUFFER 5
      PARTIALS TRUE
    END
  END
END

LAYER
SIZEUNITS pixels
#PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
#END

  NAME weather-mdew
  TYPE POINT
  DATA currentWeather
  STATUS ON
  LABELITEM "dewp"
  CLASS
	
    LABEL
        FORCE TRUE

      COLOR 0 160 0 
      TYPE BITMAP
      SIZE MEDIUM
      POSITION LL
      OFFSET 2 4
#      BUFFER -5
      BUFFER 5 #-10
      PARTIALS TRUE
    END
  END
END

LAYER
SIZEUNITS pixels
#PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
#END

  NAME weather-mslp
  TYPE POINT
  DATA currentWeather
  STATUS ON
  LABELITEM "slp"
  TOLERANCE -1000	### changed 2003-07-13
  CLASS
	
    LABEL
        FORCE TRUE

      COLOR 0 0 160 
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UR
      OFFSET 4 7
      BUFFER 5
      PARTIALS TRUE
    END
  END
END

LAYER
SIZEUNITS pixels
#PROJECTION
#	"proj=lcc"
#	"ellps=GRS80"
#	"lon_0=100w"
#	"lat_1=27.416n"
#	"lat_2=34.916n"
#END

  NAME weather-mtemp
  TYPE POINT
  DATA currentWeather
  STATUS ON
  LABELITEM "temp"
  CLASS
	
    LABEL
        FORCE TRUE

      COLOR 255 0 0
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UL
      OFFSET 2 4
      BUFFER 5
      PARTIALS TRUE
    END
  END
END

LAYER
#SIZEUNITS pixels
    NAME credits
    STATUS DEFAULT
    TRANSFORM FALSE
    TYPE ANNOTATION
    FEATURE
      POINTS 4 696 END
      TEXT ' '
    END
    CLASS
      LABEL
        TYPE TRUETYPE
        FONT ESRI_weather
        SIZE 50
        ANTIALIAS true
        COLOR 0 0 0
        POSITION UR
      END
    END
  END


# Use a layer like this for db data
# http://postgis.refractions.net/pipermail/postgis-users/2001-August/000192.html

    LAYER
    SIZEUNITS pixels
      CONNECTIONTYPE postgis
      NAME "temp"
      # Connect to a remote spatial database
      CONNECTION "user=postgres password=mesonet dbname=metar host=mesodata.cs.tamu.edu"
      # Get the lines from the 'geom' column of the 'roads' table
      DATA "temp from datatest join tblsites ON site=siteabbr"
      STATUS OFF
      TYPE POINT
      # Of the lines in the extents, only render the wide highways
      # FILTER "type = 'highway' and numlanes >= 4"
      CLASS
        # Make the superhighways brighter and 2 pixels wide
        #EXPRESSION ([numlanes] >= 6)
        COLOR 255 22 22      
        SYMBOL "circle"
        SIZE 2
      END
    END


END # Map File

--------------000000050306070703000506--




More information about the MapServer-users mailing list