Output formats |
The response to a Web Map Service request is always a computer file that is transferred over the Internet from the server to the client. The file may contain text, or the file may represent a map image. The type of the returned file shall be indicated by a MIME type string.
Text output formats are usually formatted as Extensible Markup Language (XML; MIME type text/xml). Text formats are used to convey service metadata, descriptions of error conditions, or responses to queries for information about features shown on a map.
Allowed map formats are either "picture" formats or "graphic element" formats. Picture formats constitute a rectangular pixel array of fixed size. Picture formats include file types such as Graphics Interchange Format (GIF; MIME type "image/gif"), Portable Network Graphics (PNG; MIME type "image/png"), Joint Photographics Expert Group (JPEG; MIME type "image/jpeg"), all of which can be displayed by common Web browsers, and file types such as Tagged Image File Format (TIFF: MIME type "image/tiff") that may require additional software (beyond a basic Web browser) for display. Graphic element formats constitute a scale-independent description of the graphic elements to be displayed (including points, lines, curves, text and images), such that the size of the display may be modified while preserving the relative arrangement of the graphic elements. Graphic element formats include Scalable Vector Graphics (SVG; MIME type "image/svg+xml") or Web Computer Graphics Metafile (WebCGM; MIME type "image/cgm;Version=4;ProfileId=WebCGM") formats.
A server may offer multiple map formats. The formats it offers are enumerated in <Formate> elements in its service metadata. Use of a specific format is not required by this International Standard. However, for maps that portray vector features the server should offer at least one format that supports transparency in order that maps may be overlaid without obscuring other maps below. Also, for ease of use, the server should offer at least one format that can be displayed by common Web browsers without additional software. Based on these considerations, the server should offer at least the PNG format.