antialias crash

Timothy Reed tim.reed at BAESYSTEMS.COM
Mon Jun 20 11:19:00 PDT 2005


I am having an issue when I turn antialias'ing on in my map file.  If I 
am using a modified version of the mapserver demo I get an internal 
server error, if I use a WMS client no image is returned.  If I take out 
the antialias everything works like a champ! Any ideas?

TIA,
Tim

./mapserv-4.6 -v
MapServer version 4.6.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE


MAP
#
# Start of map file
#
NAME DEMO2
STATUS ON
SIZE 1000 500
EXTENT -179 -89 179 89
UNITS DD
SHAPEPATH "data"
IMAGECOLOR 0 0 153
DEBUG ON


PROJECTION
    "ellps=GRS80"
    "datum=WGS84"
      "init=epsg:4326"
END

#OUTPUTFORMAT
#  NAME jpeg
#  DRIVER "GD/JPEG"
#  # quality setting: 0 is minimum quality, 100 is maximum quality
#  FORMATOPTION QUALITY=100
#  # data format
#  MIMETYPE "image/jpeg"
#  # currently, there is no real grayscale jpeg output available
#  IMAGEMODE RGB
#  EXTENSION "jpg"
#END
OUTPUTFORMAT
  NAME png
  DRIVER "GD/PNG"
  # data format
  MIMETYPE "image/png"
  # currently, there is no real grayscale jpeg output available
  IMAGEMODE RGBA
  EXTENSION "png"
END

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

SYMBOL  
  NAME "cartoline"
  TYPE cartoline
  FILLED TRUE
  LINECAP butt
  LINEJOIN miter
  LINEJOINMAXSIZE 1
#  STYLE 10 5
END

#
# Start of web interface definition (including WMS enabling metadata)
#
WEB
  HEADER demo_header.html
  TEMPLATE demo2.html
  FOOTER demo_footer.html
#  MINSCALE 500000
  IMAGEPATH "/usr/local/apache2/htdocs/tmp/"
  IMAGEURL "/tmp/"
  LOG "mapserver.log"
  METADATA
    WMS_TITLE "Mapserver Demo for Q2"
    WMS_ONLINERESOURCE "http://boris:8080/cgi-bin/q2-mapserv?"
    WMS_SRS "epsg:4326"
    WMS_ABSTRACT "Testing MapServer capabilities for use within Q2"
  END
END


LEGEND
  KEYSIZE 18 12
  IMAGECOLOR 211 211 211
  LABEL
    TYPE BITMAP
    SIZE MEDIUM
    COLOR 0 0 89
  END
  STATUS ON
END

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

#
# Start of reference map
#
REFERENCE
  IMAGE data/land_shallow_topo_120.png
  EXTENT -180 -90 180 90
  SIZE 120 120
  STATUS ON
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
END


SCALEBAR
  TRANSPARENT OFF
  COLOR 0 0 0
  OUTLINECOLOR 0 0 0
  BACKGROUNDCOLOR 255 255 255
  STATUS ON
  POSITION LR
  STYLE 1
END

#####################################
# LAYER: Low-resolution Map of the World
#####################################
LAYER
  NAME full_world
  GROUP background
  STATUS OFF
  MINSCALE 50000000
  DATA "land_shallow_topo_full.png"
  TYPE RASTER
  METADATA
    WMS_TITLE "World Backdrop"
    WMS_SRS "EPSG:4326"
  END   
END

#####################################
# LAYER: Medium-resolution Map of the World
#####################################
LAYER
  NAME medium_world
  GROUP background
  MAXSCALE 50000000
  MINSCALE 5000000
  STATUS OFF
  TILEINDEX "tindex_06-17-05.shp"
  TILEITEM "Location"
  TYPE RASTER
  METADATA
    WMS_TITLE "World Backdrop"
    WMS_SRS "EPSG:4326"
  END   
END

#####################################
# LAYER: HIGH-res Map of the World
#####################################
LAYER
  NAME small_world
  GROUP background
  MAXSCALE 5000000
  MINSCALE 500000
  STATUS OFF
  TILEINDEX "world2.shp"
  TILEITEM "Location"
  TYPE RASTER
  METADATA
    WMS_TITLE "World Backdrop"
    WMS_SRS "EPSG:4326"
  END   
