[Mapserver-users] WMS LAYERS=

Normand Savard nsavard at dmsolutions.ca
Mon Jan 12 17:05:00 EST 2004


Hi,

I tried to replicate this problem without success by using our WMS 
server used during the OGC compliance tests.   I also used the OGC test 
suite requests.  I joined both the map file and the requests sent (see 
below).  Theses requests contain three layers.  In the first request, 
the "Forest" layer is drawn first.  In the second request, the "Forest" 
layer is drawn last.  You can also see that I modified the mapfile to 
set the "Forest" layer status to "DEFAULT".   It does not seem to affect 
the drawing order.  But maybe I'm missing something.  Do we have access 
your WMS server?  It is possible to have a copy of your mapfile and the 
request you are currently sending?

Norm



The requests used are.


http://www2.dmsolutions.ca/cgi-bin/mswms_ogc_cite?VERSION=1.1.1&REQUEST=GetMap&LAYERS=Forests,Lakes,NamedPlaces&STYLES=&SRS=EPSG:4326&BBOX=-0.0042,-0.0024,0.0042,0.0024&WIDTH=168&HEIGHT=96&FORMAT=image/gif 


http://www2.dmsolutions.ca/cgi-bin/mswms_ogc_cite?VERSION=1.1.1&REQUEST=GetMap&LAYERS=NamedPlaces,Lakes,Forests&STYLES=&SRS=EPSG:4326&BBOX=-0.0042,-0.0024,0.0042,0.0024&WIDTH=168&HEIGHT=96&FORMAT=image/gif 



Our map file is as follow:

#
# Start of map file
#
# $Id: ogc_cite_wms_server.map,Exp $
#
NAME OGC_CITE
STATUS ON
SIZE 600 400
## EPSG:4326 extents
EXTENT -2 -2 -1 6
#EXTENT -0.0042 -0.0024 0.0042 0.0024

UNITS METERS
SHAPEPATH "../data/shapefile"
IMAGECOLOR 255 255 255
FONTSET ../etc/fonts.txt
SYMBOLSET ../etc/symbols.sym

#
# Start of web interface definition
#
WEB
# On Windows systems, /tmp and /tmp/ms_tmp/ should be created at the root
# of the drive where the .MAP file resides.
#
  IMAGEPATH "/tmp/ms_tmp/"
  IMAGEURL "/ms_tmp/"
#  LOG "/tmp/gmap.log"
  METADATA
    "WMS_TITLE"         "cite:OGC_CITE WMS Server"
    "WMS_ONLINERESOURCE" 
"http://www2.dmsolutions.ca/cgi-bin/mswms_ogc_cite?"
    "WMS_SRS"           "EPSG:4326"
    "OWS_SCHEMAS_LOCATION" "http://ogc.dmsolutions.ca"
    "WMS_ACCESSCONTRAINTS" "none"
    "WMS_FEES"              "none"

  END
END

PROJECTION
  "init=epsg:4326"
END

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

#
# Start of layer definitions
#

LAYER
  NAME BasicPolygons
  TYPE POLYGON
  STATUS OFF
  DATA BasicPolygons
  PROJECTION
    "init=epsg:4326"
  END
  TEMPLATE "basicpolygons.html"
  CLASS
    NAME "BasicPolygons"
    COLOR 194 194 194
  END
  METADATA
    "WMS_TITLE" "cite:BasicPolygons"
    "WMS_ABSTRACT" "BasicPolygons layer."
#    "WMS_SRS" "EPSG:4326"
  END
END # layer

LAYER
  NAME DividedRoutes
  TYPE LINE
  STATUS ON
  DATA DividedRoutes
  PROJECTION
    "init=epsg:4326"
  END
  CLASS
    NAME "DividedRoutes"
    COLOR 0 0 0
    OUTLINECOLOR 0 0 0
    SYMBOL 'circle'
    SIZE 6
  END
  METADATA
    "WMS_TITLE" "cite:DividedRoutes"
    "WMS_ABSTRACT" "DividedRoutes layer."
    "WMS_SRS" "EPSG:4326"
  END
END # layer

