[mapserver-users] got error in some pmapper_demodata as WMS

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Tue Nov 1 00:55:05 EDT 2011


Hi,

Demo application must be using wrong name for the cities1000eu.  Two things to do
- Read from the Apache access.log file the failing WMS request. It is perhaps at /var/log/apache2
- The reason is probably that you have "ows_title"      "cities1000" but the layer name is cities1000eu.  With those settings the name that should be used in GetMap &LAYERS= is "cities1000".

-Jukka Rahkonen-

goldalworming wrote:

> hi, I'm learning open layer and tried to use map server as wms service in my
> ubuntu
> in pmapper_demodata, 3 layers exist : countries, cities1000eu and rivers

> my error log shows this error while I tried to accesing cities1000eu layers
> but works fine in countries and rivers layer

[Tue Nov  1 07:03:56 2011].166194 msWMSLoadGetMapParams(): WMS server error.
Invalid layer(s) given in the LAYERS parameter.

this is the mapfile

LAYER
  NAME "countries"
  TYPE polygon
  DATA "countries"
  TRANSPARENCY 30
  TEMPLATE void
  PROJECTION
    #"init=epsg:4326"
    "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs"
  END
  METADATA
    "DESCRIPTION" "Countries"
    ## ADAPTED TO MULTILINGUAL SHAPEFILE
    "RESULT_FIELDS"
"ISOCODE, at default:NAME_EN at de:NAME_DE at it:NAME_IT at fr:NAME_FR at br:NAME_BR at es:NAME_ES, at default:CAPITAL_EN at de:CAPITAL_DE at it:CAPITAL_IT at fr:CAPITAL_FR at br:CAPITAL_BR at es:CAPITAL_ES,AREA_KM2,POPULATION"
    "RESULT_HEADERS" "ISO Code,Name,Capital,Area,Population"
    "ows_title"      "countries"
    "ows_enable_request"   "*"
    "wms_srs" "EPSG:4326 EPSG:4030"
  END  # Metadata
  CLASS
    Name 'Countries'
    COLOR 200 254 199
    OUTLINECOLOR 0 0 0
  END  # Class
END  # Layer



LAYER
  NAME "cities10000eu"
  TYPE point
  DATA "cities10000eu"
  TOLERANCE 6
  TOLERANCEUNITS pixels
  LABELITEM "NAME"
  LABELMAXSCALE 8000000
  TEMPLATE void
  PROJECTION
    #"init=epsg:4326"
    "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs"
  END
  METADATA
    "DESCRIPTION" "Cities"
    "RESULT_FIELDS" "NAME, ISO2_CODE, POPULATION, GTOPO30"
    "RESULT_HEADERS" "Name,Country,Inhabitants,Altitude"
    "RESULT_HYPERLINK" "NAME"
    "LAYER_ENCODING" "UTF-8"
    "ows_title"      "cities1000"
    "ows_enable_request"   "*"
    "wms_srs" "EPSG:4326 EPSG:4030"

  END  # Metadata

  CLASS
    NAME "> 1'000'000"
    EXPRESSION ([POPULATION] > 1000000)
    COLOR 255 0 0
    OUTLINECOLOR 0 0 0
    SYMBOL 'square'
    SIZE 9
    LABEL
      POSITION Auto
      COLOR 0 0 150
      BUFFER 2
      TYPE truetype
      ENCODING "UTF-8"
      FONT FreeSans
      SIZE 8
      MAXSIZE 9
      #SIZE small
    END #Label
  END  # Class
  CLASS
    NAME "500'000 - 1'000'000"
    EXPRESSION ([POPULATION] <= 1000000 AND [POPULATION] > 500000)
    COLOR 255 0 0
    SYMBOL 'circle'
    SIZE 8
    LABEL
      POSITION Auto
      COLOR 0 0 150
      BUFFER 2
      TYPE truetype
      ENCODING "UTF-8"
      FONT FreeSans
      SIZE 8
      MAXSIZE 9
      #SIZE small
    END #Label
  END  # Class
  CLASS
    NAME "100'000 - 500'000"
    EXPRESSION ([POPULATION] <= 500000 AND [POPULATION] > 100000)
    COLOR 255 0 0
    SYMBOL 'square'
    SIZE 5
  END  # Class
  CLASS
    NAME "50'000 - 100'000"
    EXPRESSION ([POPULATION] <= 100000 AND [POPULATION] > 50000)
    COLOR 0 0 0LAYER
  NAME "countries"
  TYPE polygon
  DATA "countries"
  TRANSPARENCY 30
  TEMPLATE void
  PROJECTION
    #"init=epsg:4326"
    "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs"
  END
  METADATA
    "DESCRIPTION" "Countries"
    ## ADAPTED TO MULTILINGUAL SHAPEFILE
    "RESULT_FIELDS"