END

#####################################
# LAYER: Filled in Polygon Map of the World
#####################################
LAYER
  NAME world_background
  GROUP background
  DATA "World_countries_shp"
  TYPE POLYGON
  STATUS OFF
  MAXSCALE 500000
  CLASS
    NAME 'World Background'
    COLOR 0 102 0
    SIZE 7
  END
  METADATA
    WMS_TITLE "World Backdrop"
    WMS_SRS "EPSG:4326"
  END
END

#####################################
# LAYER: 10 Grid Lines
#####################################
LAYER
  NAME grid3
  GROUP gridlines
  METADATA
    DESCRIPTION "Grid"
  END
  TYPE LINE
  STATUS ON
  MINSCALE 100000000
  CLASS
    NAME "Grid"
    COLOR 0 0 0
    LABEL
      COLOR  255 255 255
      TYPE BITMAP
      SIZE SMALL
      POSITION AUTO         
      PARTIALS FALSE
      BUFFER 5
    END
 END
 PROJECTION
     "init=epsg:4326"
 END
 GRID
   LABELFORMAT DDMM
   MINARCS 10
   MININTERVAL 10
   MINSUBDIVIDE 20
 END
END

#####################################
# LAYER: 4 Grid Lines
#####################################
LAYER
  NAME grid2
  GROUP gridlines
  METADATA
    DESCRIPTION "Grid"
  END
  TYPE LINE
  STATUS ON
  MAXSCALE 100000000
  MINSCALE 5000000
  CLASS
    NAME "Grid"
    COLOR 0 0 0
    LABEL
      COLOR  255 255 255
      TYPE BITMAP
      SIZE SMALL
      POSITION AUTO         
      PARTIALS FALSE
      BUFFER 5
    END
 END
 PROJECTION
     "init=epsg:4326"
 END
 GRID
   LABELFORMAT DDMM
   MINARCS 4
   MININTERVAL 4
   MINSUBDIVIDE 4
 END
END

#####################################
# LAYER: 1 Grid Lines
#####################################
LAYER
  NAME grid1
  GROUP gridlines
  METADATA
    DESCRIPTION "Grid"
  END
  TYPE LINE
  STATUS ON
  MAXSCALE 5000000
  CLASS
    NAME "Grid"
    COLOR 0 0 0
    LABEL
      COLOR  255 255 255
      TYPE BITMAP
      SIZE SMALL
      POSITION AUTO         
      PARTIALS FALSE
      BUFFER 5
    END
 END
 PROJECTION
     "init=epsg:4326"
 END
 GRID
   LABELFORMAT DDMM
   MINARCS 1
   MININTERVAL 1
   MINSUBDIVIDE 1
 END
END

#####################################
# LAYER: Road Lines
#####################################
LAYER
  NAME roads_line
  GROUP roads
  TYPE LINE
  DATA "the_geom from roads"
  CONNECTION "user=reed dbname=Q2MAPS host=localhost port=5432"
  CONNECTIONTYPE postgis
  STATUS OFF
  CLASSITEM "name"
  CLASS
    NAME 'Interstate Highway'
    EXPRESSION /^Interstate/
    MAXSCALE 19000000
    STYLE
      SYMBOL 'cartoline'
      ANTIALIAS TRUE
      COLOR 165 42 42
      SIZE 4
    END
    STYLE
      SYMBOL 'cartoline'
#      ANTIALIAS TRUE
      COLOR 255 165 0
      SIZE 2
    END
    TEMPLATE "road.html"
  END
  CLASS
    NAME 'US Route'
    EXPRESSION /^US/
    MAXSCALE 7500000
    STYLE
      SYMBOL 'cartoline'
#      ANTIALIAS TRUE
      COLOR 240 255 255
      SIZE 2
    END
    TEMPLATE "road.html"
  END
  CLASS
    NAME 'State Route'
    EXPRESSION /^State/
    MAXSCALE 2500000
    STYLE
      SYMBOL 'cartoline'