LAYER
  NAME DividedRoutes_anno
  STATUS ON
  DATA DividedRoutes
  TYPE ANNOTATION
  LABELITEM "NAME"
  CLASS
    NAME "DividedRoutesAnnotations"
    COLOR 255 255 255
    OUTLINECOLOR 0 0 0
    SYMBOL 'routetag'
    SIZE 40
    OVERLAYSYMBOL "route75"
    OVERLAYSIZE 15
    OVERLAYCOLOR 0 0 0
    LABEL
      POSITION CC
      COLOR 255 255 255
      FONT fritqat
      TYPE truetype
      SIZE 0
      PARTIALS false
    END
  END
  METADATA
    "WMS_TITLE" "DividedRoutes"
    "WMS_ABSTRACT" "Divided routes layer."
    "WMS_SRS" "EPSG:4326"
  END
END # layer

LAYER
  NAME MapNeatline
  TYPE LINE
  STATUS ON
  DATA MapNeatline
  PROJECTION
    "init=epsg:4326"
  END
  CLASS
    NAME "MapNeatline"
    COLOR 0 0 0
    SYMBOL 'circle'
    SIZE 3
  END
  METADATA
    "WMS_TITLE" "cite:MapNeatline"
    "WMS_ABSTRACT" "MapNeatline layer."
    "WMS_SRS" "EPSG:4326"
  END
END # layer

LAYER
  NAME NamedPlaces
  TYPE POLYGON
  STATUS ON
  DATA NamedPlaces
  PROJECTION
    "init=epsg:4326"
  END
  LABELITEM "NAME"
  CLASSITEM "NAME"
  TEMPLATE "namedplaces.html"
  CLASS
    NAME "Ashton"
    EXPRESSION "Ashton"
    #COLOR 153 153 153
    COLOR 192 192 192
    OUTLINECOLOR 0 0 0
    SIZE 8
    LABEL
      ANGLE AUTO
      COLOR  0 0 0
      BACKGROUNDCOLOR 192 192 192
      FONT fritqat
      TYPE truetype
      SIZE 10
      POSITION LR
      OFFSET 10 10
      PARTIALS FALSE
    END
  END
  CLASS
    NAME "Goose Island"
    EXPRESSION "Goose Island"
    COLOR 255 255 255
    SIZE 8
    TEXT "Goose | Island"
    LABEL
      ANGLE AUTO
      COLOR  0 0 0
      BACKGROUNDCOLOR 255 255 255
      FONT fritqat
      TYPE truetype
      SIZE 4
      POSITION CC
      PARTIALS FALSE
      WRAP "|"
    END
  END
  METADATA
    "WMS_TITLE" "cite:NamedPlaces"
    "WMS_ABSTRACT" "NamedPlaces layer."
    "WMS_SRS" "EPSG:4326"
  END
END # layer

LAYER
  NAME Ponds
  TYPE POLYGON
  STATUS ON
  DATA Ponds
  PROJECTION
    "init=epsg:4326"
  END
  TEMPLATE "ponds.html"
  CLASS
    NAME "Ponds"
    COLOR 0 255 255
    OUTLINECOLOR 0 0 0
    TEXT "Stock Pond"
    LABEL
      COLOR  0 0 0
      FONT fritqat
      TYPE truetype
      SIZE 9
      #POSITION AUTO
      POSITION UC
      PARTIALS FALSE
      OFFSET 0 23
    END
  END
  METADATA
    "WMS_TITLE" "cite:Ponds"
    "WMS_ABSTRACT" "Ponds layer."
    "WMS_SRS" "EPSG:4326"
  END
END # layer

LAYER
  NAME RoadSegments
  TYPE LINE
  STATUS ON
  DATA RoadSegments
  PROJECTION
    "init=epsg:4326"
  END
  LABELITEM "NAME"
  CLASSITEM "NAME"
  CLASS
    NAME "MainStreet"
    EXPRESSION "Main Street"
    SYMBOL 'circle'
    SIZE 3
    COLOR 238 0 0
    LABEL
      ANGLE AUTO
      COLOR  0 0 0
      FONT fritqat-italic
      TYPE truetype
      SIZE 10
      POSITION UC
      PARTIALS FALSE
      OFFSET 0 2
    END
  END
  CLASS
    NAME "Route5"
    EXPRESSION "Route 5"
    SYMBOL 'circle'
    SIZE 3
    COLOR 0 0 0
  END
  CLASS
    NAME "Route75"
    EXPRESSION "Dirt Road by Green Forest"
    SYMBOL 'circle'
    SIZE 5
    #COLOR 255 255 0
    COLOR 192 160 0
    TEXT "Dirt Road"
    LABEL
      ANGLE 90
      COLOR  0 0 0
      FONT fritqat-italic
      TYPE truetype
      SIZE 10
      POSITION AUTO
      PARTIALS FALSE
      #OUTLINECOLOR 255 255 255
      OFFSET 0 5
    END
  END
  METADATA
    "WMS_TITLE" "cite:RoadSegments"
    "WMS_ABSTRACT" "RoadSegments layer."
    "WMS_SRS" "EPSG:4326"
  END
