GeoServer Version
2.21.1

一、WMS 服务

  1. 获取服务能力元数据:

  2. GeoServer WMS 服务网址请求示例:

    • bbox、width、height、format、srs(version=1.3.0 时为 crs) 为必选参数,styles 参数不是必选

    • OpenLayers 方式浏览:

      不指定工作空间:
      
      http://172.16.17.127:8066/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=cite:hl_2017&bbox=3.751160022702132E7%2C4433325.154871847%2C3.757928272385144E7%2C4531336.518872064&width=530&height=768&srs=EPSG%3A4525&styles=&format=application/openlayers
      
      指定工作空间:
      
      http://172.16.17.127:8066/geoserver/cite/wms?service=WMS&version=1.1.0&request=GetMap&layers=hl_2017&bbox=3.751160022702132E7%2C4433325.154871847%2C3.757928272385144E7%2C4531336.518872064&width=530&height=768&srs=EPSG%3A4525&styles=&format=application/openlayers
      
    • JPEG 格式浏览:

      不指定工作空间:
      
      http://172.16.17.127:8066/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=cite:hl_2017&bbox=3.751160022702132E7%2C4433325.154871847%2C3.757928272385144E7%2C4531336.518872064&width=530&height=768&srs=EPSG%3A4525&styles=&format=image/jpeg
      
      指定工作空间:
      
      http://172.16.17.127:8066/geoserver/cite/wms?service=WMS&version=1.1.0&request=GetMap&layers=hl_2017&bbox=3.751160022702132E7%2C4433325.154871847%2C3.757928272385144E7%2C4531336.518872064&width=530&height=768&srs=EPSG%3A4525&styles=&format=image/jpeg
      
      
    • PNG 格式浏览:

      不指定工作空间:
      
      http://172.16.17.127:8066/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=cite:FHZTGHXZ&bbox=111.37794952600007%2C40.405213106000076%2C111.94963258800004%2C40.86023666700006&width=768&height=611&srs=EPSG%3A4326&styles=&format=image/png
      
      指定工作空间:
      
      http://172.16.17.127:8066/geoserver/cite/wms?service=WMS&version=1.1.0&request=GetMap&layers=FHZTGHXZ&bbox=111.37794952600007%2C40.405213106000076%2C111.94963258800004%2C40.86023666700006&width=768&height=611&srs=EPSG%3A4326&styles=&format=image/png
      ···
      
      
  3. 平台组织的 WMS 请求网址

    http://172.16.17.127:8066/geoserver/cite/wms?service=WMS&version=1.1.0&request=GetMap&layers=hl_2017&srs=EPSG:4326&format=png&width=256&height=256&styles=&bbox=111.37794952600007%2C40.405213106000076%2C111.94963258800004%2C40.86023666700006

二、WMTS 服务

  1. 获取服务能力的元数据:

    http://172.16.17.127:8066/geoserver/gwc/service/wmts?service=WMTS&request=getCapabilities&virsion=1.0.0

  2. 瓦片访问示例:

    http://172.16.17.127:8066/geoserver/gwc/service/wmts?layer=cite%3Ahl_2017&style=&tilematrixset=EPSG%3A4326&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=EPSG:4326:9&TileCol=829&TileRow=140

  3. GeoServer 发布 ArcGIS 切片服务的过程参考这里,返回的 xml 样例访问示例如下:

    getCapabilities 请求 1.0.0 版本的包含 ArcGIS 切片服务的 xml 样例

    http://localhost:8080/geoserver/gwc/service/wmts?service=WMTS&version=1.0.0&request=GetTile&layer=test&tilematrixset=EPSG:4490_test&format=image/jpeg&tileMatrix=EPSG:4490_test:3&tileRow=6&tileCol=8

    注意:tilematrixset 参数与通过 GeoServer 发布的 WMTS 服务有所不同

  4. 平台组织的 WMTS 请求网址:

    http://localhost:8080/geoserver/gwc/service/wmts?service=WMTS&version=1.0.0&request=GetTile&layer=test&tilematrixset=EPSG:4490_test&format=image/jpeg&tileMatrix=EPSG:4490_test:3&tileRow=6&tileCol=8

三、GeoServer

  1. 管理界面:

    geoserver-管理界面

  2. 存储仓库:数据的存放目录

    geoserver-存储仓库

  3. 工作空间:类似 mxd 文档,对图层进行组织

    geoserver-工作空间 geoserver-工作空间-basic-info geoserver-工作空间-security

  4. 图层:地图数据

    geoserver-图层信息

  5. 图层组:功能类似工作空间,可以添加多个图层的数据

    geoserver-图层组列表

参考:

OGC标准WMTS服务概念与地图商的瓦片编号流派-web地图切片加载