WMS输出格式

WMS以多种可能的格式返回图像。此页显示输出格式的列表。设置输出格式的语法为:

format=<format>

在哪里? <format> 是以下任何选项。

备注

WMS可以找到地理服务器实例支持的输出格式列表。 GetCapabilities 请求。

Format

Syntax

Notes

PNG

format=image/png

违约

PNG8型

format=image/png8

与PNG相同,但计算最佳256色(8位)调色板,因此图像大小通常较小

JPEG

format=image/jpeg

JPEG-PNG格式

format=image/vnd.jpeg-png

一种自定义格式,根据图像内容动态决定是否最好使用jpeg或png压缩。如果图像完全不透明且不加调色板,则返回jpeg格式的图像。为了以有意义的方式使用此格式,getmap必须包含一个“&transparent=true”参数,因为如果没有它,geoserver将使用默认/请求的背景色生成不透明图像,使此格式始终返回jpeg图像(或始终返回png,如果它们被调色板)。使用层预览测试此格式时,请记住向预览URL添加“&transparent=true”,因为通常预览会生成非透明图像。

jpeg-png8格式

format=image/vnd.jpeg-png8

与jpeg-png相同,但如果选择png格式,则生成一个调色板输出

GIF

format=image/gif

TIFF

format=image/tiff

TIFF第8页

format=image/tiff8

与TIFF相同,但计算最佳256色(8位)调色板,因此图像大小通常较小

GeoTIFF

format=image/geotiff

与TIFF相同,但包含额外的geotiff元数据

地理信息8

format=image/geotiff8

与TIFF相同,但包含额外的geotiff元数据,并计算最佳256色(8位)调色板,因此图像大小通常较小

SVG

format=image/svg

PDF

format=application/pdf

地理信息系统

format=rss

KML

format=kml

KMZ

format=kmz

OpenLayers

format=application/openlayers

生成Openlayers HTML应用程序。

UTFGrid

format=application/json;type=utfgrid

生成一个 UTFGrid 1.3 JSON响应。需要从矢量层或从栅格层通过渲染转换转换为矢量的矢量输出。