#      ANTIALIAS TRUE
      COLOR 255 255 0
      SIZE 1
    END
    TEMPLATE "road.html"
  END
  CLASS
    NAME 'ROADS'
    MAXSCALE 1500000
    STYLE
      COLOR 0 0 0
      SIZE 8
    END
    TEMPLATE "road.html"
  END
  TOLERANCE 10
  PROJECTION
    "proj=latlong"
    "ellps=GRS80"
    "datum=WGS84"
  END
  HEADER "road_header.html"
  FOOTER "cities_footer.html"
  METADATA
    WMS_TITLE "Roads"
    WMS_SRS "EPSG:4326"
  END   
END  

#####################################
# LAYER: Road Symbols
#####################################
LAYER
  NAME roads_symbols
  TYPE ANNOTATION
  DATA "the_geom from roads"
  CONNECTION "user=reed dbname=Q2MAPS host=localhost port=5432"
  CONNECTIONTYPE postgis
  STATUS OFF
  #Grab all Routes that do not have commas in the name
  FILTER "name !~* ','"
  LABELITEM "road_num"
  CLASSITEM "name"
  CLASS
    NAME 'Interstate Symbol'
    EXPRESSION /^Interstate/
    COLOR 255 255 255
    OUTLINECOLOR 255 255 255
    SYMBOL 'symbols/interstate.gif'
    LABEL
      MINFEATURESIZE AUTO
      MINDISTANCE 150
      POSITION CC
      SIZE TINY
      COLOR 255 255 255
    END
  END
  CLASS
    NAME 'US Route Symbol'
    EXPRESSION /^US/
    MAXSCALE 7500000
    COLOR 0 0 0
    OUTLINECOLOR 0 0 0
    SYMBOL 'symbols/ushwy.gif'
    LABEL
      MINFEATURESIZE AUTO
      MINDISTANCE 150
      POSITION CC
      SIZE TINY
      COLOR 0 0 0
    END
  END
  CLASS
    NAME 'State Route Symbol'
    EXPRESSION /^State/
    MAXSCALE 1750000
    COLOR 0 0 0
    OUTLINECOLOR 0 0 0
    SYMBOL 'symbols/sthwy.gif'
    LABEL
      MINFEATURESIZE AUTO
      MINDISTANCE 150
      POSITION CC
      SIZE TINY
      COLOR 0 0 0
    END
  END
END  

#####################################
# LAYER: Road Labels
#####################################
LAYER
  NAME roads_label
  TYPE ANNOTATION
  DATA "the_geom from roads"
  CONNECTION "user=reed dbname=Q2MAPS host=localhost port=5432"
  CONNECTIONTYPE postgis
  STATUS OFF
  LABELMAXSCALE 1000000
  LABELITEM "name"
  CLASSITEM "name"
  CLASS
    COLOR 255 255 255
    LABEL
      COLOR 255 255 255
      TYPE BITMAP
      SIZE MEDIUM
      POSITION AUTO
      PARTIALS FALSE
      BUFFER 2
    END
  END
  METADATA
     WMS_TITLE "Road Names"
  END
END

#####################################
# LAYER: City Labels
#####################################
LAYER
  NAME cities_label
  TYPE ANNOTATION
  DATA "the_geom from cities"
  CONNECTION "user=reed dbname=Q2MAPS host=localhost port=5432"
  CONNECTIONTYPE postgis
  STATUS OFF
  LABELITEM "name"
  CLASSITEM "name"
  CLASS
    EXPRESSION ([pop_2000] > 250000 )
    COLOR 255 255 255
    LABEL
      COLOR 255 255 255
#      BACKGROUNDCOLOR 211 211 211
#      BACKGROUNDSHADOWCOLOR 211 211 211
#      BACKGROUNDSHADOWSIZE 2 2
#      ANTIALIAS TRUE
      TYPE BITMAP
      SIZE MEDIUM
      POSITION AUTO
      PARTIALS FALSE
      BUFFER 2
    END
  END
  CLASS
    EXPRESSION ([pop_2000] > 30000 )
    MAXSCALE 8000000
    COLOR 255 255 255
    LABEL
      COLOR 255 255 255
      TYPE BITMAP
      SIZE MEDIUM
      POSITION AUTO
      PARTIALS FALSE
      BUFFER 2
    END
  END
  CLASS
    MAXSCALE 2000000
    EXPRESSION ([pop_2000] > 10000 )
    COLOR 255 255 255
    LABEL
      COLOR 255 255 255
      TYPE BITMAP
      SIZE MEDIUM
      POSITION AUTO
      PARTIALS FALSE
      BUFFER 2
    END
  END
  CLASS
    MAXSCALE 600000
    EXPRESSION ([pop_2000] > 1000 )
    COLOR 255 255 255
    LABEL
      COLOR 255 255 255
      TYPE BITMAP
      SIZE MEDIUM
      POSITION AUTO
      PARTIALS FALSE
      BUFFER 2
    END
  END
  METADATA
     WMS_TITLE "City Names"
  END