"ISOCODE, at default:NAME_EN at de:NAME_DE at it:NAME_IT at fr:NAME_FR at br:NAME_BR at es:NAME_ES, at default:CAPITAL_EN at de:CAPITAL_DE at it:CAPITAL_IT at fr:CAPITAL_FR at br:CAPITAL_BR at es:CAPITAL_ES,AREA_KM2,POPULATION"
    "RESULT_HEADERS" "ISO Code,Name,Capital,Area,Population"
    "ows_title"      "countries"
    "ows_enable_request"   "*"
    "wms_srs" "EPSG:4326 EPSG:4030"
  END  # Metadata
  CLASS
    Name 'Countries'
    COLOR 200 254 199
    OUTLINECOLOR 0 0 0
  END  # Class
END  # Layer



LAYER
  NAME "cities10000eu"
  TYPE point
  DATA "cities10000eu"
  TOLERANCE 6
  TOLERANCEUNITS pixels
  LABELITEM "NAME"
  LABELMAXSCALE 8000000
  TEMPLATE void
  PROJECTION
    #"init=epsg:4326"
    "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs"
  END
  METADATA
    "DESCRIPTION" "Cities"
    "RESULT_FIELDS" "NAME, ISO2_CODE, POPULATION, GTOPO30"
    "RESULT_HEADERS" "Name,Country,Inhabitants,Altitude"
    "RESULT_HYPERLINK" "NAME"
    "LAYER_ENCODING" "UTF-8"
    "ows_title"      "cities1000"
    "ows_enable_request"   "*"
    "wms_srs" "EPSG:4326 EPSG:4030"

  END  # Metadata

  CLASS
    NAME "> 1'000'000"
    EXPRESSION ([POPULATION] > 1000000)
    COLOR 255 0 0
    OUTLINECOLOR 0 0 0
    SYMBOL 'square'
    SIZE 9
    LABEL
      POSITION Auto
      COLOR 0 0 150
      BUFFER 2
      TYPE truetype
      ENCODING "UTF-8"
      FONT FreeSans
      SIZE 8
      MAXSIZE 9
      #SIZE small
    END #Label
  END  # Class
  CLASS
    NAME "500'000 - 1'000'000"
    EXPRESSION ([POPULATION] <= 1000000 AND [POPULATION] > 500000)
    COLOR 255 0 0
    SYMBOL 'circle'
    SIZE 8
    LABEL
      POSITION Auto
      COLOR 0 0 150
      BUFFER 2
      TYPE truetype
      ENCODING "UTF-8"
      FONT FreeSans
      SIZE 8
      MAXSIZE 9
      #SIZE small
    END #Label
  END  # Class
  CLASS
    NAME "100'000 - 500'000"
    EXPRESSION ([POPULATION] <= 500000 AND [POPULATION] > 100000)
    COLOR 255 0 0
    SYMBOL 'square'
    SIZE 5
  END  # Class
  CLASS
    NAME "50'000 - 100'000"
    EXPRESSION ([POPULATION] <= 100000 AND [POPULATION] > 50000)
    COLOR 0 0 0
    SYMBOL 'square'
    SIZE 4
    #MAXSCALE 20000000
  END  # Class
  CLASS
    NAME "10'000 - 50'000"
    EXPRESSION ([POPULATION] <= 50000 AND [POPULATION] > 10000)
    COLOR 100 100 100
    SYMBOL 'circle'
    SIZE 3
    #MAXSCALE 10000000
  END  # Class

END  # Layer


#
# Start of Layer Rivers.shp
#
LAYER
  NAME "rivers"
  TYPE line
  DATA "rivers"
  TOLERANCE 3
  TOLERANCEUNITS pixels
  TEMPLATE void
  PROJECTION
    #"init=epsg:4326"
    "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs"
  END
  METADATA
    "DESCRIPTION" "Rivers"
    "RESULT_FIELDS" "NAME"
    "RESULT_HEADERS" "Name"
    "ows_title"      "cities"
    "ows_enable_request"   "*"
    "wms_srs" "EPSG:4326 EPSG:4030"
  END  # Metadata
  CLASS
    Name 'Rivers'
    COLOR 0 0 255
  END  # Class
END  # Layer

    SYMBOL 'square'
    SIZE 4
    #MAXSCALE 20000000
  END  # Class
  CLASS
    NAME "10'000 - 50'000"
    EXPRESSION ([POPULATION] <= 50000 AND [POPULATION] > 10000)
    COLOR 100 100 100
    SYMBOL 'circle'
    SIZE 3
    #MAXSCALE 10000000
  END  # Class

END  # Layer


#
# Start of Layer Rivers.shp
#
LAYER
  NAME "rivers"
  TYPE line
  DATA "rivers"
  TOLERANCE 3
  TOLERANCEUNITS pixels
  TEMPLATE void
  PROJECTION
    #"init=epsg:4326"
    "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs"
  END
  METADATA
    "DESCRIPTION" "Rivers"
    "RESULT_FIELDS" "NAME"
    "RESULT_HEADERS" "Name"
    "ows_title"      "cities"
    "ows_enable_request"   "*"
    "wms_srs" "EPSG:4326 EPSG:4030"
  END  # Metadata
  CLASS
    Name 'Rivers'
    COLOR 0 0 255
  END  # Class
END  # Layer


I hope any body could help.
Regards

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/got-error-in-some-pmapper-demodata-as-WMS-tp6950236p6950236.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list