[Mapserver-users] 3.7 success

Gerry Creager N5JXS gerry.creager at tamu.edu
Wed Apr 23 07:33:59 PDT 2003


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

It looks like, barring some other unforeseen problems, 
http://mesonet.tamu.edu is open for business...

Using RH 9.0, PHP 4.3.2RC1, Perl 5.8, MS3.7 (nightly build from 18 APR, 
and lots of help from the list.

For the record, the perl problems I had appear to have been stupid user 
tricks.  I will probably add some notes to the 3.7 Migration Guide wiki 
shortly.  Compiling 3.7 with threads is not a good idea, apparently, but 
I'm gonna go back now that I can visualize my files, and see if I can 
make that work, too.

Thanks to all for the help!
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
Page: 979.228.0173
Office: 903A Eller Bldg, TAMU, College Station, TX 77843

--------------010609090103000902070307
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

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=utm"
#  "ellps=GRS80"
#  "zone=15"
#  "north"
#  "no_defs"
#
#  OR: 
#
#  "init=epsg:26915"
#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:26915"
  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 1 1 END
#  FILLED TRUE
  POINTS 5 5 END
  FILLED FALSE
END
SYMBOL
  NAME 'pwvcircle'
  TYPE ELLIPSE
#  POINTS 1 1 END
  FILLED TRUE
  POINTS 5 5 END
#  FILLED FALSE
END

#
# Start of layer definitions
#

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

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

# Lakes and Rivers
LAYER
  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
  DATA "latest.tif"
  TYPE RASTER
  OFFSITE 0 0 0
  STATUS false
END # LAYER

# Layer for County Boundaries
LAYER
  NAME border
  TYPE POLYGON
  DATA data/counties
  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
  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
  NAME weather-metar
  STATUS DEFAULT
  TYPE POINT
  DATA currentWeather
  STATUS ON
  LABELCACHE OFF
#  TOLERANCE 3
  TOLERANCE 10
  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
  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
      COLOR 140 0 160 
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 4
      BUFFER -5 #-15
      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 20
    LABEL
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER -5 #-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 20
    LABEL
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER -5 #-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 20
    LABEL
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER -5 #-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 20
    LABEL
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER -5 #-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 20
    LABEL
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER -5 #-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 20
    LABEL
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER -5 #-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 20
    LABEL
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER -5 #-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 20
    LABEL
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER -5 #-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 20
    LABEL
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER -5 #-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 20
    LABEL
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER -5 #-15
      PARTIALS TRUE
    END
  END
  CLASS
    NAME '>2.00 in'
    EXPRESSION ([pwv] > 2.00)
    COLOR 0 0 255
    SYMBOL 'pwvcircle'
    SIZE 20
    LABEL
      COLOR 140 0 160
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UC
      OFFSET 2 6
      BUFFER -5 #-15
      PARTIALS TRUE
    END
  END
END

#
# Wind Barbs
#
LAYER
  NAME weather-barbs
  TYPE POINT
  DATA currentWeather
  STATUS DEFAULT
  LABELITEM "WINDCHR"
  LABELANGLEITEM "MAPWINDDIR"
  LABELCACHE OFF
  CLASS
    LABEL
	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 -1
        PARTIALS TRUE
    END
  END 
END


# Metar Site Labels
LAYER
  NAME weather-mlabel
  TYPE POINT
  DATA currentWeather
  STATUS DEFAULT
  LABELITEM "ABBR"
  CLASS
    LABEL
      COLOR 180 180 180
      TYPE BITMAP
      SIZE SMALL
      POSITION CR
      OFFSET 7 0
      BUFFER -5
      PARTIALS TRUE
    END
  END
END

LAYER
  NAME weather-mrain
  TYPE POINT
  DATA currentWeather
  STATUS ON
  LABELITEM "precip"
  CLASS
    LABEL
      COLOR 20 50 250 
      TYPE BITMAP
      SIZE MEDIUM
      POSITION LR
      OFFSET 2 2
      BUFFER -5
      PARTIALS TRUE
    END
  END
END

LAYER
  NAME weather-vis
  TYPE POINT
  DATA currentWeather
  STATUS ON
  LABELITEM "vis"
  CLASS
    LABEL
      COLOR 200 50 50
      TYPE BITMAP
      SIZE SMALL
      POSITION CL
      OFFSET 3 0
      BUFFER -5
      PARTIALS TRUE
    END
  END
END

LAYER
  NAME weather-mdew
  TYPE POINT
  DATA currentWeather
  STATUS DEFAULT
  LABELITEM "dewp"
  CLASS
    LABEL
      COLOR 0 160 0 
      TYPE BITMAP
      SIZE MEDIUM
      POSITION LL
      OFFSET 2 4
#      BUFFER -5
      BUFFER -5 #-10
      PARTIALS TRUE
    END
  END
END

LAYER
  NAME weather-mslp
  TYPE POINT
  DATA currentWeather
  STATUS ON
  LABELITEM "slp"
  TOLERANCE -1000
  CLASS
    LABEL
      COLOR 0 0 160 
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UR
      OFFSET 4 7
      BUFFER -5
      PARTIALS TRUE
    END
  END
END

LAYER
  NAME weather-mtemp
  TYPE POINT
  DATA currentWeather
  STATUS DEFAULT
  LABELITEM "temp"
  CLASS
    LABEL
      COLOR 255 0 0
      TYPE BITMAP
      SIZE MEDIUM
      POSITION UL
      OFFSET 2 4
      BUFFER -5
      PARTIALS TRUE
    END
  END
END

LAYER
    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
      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

--------------010609090103000902070307--




More information about the MapServer-users mailing list