[Mapbender-users] Invalid SRS given

Steffen Gebhardt steffen_gebhardt at gmx.net
Mon Sep 17 08:22:43 EDT 2007


Hallo,

I try to connect a wms to a mapbender gui. It seems my wms capabilities are parsed wrongly and i get the "invalid SRS given" error.
In detail:
I have a mapserver application running fine either classical with html template as well as wms including styling from sld using the url: http://localhost/cgi-bin/mapserv.exe?&map=%2Fms4w%2FApache%2Fhtdocs%2Fmd%2Fmd.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&layers=districts&SLD=http://localhost/sld/style.sld

When I try to import the wms the defined coordinate systems for each layer are parsed wrongly. Actually I defined ebsg:32648 for each layer but mapbender assigns epsg:4326.

please see below my mapfile as well as the capabilities as parsed by mapbender. i have no idea what to do. what is going wrong?

steffen.

id:
version: 1.1.1
title: mywms
abstract:
maprequest: http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/mekongdelta/mekongdelta.map&
capabilitiesrequest: http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/mekongdelta/mekongdelta.map&
featureinforequest: http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/mekongdelta/mekongdelta.map&
gui_wms_mapformat: image/png
gui_wms_featureinfoformat: text/plain
gui_wms_exceptionformat: application/vnd.ogc.se_inimage
gui_wms_epsg: EPSG:4326
wms_srs: EPSG:32648
gui_wms_visible: 1
map -> image/tiff
map -> image/gif
map -> image/png
map -> image/png; mode=24bit
map -> image/jpeg
map -> image/wbmp
featureinfo -> text/plain
featureinfo -> application/vnd.ogc.gml
exception -> application/vnd.ogc.se_xml
exception -> application/vnd.ogc.se_inimage
exception -> application/vnd.ogc.se_blank
id: 0 parent: name: WISDOM title: wisdomwms queryable: 0 minScale: 100 maxScale: 0
dataurl:
metadataurl:
EPSG:4326	104.176	8.59002	106.83	10.9459
layerstyle:
name	title	legendurl	legendurlformat
id: 1 parent: 0 name: watermaskocean title: watermaskocean queryable: 0 minScale: 0 maxScale: 0
dataurl:
metadataurl:
EPSG:4326	104.176	8.59002	106.83	10.9459
layerstyle:
name	title	legendurl	legendurlformat
id: 2 parent: 0 name: watermask title: watermask queryable: 0 minScale: 0 maxScale: 0
dataurl:
metadataurl:
EPSG:4326	104.176	8.59002	106.83	10.9459
layerstyle:
name	title	legendurl	legendurlformat
id: 3 parent: 0 name: landsatrgb title: landsatrgb queryable: 0 minScale: 0 maxScale: 0
dataurl:
metadataurl:
EPSG:4326	104.176	8.59002	106.83	10.9459
layerstyle:
name	title	legendurl	legendurlformat
id: 4 parent: 0 name: districts title: districts queryable: 0 minScale: 0 maxScale: 0
dataurl:
metadataurl:
EPSG:4326	-174.683	-8.2419e+012	169.723	8.2419e+012
layerstyle:
name	title	legendurl	legendurlformat
default	default	http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/mekongdelta/mekongdelta.map&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=districts&format=image/png	image/png
id: 5 parent: 0 name: rivers title: rivers queryable: 0 minScale: 0 maxScale: 0
dataurl:
metadataurl:
EPSG:4326	-174.683	-8.2419e+012	169.723	8.2419e+012
layerstyle:
name	title	legendurl	legendurlformat
default	default	http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/mekongdelta/mekongdelta.map&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=rivers&format=image/png	image/png
id: 6 parent: 0 name: landuse title: landuse queryable: 0 minScale: 0 maxScale: 0
dataurl:
metadataurl:
EPSG:4326	-174.683	-8.2419e+012	169.723	8.2419e+012
layerstyle:
name	title	legendurl	legendurlformat
default	default	http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/mekongdelta/mekongdelta.map&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=landuse&format=image/png	image/png
id: 7 parent: 0 name: adminbound title: adminbound queryable: 0 minScale: 0 maxScale: 0
dataurl:
metadataurl:
EPSG:4326	-174.683	-8.2419e+012	169.723	8.2419e+012
layerstyle:
name	title	legendurl	legendurlformat
default	default	http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/mekongdelta/mekongdelta.map&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=adminbound&format=image/png	image/png
id: 8 parent: 0 name: cities title: cities queryable: 0 minScale: 0 maxScale: 0
dataurl:
metadataurl:
EPSG:4326	-174.683	-8.2419e+012	169.723	8.2419e+012
layerstyle:
name	title	legendurl	legendurlformat
default	default	http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/mekongdelta/mekongdelta.map&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=cities&format=image/png	image/png




the mapfile.:
NAME WISDOM
STATUS ON
SIZE 500 500

EXTENT 410000 950000 700000 1210000
UNITS METERS
		
SHAPEPATH "data"


IMAGECOLOR 255 255 255
IMAGETYPE png24
OUTPUTFORMAT
NAME GTiff
MIMETYPE "image/tiff"
DRIVER "GDAL/GTiff"
IMAGEMODE RGB
EXTENSION "tif"
END


WEB
TEMPLATE gistemplate.html
MINSCALE 100
MAXSCALE 5000000
IMAGEPATH "tmp/"
#IMAGEURL "d:/tmp/mapserv/"
IMAGEURL "/mekongdelta/tmp/"