END # layer

LAYER
  NAME RoadSegments_anno
  STATUS ON
  DATA RoadSegments
  TYPE ANNOTATION
  CLASSITEM "FID"
  LABELITEM "NAME"
  CLASS
    NAME "Route5NorthEastAnnotations"
    EXPRESSION "104"
    COLOR 255 255 255
    OUTLINECOLOR 0 0 0
    #OVERLAYCOLOR 0 0 0
    SYMBOL 'routetag'
    SIZE 25
    OVERLAYSYMBOL "route5"
    OVERLAYSIZE 15
    OVERLAYCOLOR 0 0 0
    LABEL
      POSITION CC
      COLOR 255 255 255
      FONT fritqat
      TYPE truetype
      SIZE 0
      PARTIALS false
    END
  END
  CLASS
    NAME "Route5WestAnnotations"
    EXPRESSION "102"
    COLOR 255 255 255
    OUTLINECOLOR 0 0 0
    #OVERLAYCOLOR 0 0 0
    SYMBOL 'routetag'
    SIZE 25
    OVERLAYSYMBOL "route5"
    OVERLAYSIZE 15
    OVERLAYCOLOR 0 0 0
    LABEL
      POSITION CC
      COLOR 255 255 255
      FONT fritqat
      TYPE truetype
      SIZE 0
      PARTIALS false
    END
  END
  METADATA
    "WMS_TITLE" "RoadSegments"
    "WMS_ABSTRACT" "RoadSegments layer."
    "WMS_SRS" "EPSG:4326"
  END
END #Layer

LAYER
  NAME Streams
  TYPE LINE
  STATUS ON
  DATA Streams
  PROJECTION
    "init=epsg:4326"
  END
  LABELITEM "NAME"
  CLASS
    NAME "Streams"
    COLOR 0 0 205
    OUTLINECOLOR 199 199 199
    SYMBOL 'circle'
    SIZE 2
    LABEL
      ANGLE AUTO
      COLOR  0 0 205
      BACKGROUNDCOLOR 255 255 255
      FONT fritqat-italic
      TYPE truetype
      SIZE 10
      POSITION UC
      PARTIALS FALSE
      OFFSET 30 5
    END
  END
  METADATA
    "WMS_TITLE" "cite:Streams"
    "WMS_ABSTRACT" "Streams layer."
    "WMS_SRS" "EPSG:4326"
  END
END # layer

LAYER
  NAME Forests
  TYPE POLYGON
#  STATUS ON
  STATUS DEFAULT
  DATA Forests
  PROJECTION
    "init=epsg:4326"
  END
  TEMPLATE "forests.html"
  CLASS
    NAME "Forests"
    COLOR 0 150 0
    OUTLINECOLOR 0 0 0
    MINSIZE 4
    #SYMBOL "sapin"
    SYMBOL "tree-gif"
    SIZE 90
#    OVERLAYSYMBOL "square"
#    OVERLAYSIZE 50
#    OVERLAYCOLOR -1 -1 -1
    TEXT "State | Forest"
    LABEL
      ANGLE AUTO
      COLOR  0 0 0
      BACKGROUNDCOLOR 255 255 255
      FONT fritqat
      TYPE truetype
      SIZE 18
      POSITION AUTO
      PARTIALS FALSE
      WRAP "|"
      OFFSET 100 -60
    END
  END
  METADATA
    "WMS_TITLE" "cite:Forests"
    "WMS_ABSTRACT" "Forests layer."
    "WMS_SRS" "EPSG:4326"
  END
END # layer

LAYER
  NAME Bridges
  TYPE POINT
  STATUS ON
  DATA Bridges
  PROJECTION
    "init=epsg:4326"
  END
  LABELITEM "NAME"
  CLASS
    NAME "Bridges"
    COLOR 0 0 0
    SYMBOL 'bridge'
    SIZE 40
    LABEL
      ANGLE AUTO
      COLOR  0 0 0
      FONT fritqat-italic
      TYPE truetype
      SIZE 10
      POSITION AUTO
      PARTIALS FALSE
      OFFSET 20 -8
    END
  END
  METADATA
    "WMS_TITLE" "cite:Bridges"
    "WMS_ABSTRACT" "Bridges layer."
    "WMS_SRS" "EPSG:4326"
  END
