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

2011-10-31 Thread Rahkonen Jukka
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,@default:NAME_EN@de:NAME_DE@it:NAME_IT@fr:NAME_FR@br:NAME_BR@es:NAME_ES,@default:CAPITAL_EN@de:CAPITAL_DE@it:CAPITAL_IT@fr:CAPITAL_FR@br:CAPITAL_BR@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 "cities1eu"
  TYPE point
  DATA "cities1eu"
  TOLERANCE 6
  TOLERANCEUNITS pixels
  LABELITEM "NAME"
  LABELMAXSCALE 800
  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] > 100)
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] <= 100 AND [POPULATION] > 50)
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] <= 50 AND [POPULATION] > 10)
COLOR 255 0 0
SYMBOL 'square'
SIZE 5
  END  # Class
  CLASS
NAME "50'000 - 100'000"
EXPRESSION ([POPULATION] <= 10 AND [POPULATION] > 5)
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,@default:NAME_EN@de:NAME_DE@it:NAME_IT@fr:NAME_FR@br:NAME_BR@es:NAME_ES,@default:CAPITAL_EN@de:CAPITAL_DE@it:CAPITAL_IT@fr:CAPITAL_FR@br:CAPITAL_BR@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 "cities1eu"
  TYPE point
  DATA "cities1eu"
  TOLERANCE 6
  TOLERANCEUNITS pixels
  LABELITEM "NAME"
  LABELMAXSCALE 800
  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] > 100)
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"
EXPRE

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

2011-10-31 Thread goldalworming
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,@default:NAME_EN@de:NAME_DE@it:NAME_IT@fr:NAME_FR@br:NAME_BR@es:NAME_ES,@default:CAPITAL_EN@de:CAPITAL_DE@it:CAPITAL_IT@fr:CAPITAL_FR@br:CAPITAL_BR@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 "cities1eu" 
  TYPE point
  DATA "cities1eu"
  TOLERANCE 6
  TOLERANCEUNITS pixels
  LABELITEM "NAME"
  LABELMAXSCALE 800
  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] > 100)
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] <= 100 AND [POPULATION] > 50)
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] <= 50 AND [POPULATION] > 10)
COLOR 255 0 0
SYMBOL 'square' 
SIZE 5
  END  # Class
  CLASS
NAME "50'000 - 100'000"
EXPRESSION ([POPULATION] <= 10 AND [POPULATION] > 5)
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,@default:NAME_EN@de:NAME_DE@it:NAME_IT@fr:NAME_FR@br:NAME_BR@es:NAME_ES,@default:CAPITAL_EN@de:CAPITAL_DE@it:CAPITAL_IT@fr:CAPITAL_FR@br:CAPITAL_BR@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 "cities1eu" 
  TYPE point
  DATA "cities1eu"
  TOLERANCE 6
  TOLERANCEUNITS pixels
  LABELITEM "NAME"
  LABELMAXSCALE 800
  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] > 100)
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] <= 100 AND [POPULATION] > 50)
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] <= 50 AND [