METADATA
	"wms_title" "wisdomwms"
	"wms_onlineresource" "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/mekongdelta/mekongdelta.map&"
	"wms_srs" "EPSG:32648"
	"wms_server_version" "1.1.1"
	"wms_format" "image/gif"
END

END


PROJECTION
	"init=EPSG:32648"
END


REFERENCE
	IMAGE graphics/reference.png
	EXTENT 372559.25 946472.875 697129.3125 1219340.125
	SIZE 162 127
	STATUS ON
	COLOR -1 -1 -1
	OUTLINECOLOR 255 0 0
END

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

SCALEBAR
	LABEL
		COLOR 0 0 0
		SIZE 0
	END
	STYLE 0
	OUTLINECOLOR 0 0 0
	UNITS KILOMETERS
	INTERVALS 2
	TRANSPARENT TRUE
	STATUS TRUE
END


SYMBOL
  NAME 'circle'
  TYPE ellipse
  FILLED true
  POINTS
    1 1
  END
END



#RS data--------------------------------------------------------------
LAYER # Water mask with ocean
	NAME         watermaskocean
	DATA         "watermask_black_p125r053_2.tif"
	STATUS       ON
	TYPE         RASTER
	PROCESSING "SCALE=AUTO"
	UNITS Meters
    	#DUMP TRUE
	#OFFSITE      0 0 0
	METADATA
		wms_title "watermaskocean"
		wms_srs "EPSG:32648"
	END
END # 

LAYER # Water mask
	NAME         watermask
	DATA         "watermask_black_p125r053_1.tif"
	STATUS       ON
	TYPE         RASTER
	PROCESSING "SCALE=AUTO"
	UNITS Meters
    	#DUMP TRUE
	#OFFSITE      0 0 0
	  CLASSITEM "[pixel]"
	  # class using simple string comparison, equivelent to ([pixel] = 0)
	  CLASS
	    EXPRESSION ([pixel] < 1)
	    STYLE
	      COLOR 0 200 0
	    END
  	END
	METADATA
		wms_title "watermask"
		wms_srs "EPSG:32648"
	END
END # 


LAYER # Landsat image
	NAME         landsatrgb
	DATA         "p125r053.tif"
	STATUS       ON
	TYPE         RASTER
	PROCESSING "SCALE=AUTO"
	PROCESSING "BANDS=5,3,2"
	UNITS Meters
    	#DUMP TRUE
	OFFSITE      0 0 0
	METADATA
		wms_title "landsatrgb"
		wms_srs "EPSG:32648"
	END
END # 



#vector data----------------------------------------------------------
LAYER
	NAME "districts"
	CONNECTIONTYPE postgis
	CONNECTION "user=postgres password=postgresadmin dbname=mapbender host=localhost port=5432"
	DATA "the_geom from districts"
	STATUS ON
	TYPE POLYGON
	#PROJECTION
	#	"init=EPSG:32648"
	#END

	METADATA
		wms_title "districts"
		wms_srs "EPSG:32648"
		wms_sld_url "http://localhost/sld/style.sld"
	END
  
	CLASS
		NAME "Districts"
		COLOR 0 0 190
		OUTLINECOLOR 10 0 200 
	END

END

LAYER
	NAME "rivers"
	CONNECTIONTYPE postgis
	CONNECTION "user=postgres password=postgresadmin dbname=mapbender host=localhost port=5432"
	DATA "the_geom from rivers"
	STATUS ON
	TYPE POLYGON
	PROJECTION
		"init=EPSG:32648"
	END

	METADATA
		wms_title "rivers"
		wms_srs "EPSG:32648"
		wms_sld_url "http://localhost/sld/style.sld"
	END
  
	CLASS
		NAME "Rivers"
		COLOR 0 0 190
		OUTLINECOLOR 10 0 200 
	END

END

LAYER
	NAME "landuse"
	CONNECTIONTYPE postgis
	CONNECTION "user=postgres password=postgresadmin dbname=mapbender host=localhost port=5432"
	DATA "the_geom from landuse"
	STATUS ON
	TYPE POLYGON
	PROJECTION
		"init=EPSG:32648"
	END
	CLASS
		NAME "Landuse"
		COLOR 0 0 190
		OUTLINECOLOR 10 0 200 
	END 
	METADATA
			wms_title "landuse"
			wms_srs "EPSG:32648"
			wms_sld_url "http://localhost/sld/style.sld"
	END
END

LAYER
	NAME "adminbound"
	CONNECTIONTYPE postgis
	CONNECTION "user=postgres password=postgresadmin dbname=mapbender host=localhost port=5432"
	DATA "the_geom from adminbound"
	STATUS ON
	TYPE LINE
	PROJECTION
		"init=EPSG:32648"
	END
	CLASS
		NAME "Boundaries"
		COLOR 0 100 190
		 
	END   
	METADATA
		wms_title "adminbound"
		wms_srs "EPSG:32648"
		wms_sld_url "http://localhost/sld/style.sld"
	END
END

LAYER
	NAME "cities"
	CONNECTIONTYPE postgis
	CONNECTION "user=postgres password=postgresadmin dbname=mapbender host=localhost port=5432"
	DATA "the_geom from cities"
	STATUS ON
	TYPE POINT
	PROJECTION
		"init=EPSG:32648"
	END
	CLASS
		NAME "Cities"
		TYPE CIRCLE
		SYMBOL 'circle'
		  COLOR 0 255 0
		  SIZE 3
	END   
	METADATA
		wms_title "cities"
		wms_srs "EPSG:32648"
		wms_sld_url "http://localhost/sld/style.sld"
	END
END




		
		

END # end of map



-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail


More information about the Mapbender_users mailing list