mapserv segfaults
John C Cartwright
John.C.Cartwright at NOAA.GOV
Thu Feb 10 13:04:40 EST 2005
Hi Steve,
No, no REQUIRES, or LABELREQUIRES. Mapfile listed below. It's a example
provided by Perry Nacionales (nacional at cbs.umn.edu), so I can't say that
I'm familiar with every parameter used. I would have expected that the
data are at least being found given that the GetCapabilities response is
normal.
Thanks for your help!
-- john
Steve Lime wrote:
> Post the mapfile! That might really help. Are you using the REQUIRES or
> LABELREQUIRES parameters? There's been a report of segfaults with those
> (and I'm looking for examples so to fix).
>
> Steve
-------------- next part --------------
#
# Start of map file
#
MAP
DEBUG ON
NAME ms4wms
STATUS ON
EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514
SIZE 600 400
UNITS METERS
SHAPEPATH "data"
IMAGECOLOR 255 255 255
SYMBOLSET "symbols/symbols35.sym"
FONTSET "fonts/fonts.list"
#TEMPLATEPATTERN "example"
IMAGETYPE png24
OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE PC256
EXTENSION "png"
END
OUTPUTFORMAT
NAME png24
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE RGB
EXTENSION "png"
END
OUTPUTFORMAT
NAME jpeg
DRIVER "GD/JPEG"
MIMETYPE "image/jpeg"
FORMATOPTION "QUALITY=85"
IMAGEMODE RGB
EXTENSION "jpg"
END
#
# Projection definition, consult the PROJ.4 documentation for parameter discussion
#
PROJECTION
"init=epsg:2163"
END
#
# Start of web interface definition (including WMS enabling metadata)
#
WEB
HEADER 'templates/header.html'
TEMPLATE wfs_demo.html
FOOTER 'templates/footer.html'
MINSCALE 1000
MAXSCALE 15000000
IMAGEPATH '/extra/contrib/apache/htdocs/output/'
IMAGEURL '/output/'
METADATA
"wms_title" "UMN MapServer Upper Great Lakes Application"
"wms_abstract" "This is a UMN MapServer application for the upper great lakes states of Michigan, Minnesota, and Wisconsin."
"wms_accessconstraints" "none"
"wms_onlineresource" "http://localhost/cgi-bin/wms_demo.cgi?"
"wms_srs" "EPSG:2163 EPSG:4326 EPSG:26915 EPSG:26916"
END
END
#
# Start of reference map
#
REFERENCE
IMAGE 'images/ugl_ref1.png'
SIZE 155 105
EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514
STATUS ON
MINBOXSIZE 10
MAXBOXSIZE 150
COLOR -1 -1 -1
OUTLINECOLOR 128 0 0
MARKERSIZE 8
MARKER 'star'
END
#
# Start of legend
#
LEGEND
KEYSIZE 12 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
STATUS ON
END
#
# Start of scalebar
#
SCALEBAR
IMAGECOLOR 255 255 255
LABEL
COLOR 0 0 0
SIZE TINY
END
STYLE 1
SIZE 100 2
COLOR 0 0 0
UNITS MILES
INTERVALS 2
TRANSPARENT FALSE
STATUS ON #EMBED
#POSITION LR
END
#
# Start of LAYER DEFINITIONS ---------------------------------------------
LAYER # MODIS raster layer begins here
NAME relief
DATA 'raster/shdrlfi020g_ugl.tif'
STATUS OFF
TYPE RASTER
OFFSITE 169 209 254
DUMP TRUE
METADATA
"wms_title" "UGL Shaded Relief"
"wms_abstract" "Shaded Relief of Michigan, Minnesota, and Wisconsin. Clipped from National Atlas data (http://www.nationalatlas.gov)."
END
PROJECTION
"init=epsg:4326"
END
CLASS
NAME 'Shaded Relief'
KEYIMAGE 'graphics/relief_keyimage.png'
END
END # MODIS raster layer ends here
LAYER # MODIS raster layer begins here
NAME modis
DATA 'raster/mod09a12003161_ugl_ll_idxa.tif'
STATUS OFF
TYPE RASTER
OFFSITE 70 74 66
METADATA
"wms_title" "UGL 500-meter MODIS 8-day reflectance imagery"
"wms_abstract" "500-meter MODIS 8-day reflectance imagery for Michigan, Minnesota, and Wisconsin. Mosaiced and clipped from MOD09A1 product, scenes h11v04 and h12v04. See http://edcdaac.usgs.gov/modis/mod09.html for more information."
END
PROJECTION
"init=epsg:4326"
END
CLASS
NAME 'MODIS MOD09 Product'
KEYIMAGE 'graphics/modis_keyimage.png'
END
END # MODIS raster layer ends here
LAYER # LandSat WMS map from JPL
NAME landsat
TYPE RASTER
OFFSITE 0 0 0
STATUS OFF
CONNECTIONTYPE WMS
CONNECTION "http://mapus.jpl.nasa.gov/wms.cgi?"
#CONNECTION "http://gisdata.usgs.net/servlet/com.esri.wms.Esrimap?ServiceName=USGS_WMS_LANDSAT7&VERSION=1.0.0&REQUEST=map&Layers=LANDSAT7&SRS=EPSG:4326&REASPECT=false&Format=png&"
#DEBUG ON
METADATA
"wms_srs" "EPSG:4326"
"wms_name" "global_mosaic"
"wms_server_version" "1.1.1"
"wms_format" "image/jpeg"
#"wms_title" "US_LANDSAT7"
#"wms_name" "LANDSAT7"
#"wms_server_version" "1.0.0"
#"wms_format" "image/png"
END
PROJECTION
"init=epsg:4326"
END
# Unfortunately, this layer doesn't render properly when
# the CLASS object is defined. A new bug?
#CLASS
# NAME 'Landsat 7 ETM+'
# KEYIMAGE 'graphics/landsat_keyimage.png'
#END
END # LandSat WMS image ends here
LAYER
NAME cities_poly
GROUP cities
TYPE Polygon
STATUS on
CONNECTIONTYPE WFS
CONNECTION "http://localhost/cgi-bin/wfs_demo.cgi?SERVICE=WFS&VERSION=1.0.0&TYPENAME=cities_poly"
#DATA urban_ugl
HEADER 'templates/cities_header.html'
FOOTER 'templates/cities_footer.html'
TOLERANCE 3
CLASS
NAME 'Urban Areas'
TEMPLATE 'templates/cities_query.html'
COLOR 255 240 115
END # CLASS
DUMP TRUE # allow GML export
METADATA
"wms_title" "UGL Cities"
"wms_abstract" "Urban area polygons for Michigan, Minnesota, and Wisconsin. Clipped from National Atlas data (http://www.nationalatlas.gov)."
END
#PROJECTION
# "init=epsg:2163"
#END
END # LAYER
LAYER
NAME fedlands
TYPE Polygon
STATUS on
DATA fedlan_ugl
#CONNECTIONTYPE WFS
#CONNECTION "http://localhost/cgi-bin/wfs_demo.cgi?SERVICE=WFS&VERSION=1.0.0&TYPENAME=fedlands"
TOLERANCE 3
CLASS
NAME 'Federal Land'
TEMPLATE 'templates/fedland_query.html'
COLOR 164 96 89
OUTLINECOLOR 144 72 64
END # CLASS
DUMP TRUE # allow GML export
METADATA
"wms_title" "UGL Federal Land"
"wms_abstract" "Federal land polygons for Michigan, Minnesota, and Wisconsin. Clipped from National Atlas data (http://www.nationalatlas.gov)."
END
PROJECTION
"init=epsg:4326"
END
END # LAYER
LAYER # Hydrography layer begins here
NAME hydro
TYPE POLYGON
STATUS ON
#DATA hydrop_ugl
CONNECTIONTYPE WFS
CONNECTION "http://localhost/cgi-bin/wfs_demo.cgi?SERVICE=WFS&VERSION=1.0.0&TYPENAME=hydro"
METADATA
"wms_title" "UGL Hydrography"
"wms_abstract" "Hydrography polygons for Michigan, Minnesota, and Wisconsin. Clipped from National Atlas data (http://www.nationalatlas.gov)."
END
PROJECTION
"init=epsg:2163"
END
TOLERANCE 3
CLASSITEM 'FEATURE'
CLASS
NAME 'Lakes'
EXPRESSION /(^B|^C|^L|^R)./
TEMPLATE 'templates/hydro_query.html'
COLOR 72 64 254
END # CLASS
CLASS
NAME 'Rivers'
EXPRESSION 'Stream'
TEMPLATE 'templates/hydro_query.html'
COLOR 136 128 255
END # CLASS
CLASS
NAME 'Wetlands'
EXPRESSION 'Swamp or Marsh'
TEMPLATE 'templates/hydro_query.html'
COLOR 195 252 255
OUTLINECOLOR 195 252 255
SYMBOL 'circle'
SIZE 0
END # CLASS
DUMP TRUE # allow GML export
END # LAYER
LAYER # County lines
NAME counties
TYPE LINE
STATUS ON
CONNECTIONTYPE WFS
CONNECTION "http://localhost/cgi-bin/wfs_demo.cgi?SERVICE=WFS&VERSION=1.0.0&TYPENAME=counties"
#DATA co2000_ugl
CLASSITEM 'COUNTY'
CLASS
NAME 'County Boundary'
EXPRESSION /./
COLOR 201 201 201
END # CLASS
PROJECTION
"init=epsg:2163"
END
METADATA
"wms_title" "UGL County Boundaries"
"wms_abstract" "County boundary lines for Michigan, Minnesota and Wisconsin. Clipped from National Atlas data (http://www.nationalatlas.gov)."
END
END # County lines end here
LAYER # ROADS LAYER
NAME cty_roads
GROUP roads
TYPE LINE
STATUS OFF
DATA roads_ugl
MAXSCALE 750000
METADATA
"wms_title" "UGL County Roads"
"wms_abstract" "County road lines for Michigan, Minnesota and Wisconsin. Clipped from National Atlas data (http://www.nationalatlas.gov)."
END
PROJECTION
"init=epsg:4326"
END
TOLERANCE 5
CLASSITEM 'CLASS1'
CLASS
NAME 'Minor Arterial Roads'
EXPRESSION '3'
TEMPLATE 'templates/roads_query.html'
COLOR 165 165 165
END # CLASS
CLASS
EXPRESSION '4'
COLOR 210 210 210
END # CLASS
DUMP TRUE # allow GML export
END # ROADS LAYER
LAYER # state highways begin here
NAME state_hwy
GROUP roads
MAXSCALE 1500000
STATUS OFF
DATA roads_ugl
TYPE LINE
FILTERITEM 'CLASS1'
FILTER '2'
TOLERANCE 5
CLASS
NAME 'Principal Arterial Roads'
TEMPLATE 'templates/roads_query.html'
STYLE
COLOR 255 0 0
SIZE 1
SYMBOL 'circle'
END
END
DUMP TRUE # allow GML export
PROJECTION
"init=epsg:4326"
END
METADATA
"wms_title" "UGL Highways"
"wms_abstract" "Highway lines for Michigan, Minnesota and Wisconsin. Clipped from National Atlas data (http://www.nationalatlas.gov)."
END
END # highways
LAYER # interstate highways begin here
NAME interstate
GROUP roads
# MAXSCALE 22500000
STATUS OFF
#DATA roads_ugl
CONNECTIONTYPE WFS
CONNECTION "http://localhost/cgi-bin/wfs_demo.cgi?SERVICE=WFS&VERSION=1.0.0&TYPENAME=interstate"
TYPE LINE
FILTERITEM 'CLASS1'
FILTER '1'
TOLERANCE 5
CLASS
NAME "Interstate Hwy."
TEMPLATE 'templates/roads_query.html'
STYLE
COLOR 128 0 0
# SIZE 2
# SYMBOL 'circle'
END
END
DUMP TRUE # allow GML export
PROJECTION
"init=epsg:2163"
END
METADATA
"wms_title" "UGL Highways"
"wms_abstract" "Interstate highway lines for Michigan, Minnesota and Wisconsin. Clipped from National Atlas data (http://www.nationalatlas.gov)."
END
END # highways
LAYER # States line layer begins here
NAME states_bnd
GROUP states
CONNECTIONTYPE WFS
CONNECTION "http://localhost/cgi-bin/wfs_demo.cgi?SERVICE=WFS&VERSION=1.0.0&TYPENAME=states"
#DATA states_ugl
STATUS ON
TYPE LINE
CLASSITEM "CLASS"
CLASS
EXPRESSION 'land'
SYMBOL 'circle'
COLOR 64 64 64
SIZE 1
END
PROJECTION
"init=epsg:2163"
END
METADATA
"wms_title" "Upper Great Lakes State Boundaries"
"wms_abstract" "State boundary lines for Michigan, Minnesota and Wisconsin. Clipped from National Atlas data (http://www.nationalatlas.gov)."
END
END # States line layer ends here
LAYER
NAME roads_anno
GROUP roads
MAXSCALE 750000
STATUS OFF
DATA roads_ugl
TYPE ANNOTATION
LABELITEM "SIGN"
CLASSITEM "CLASS1"
CLASS
EXPRESSION "3"
STYLE
COLOR 0 0 0 # dummy color
SYMBOL 'symbols/sthwy.png'
END
LABEL
MINFEATURESIZE 50
MINDISTANCE 150
POSITION CC
SIZE TINY
COLOR 0 0 0
END
END
CLASS
EXPRESSION "2"
STYLE
COLOR 0 0 0 # dummy color
SYMBOL 'symbols/ushwy.png'
END
LABEL
MINFEATURESIZE 50
MINDISTANCE 150
POSITION CC
SIZE TINY
COLOR 0 0 0
END
END
PROJECTION
"init=epsg:4326"
END
METADATA
"wfs_title" "UGL Highways"
"wms_abstract" "Highway annotations for Michigan, Minnesota and Wisconsin. Clipped from National Atlas data (http://www.nationalatlas.gov)."
END
END # highway annotation
LAYER
NAME roads_anno1
GROUP roads
STATUS OFF
DATA roads_ugl
TYPE ANNOTATION
LABELITEM "SIGN"
CLASSITEM "CLASS1"
CLASS
EXPRESSION "1"
STYLE
COLOR 0 0 0 # dummy color
SYMBOL 'symbols/interstate.png'
END
LABEL
MINFEATURESIZE 50
MINDISTANCE 150
POSITION CC
SIZE TINY
COLOR 255 255 255
END
END
PROJECTION
"init=epsg:4326"
END
METADATA
"wms_title" "UGL Highways"
"wms_abstract" "Interstate highway annotations for Michigan, Minnesota and Wisconsin. Clipped from National Atlas data (http://www.nationalatlas.gov)."
END
END
LAYER # Cities label layer begins here
NAME cities_label
GROUP cities
DATA urban_ugl
STATUS ON
TYPE ANNOTATION
MAXSCALE 750000
PROJECTION
"init=epsg:4326"
END
LABELITEM "NAME"
CLASS
COLOR -1 -1 -1
LABEL
COLOR 32 32 128
TYPE TRUETYPE
FONT arial-bold
SIZE 8
ANTIALIAS TRUE
POSITION CC
PARTIALS FALSE
MINDISTANCE 300
BUFFER 2
END # end of label
END # end of class
END # Cities label layer ends here
LAYER # States label layer begins here
NAME states_label
GROUP states
DATA states_ugl
STATUS ON
TYPE ANNOTATION
PROJECTION
"init=epsg:4326"
END
CLASSITEM 'CLASS'
LABELITEM 'STATE'
CLASS
EXPRESSION 'land'
COLOR -1 -1 -1
LABEL
COLOR 132 31 31
SHADOWCOLOR 218 218 218
SHADOWSIZE 2 2
TYPE TRUETYPE
FONT arial-bold
SIZE 12
ANTIALIAS FALSE
POSITION CL
PARTIALS FALSE
MINDISTANCE 300
BUFFER 4
END # end of label
END # end of class
END # States label layer ends here
# End of LAYER DEFINITIONS -------------------------------
END # Map File
More information about the mapserver-users
mailing list