END # layer

LAYER
  NAME Lakes
  TYPE POLYGON
  STATUS ON
  DATA Lakes
  PROJECTION
    "init=epsg:4326"
  END
  TEMPLATE "lakes.html"
  CLASS
    NAME "Lakes"
    COLOR 0 0 205
    SIZE 8
    TEXT "BLUE | LAKE"
    LABEL
      ANGLE AUTO
      COLOR  255 255 255
      FONT fritqat
      TYPE truetype
      SIZE 9
      POSITION LL
      PARTIALS FALSE
      WRAP "|"
      OFFSET 15 -10
      FORCE true
    END
  END
  METADATA
    "WMS_TITLE" "cite:Lakes"
    "WMS_ABSTRACT" "Lakes layer."
    "WMS_SRS" "EPSG:4326"
  END
END # layer

LAYER
  NAME Buildings
  TYPE POLYGON
  STATUS ON
  DATA Buildings
  PROJECTION
    "init=epsg:4326"
  END
  TEMPLATE "buildings.html"
  CLASS
    NAME "Buildings"
    COLOR 255 255 255
    OUTLINECOLOR 0 0 0
  END
  METADATA
    "WMS_TITLE" "cite:Buildings"
    "WMS_ABSTRACT" "Buildings layer."
    "WMS_SRS" "EPSG:4326"
  END
END # layer
 
LAYER
  NAME BuildingCenters
  TYPE POINT
  STATUS ON
  DATA BuildingCenters
  PROJECTION
    "init=epsg:4326"
  END
  CLASS
    NAME "BuildingCenters"
    COLOR 0 0 0
    SYMBOL 'circle'
    SIZE 4
  END
  METADATA
    "WMS_TITLE" "cite:BuildingCenters"
    "WMS_ABSTRACT" "BuildingCenters layer."
    "WMS_SRS" "EPSG:4326"
  END
END # layer
 
END # Map File  


nicolas.fortin at ec.gc.ca wrote:

>Hi Heryk,
>
>Only the layer 1 is set to default, all other are set to OFF.  I thought
>that doesn't matter in WMS cause you only got the layers you are querying.
>
>I set layer 1 to ON and 
>1- try LAYERS=2,1 and only got layer 2
>2- try LAYERS=1 and got nothing
>
>I set layer 1 to OFF (like the others) and 
>1- try LAYERS=2,1 and only got layer 2
>2- try LAYERS=1 and got nothing
>
>Weird...
>Nick
>
>-----Message d'origine-----
>De : Julien, Heryk [mailto:hjulien at nrcan.gc.ca] 
>Envoyé : Monday, January 12, 2004 4:00 PM
>À : 'nicolas.fortin at ec.gc.ca'
>Objet : RE: [Mapserver-users] WMS LAYERS=
>
>
>Hi,
>Are your layers set to "default" in the mapfile? Is so, you will be calling
>layers 1,2 and all the layers that are set to default! So your might be
>calling layers 1 and 2 a second time around! Try setting them to "ON".
>
>Bonne chance!
>Héryk
>
>
>-----Message d'origine-----
>De : nicolas.fortin at ec.gc.ca [mailto:nicolas.fortin at ec.gc.ca] Envoyé :
>Monday, January 12, 2004 3:30 PM À : mapserver-users at lists.gis.umn.edu Objet
>: [Mapserver-users] WMS LAYERS=
>
>
>Hi list,
>
>When I make a WMS request with the layers parameters like LAYERS=2,1
>
>In accordance to the OGC WMS Spec, layer 1 is suppose to be at the top of
>layer 2 but it isn't the case...why??
>
>Even if I change to LAYERS=1,2 ... no change
>
>In the mapfile, layer 1 is at the end of the file and is always the top
>layer on others applications using this mapfile.
>
>
>Thx for your help,
>
>Nicolas Fortin 
>Mathématicien, Programmeur, Analyste de données 
>SMC-Québec Hydrologie, Environnement Canada 
>1141, Rte de l'Église, Sainte-Foy(QC) G1V 4H5 
>(418)648-2516 
>nicolas.fortin at ec.gc.ca <mailto:nicolas.fortin at ec.gc.ca> 
>
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>  
>





More information about the mapserver-users mailing list