END

#####################################
# LAYER: Cities
#####################################
LAYER
  NAME cities
  TYPE POINT
  DATA "the_geom from cities"
  CONNECTION "user=reed dbname=Q2MAPS host=localhost port=5432"
  CONNECTIONTYPE postgis
  STATUS OFF
  CLASSITEM "name"
  CLASS
    SYMBOL 'circle'
    NAME 'CITIES'
    SIZE 3
    COLOR 204 255 0
    TEMPLATE "cities.html"
    EXPRESSION ([pop_2000] > 250000)
  END
  CLASS
    MAXSCALE 8000000
    SYMBOL 'circle'
    SIZE 3
    COLOR 204 255 0
    TEMPLATE "cities.html"
    EXPRESSION ([pop_2000] > 30000)
  END
  CLASS
    MAXSCALE 2000000
    SYMBOL 'circle'
    SIZE 3
    COLOR 204 255 0
    TEMPLATE "cities.html"
    EXPRESSION ([pop_2000] > 10000)
  END
  CLASS
    MAXSCALE 600000
    SYMBOL 'circle'
    SIZE 3
    COLOR 204 255 0
    TEMPLATE "cities.html"
  END
  TOLERANCE 10
  PROJECTION
    "proj=latlong"
    "ellps=GRS80"
    "datum=WGS84"
  END
  HEADER "cities_header.html"
  FOOTER "cities_footer.html"

  DUMP TRUE # allow GML export
  METADATA   
    WMS_TITLE "Cities"
    WMS_SRS "EPSG:4326"
  END   

END

#####################################
# LAYER: City Query
#####################################
LAYER
  NAME cities_query
  GROUP cities
  TYPE QUERY
  DATA "the_geom from cities"
  CONNECTION "user=reed dbname=Q2MAPS host=localhost port=5432"
  CONNECTIONTYPE postgis
  STATUS OFF
  CLASS
    SYMBOL 'circle'
    SIZE 3
    COLOR 204 255 0
    TEMPLATE "cities.html"
  END
  TOLERANCE 10
  PROJECTION
    "proj=latlong"
    "ellps=GRS80"
    "datum=WGS84"
  END
  HEADER "cities_header.html"
  FOOTER "cities_footer.html"

  DUMP TRUE # allow GML export
  METADATA   
    WMS_TITLE "Cities Query"
    WMS_SRS "EPSG:4326"
  END   

END

#####################################
# LAYER: State outline
#####################################
LAYER
  NAME states
  TYPE LINE
  DATA statesp020
  STATUS ON
  CLASS
    NAME 'STATES'
    COLOR 102 51 255
    SIZE 7
  END
  PROJECTION
    "proj=latlong"
    "ellps=GRS80"
    "datum=WGS84"
  END
  METADATA
    WMS_TITLE "State lines"
    WMS_SRS "EPSG:4326"
  END   
END

#####################################
# LAYER: World Countries outline
#####################################
LAYER
  NAME WorldGen_Outline
  DATA "World_countries_shp"
  TYPE LINE
  STATUS ON
  CLASS
    NAME 'WorldGen_Outline'
    COLOR 255 0 0
    SIZE 7
  END

  METADATA
    WMS_TITLE "World Countries"
    WMS_SRS "EPSG:4326"
  END
END

EN

-- 


Timothy Reed
Software Engineer

BAE Systems - National Security Solutions
428 Phoenix Drive
Griffiss Business & Technology Park
Rome, NY 13441

Phone: (315)838-2284
Email: tim.reed at baesystems.com

"I reject your reality, and substitute my own" - Adam Savage



More information about the MapServer-users mailing list