FAQs
Zeige die ganze FAQ Zum InhaltsverzeichnisOGC
Which OGC Specifications does MapServer support?
Which OGC specifications does MapServer support?
- Web Map Service (OGC:WMS) 1.0.0, 1.0.7, 1.1.0 and 1.1.1
- Web Feature Service (OGC:WFS) 1.0.0, 1.1.0
- Web Coverage Service (OGC:WCS) 1.0.0, 1.1.0
- Geography Markup Language (OGC:GML) 2.1.2, 3.1.0 Level 0 Profile
- Web Map Context Documents (OGC:WMC) 1.0.0, 1.1.0
- Styled Layer Descriptor (OGC:SLD) 1.0.0
- Filter Encoding Specification (OGC:FES) 1.0.0
- Sensor Observation Service (OGC:SOS) 0.1.2b, 1.0.0
- OWS Common (OGC:OWS) 1.0.0, 1.1.0
Diese FAQ betrifft: MapServer 4.6, MapServer 4.8, MapServer 4.10, MapServer 5.0
Why does my requested WMS layer not align correctly?
Requesting a layer from some ArcIMS WMS connectors results in a map with misalgned data (the aspect ratio of the pixels looks wrong).
Some ArcIMS sites are not set up to stretch the returned image to fit the requested envelope by default. This results in a map with data layers that overlay well in the center of the map, but not towards the edges. This can be solved by adding "reaspect=false" to the request (by tacking it on to the connection string).
For example, if your mapfile is in a projection other than EPSG:4326, the following layer will not render correcly:
LAYER
NAME "hillshade"
TYPE RASTER
STATUS OFF
TRANSPARENCY 70
CONNECTIONTYPE WMS
CONNECTION "http://gisdata.usgs.net:80/servlet19/com.esri.wms.Esrimap/USGS_WMS_NED?"
PROJECTION
"init=epsg:4326"
END
METADATA
"wms_srs" "EPSG:4326"
"wms_title" "US_NED_Shaded_Relief"
"wms_name" "US_NED_Shaded_Relief"
"wms_server_version" "1.1.1"
"wms_format" "image/png"
END
END
Adding "reaspect=false" to the connection string solves the problem:
LAYER
NAME "hillshade"
TYPE RASTER
STATUS OFF
TRANSPARENCY 70
CONNECTIONTYPE WMS
CONNECTION "http://gisdata.usgs.net:80/servlet19/com.esri.wms.Esrimap/USGS_WMS_NED?reaspect=false"
PROJECTION
"init=epsg:4326"
END
METADATA
"wms_srs" "EPSG:4326"
"wms_title" "US_NED_Shaded_Relief"
"wms_name" "US_NED_Shaded_Relief"
"wms_server_version" "1.1.1"
"wms_format" "image/png"
END
END
When I do a GetCapabilities, why does my browser want to download mapserv.exe/mapserv?
A beginner question here... I'm new to MS and to Apache. I've got MS4W up and running with the Itasca demo. Now I want to enable it as a WMS server. mapserv -v at the command line tells me it supports WMS_SERVER. When I point my browser to it, my browser just wants to download mapserv.exe! What am I missing? Here is the URL I'm using to issue a GetCapabilities WMS request: http://localhost/cgi-bin/mapserv.exe?map=../htdocs/itasca/demo.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
The OGC:WMS 1.1.0 and 1.1.1 specifications (which are both supported by MapServer) state that, for GetCapabilities responses, the OGC:WMS server returns a specific MIME type (i.e. application/vnd.ogc.xml (see subclause 6.5.3 of OGC:WMS 1.1.1.
A MIME type is passed from the web server to the client (in your case, a web browser), from which a client can decide how to process it.
Example 1: if using a web browser, if a web server returns an HTTP Header of "Content-type:image/png", then the web browser will know that this is a PNG image and display it accordingly.
Example 2: if using a web browser, if a web server returns an HTTP Header of "Content-type:text/html", then the web browser will know that this is an HTML page and display it accordingly (i.e. tables, divs, etc.)
Basically, what is happening is that the OGC:WMS is returning, in the headers of the HTTP response, a MIME type which your web browser does not understand, which usually prompts a dialog box on whether to open or download the content (i.e. Content-type:application/vnd.ogc.wms_xml).
You could configure your web browser to handle the application/vnd.ogc.wms_xml MIME type a certain way (i.e. open in Notepad, etc.).
Diese FAQ betrifft: MapServer 4.0, MapServer 4.2, MapServer 4.4, MapServer 4.6, MapServer 4.8, MapServer 4.10
Why do my WMS GetMap requests return exception using MapServer 5.0?
Before upgrading to MapServer 5.0, I was able to do quick GetMap tests in the form of: http://wms.example.com/wms?service=WMS&version=1.1.1&request=GetMap&layers=foo Now when I try the same test, MapServer WMS returns an XML document saying something about missing required parameters. What's going on here?
This was a major change for WMS Server support in MapServer 5.0. MapServer WMS Server GetMap requests now require the following additional parameters:
- srs
- bbox
- width
- height
- format
- styles
Note that these parameters were always required in all versions of the WMS specification, but MapServer previously had not required them in a client request (even though most OGC WMS clients would issue them anyway to be consistent with the WMS spec).
The request below now constitutes a valid GetMap request:
http://wms.example.com/wms?service=WMS&version=1.1.1&request=GetMap&layers=foo&srs=EPSG:4326&bbox=-180,-90,180,90&format=image/png&width=400&height=300&styles=default
Which is consistent with the WMS specification.
More information on these parameters can be found in the WMS Server howto and the OGC WMS 1.1.1 specification
For more detailed information, see ticket 1088
UPDATE: STYLES, though a required WMS parameter, is now optional again in MapServer. For more detailed inforamation, see ticket 2427
Diese FAQ betrifft: MapServer 5.0