geoserver控制服务访问权限-类似百度地图的key

缘起

如题,想要用geoserver实现一个互联网地图那样的key许可功能,来控制地图服务的访问权限。

最终想要的效果就是类似下图中百度地图那样,申请个key,可以设置这个key能访问哪些地图服务资源,可以设置应用服务器ip白名单

然后把key放到地图API中,就能控制地图服务的访问权限。

可行性分析

要使用geoserver实现上述功能,需要解决下面3个问题:

  1. 如何实现key验证访问?
  2. 如何控制key能访问哪些地图服务?
  3. 如何实现服务器ip白名单?

如何实现key验证访问

geoserver发布的地图服务,默认没有进行权限控制,任何人拿到地址都可以访问地图。

我们想要的效果是,在访问geoserver服务时,需要在参数中增加一个key的参数,有这个key才能访问地图。

这个功能,geoserver是支持的

geoserver有个AuthKey的插件,支持接入外部的身份验证接口,我们可以通过自己编写外部的身份验证接口,来自己生成key、验证key,geoserver只负责转发和获取验证结果。外部接口返回的是geoserver用户名称。

然后再设置一下geoserver的拦截器,规定哪些请求必须要进行上面的验证。

如何控制key能访问哪些地图服务?

key的访问权限是通过geoserver用户的访问权限来设置的,前面验证key时,已经返回了用户名。

用户的权限通过角色控制,所以每次创建key时,需要同时创建用户和角色,并设置角色的访问权限。

这个环节可以使用geoserver的rest控制接口解决,使用rest控制接口可以通过程序自动完成上述配置。

如何实现服务器ip白名单

geoserver 作为一个服务端,它只能获取到客户端的ip,无法获取到应用服务器的ip。

如果想要获取的应用服务器的ip,就需要前端有个内应,这个内应就是js地图api,它可以在客户端的地址栏中获取到应用服务器的ip,然后传给服务端。

具体到geoserver这边,我们还是利用前面外部验证接口,在js地图Api中,把地址栏获取到的应用服务器ip和key拼一起,通过 AuthKey 的外部验证接口转发给自己的后台,后台再将ip提取出来。

地址栏ip和key的拼接,可以使用公钥、私钥模式,js地图api中使用公钥加密,后台使用私钥解密,这样可以避免明文传输ip地址。防止别人串改ip后非法访问地图。

这样就能实现对应用服务器ip的验证了。

流程梳理

好了,现在我们已经完成了可行性分析

接下来我们梳理一下,申请key和使用key访问地图的流程。

申请key

  1. 在申请地图key的页面,输入应用名称、应用部署的服务器ip、勾选需要的地图服务,然后生成个key
  2. 调用geoserver的rest控制接口,创建角色、用户、设置角色可以访问的地图服务
  3. 将key、应用服务器ip和geoserver用户进行关联并保存到数据库

访问地图

  1. 开发地图应用时,把申请到的key传入自己写的js地图api
  2. js地图api内部获取浏览器地址栏ip,这个ip就是应用服务器ip,将ip和key使用公钥加密,生成newkey,并在请求geoserver服务时将newkey作为参数传给geoserver
  3. geoserver的拦截器拦截到请求后,将newkey提取出来,转发给我们自己写的权限验证接口
  4. 权限验证接口接收到newkey后,使用私钥解密,就能获取到key和应用服务器ip,然后去数据库比对是否有符合这两个条件的数据,如果有就返回对应的geoserver用户名
  5. geoserver拦截器接收到验证接口返回的用户名后,查询该用户拥有的角色,再比对角色的权限中是否有本次请求的地图服务。有就返回数据,没有就打回。

这样一整套流程下来,就实现了用geoserver,实现类似互联网地图那样的key验证方式来控制地图的访问权限

实施步骤

接下来详细介绍一下拦截器设置和用户权限设置。

geoserver的拦截器设置一次就行。

key、用户、角色是一一对应的,所以每次新增key时,都要去通过rest接口去新建用户和角色并设置角色的地图访问权限。

拦截器设置

这一步其实就是通过界面来配置geoserver的拦截器,分两步,一是配置访问哪些地址时进行拦截,也就是配置拦截规则,二是配置拦截下来后验证key是否有效,也就是配置验证规则

具体操作为先配置验证规则,再将验证规则添加拦截规则中

配置key验证规则

按下图操作

低版本geoserver可能没有authkey功能,需要去官网下载对应版本的Key authentication插件并手动安装

点击AuthKey后,会出现下图中的界面

“1”那里自己随便填一个,比如就叫做uuid_authkey

“2”那里选择webservice。这个选项的意思是,geoserver会使用外部接口验证key是否有效,到时geoserver会通过get方式将key传给外部接口,外部接口负责验证key是否有效,如果有效就返回用户名。

“3”那里配置外部接口的调用地址,geoserver调用时,会自动将{key}换成真实的key

其它选项保持默认就可以

我用java写了个外部接口的示意代码,来大概说明一下里面的逻辑,其实就是根据key获取geoserver用户名

身份验证设置完以后点击保存按钮,它就会出现在下面的列表中。

配置服务拦截规则

接下来我们配置拦截规则,配置界面如下图:

我们点击最下面的 default

把我们刚才设置的身份验证规则添加到 anonymous 规则前面

这个列表从上到下是身份验证的先后顺序,anonymous 的意思是任何人可以匿名访问,如果把我们新增的规则放到了anonymous 的后面,就不会起作用了。

default里面能拦截wms和wfs请求,但不会拦截wmts和tms请求,我们需要新建一个规则,用来拦截wmts和tms请求。

wmts和tms属于瓦片缓存,归geowebcache管理,geowebcache的网络请求地址为 gwc,所以我们新建拦截规则时,规则设置为/gwc/**,然后将我们的uuid_authkey用户验证规则添加上,名称随便填一个,比如 tile,如下图:

注意:这个页面没有保存按钮,编辑后需要返回上一个界面进行保存。

添加完成后,调整 tile 规则的位置,放到 default 上面,然后保存。

这样就实现了geoserver的key验证。

用户权限设置

这里直接列出需要使用的rest接口地址

名称地址
添加角色http://127.0.0.1:7200/geoserver/rest/security/roles/role/{role}
添加用户http://127.0.0.1:7200/geoserver/rest/security/usergroup/users/
用户指定角色http://127.0.0.1:7200/geoserver/rest/security/roles/role/{role}/user/{user}
设置角色访问权限http://127.0.0.1:7200/geoserver/rest/security/acl/layers

使用rest接口时要注意两点:

1、geoserver的rest接口原则上支持xml和json格式的参数,但实际不一定,如果你用其中一种格式没有成功,这时不要吊死在一棵树上,可以换个格式试试。我就遇到了在添加用户时xml格式好使json格式不好使,但在设置权限时xml格式又不好使,json格式好使。

2、设置角色访问权限接口的参数和文档介绍的有所不同,这里要注意一下,正确的是下面这种:

{
    "workspace.*.r": "rolename"
}

geoserver的rest接口说明:https://www.osgeo.cn/geoserver-user-manual/rest/index.html#rest

我用 Postman 导出了一份儿 java Unirest 的代码,供大家参考:http://gisarmory.xyz/blog/index.html?source=geosreverAuthkey

总结

  1. geoserver用户权限不仅支持对管理界面的控制,还支持对地图服务请求的控制
  2. 地图服务的控制需要结合key验证的方式实现,通过配置geoserver的拦截器和验证规则,可以把key和用户关联起来
  3. geoserver只支持对客户端ip的验证,想要验证应用服务器的ip,需要借助js地图api实现

参考资料:

  1. https://blog.csdn.net/a571574085/article/details/115659432
  2. https://blog.csdn.net/qq_38000851/article/details/113870725
  3. https://www.cnblogs.com/defineconst/p/13884616.html
  4. https://www.cnblogs.com/HandyLi/p/8624507.html
  5. https://www.osgeo.cn/geoserver-user-manual/extensions/geofence-server/index.html
  6. https://www.osgeo.cn/geoserver-user-manual/rest/index.html#rest
  7. https://github.com/geoserver/geofence

原文地址:http://gisarmory.xyz/blog/index.html?blog=geosreverAuthkey

欢迎关注《GIS兵器库

本文章采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。欢迎转载、使用、重新发布,但务必保留文章署名《GIS兵器库》(包含链接: http://gisarmory.xyz/blog/),不得用于商业目的,基于本文修改后的作品务必以相同的许可发布。

  • 2
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
1 Introduction 3 1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Getting involved . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 Installation 7 2.1 Windows installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 Windows binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3 Mac OS X installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.4 Mac OS X binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.5 Linux binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.6 Web archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.7 Upgrading existing versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3 Getting Started 23 3.1 Web Administration Interface Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2 Publishing a Shapefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.3 Publishing a PostGIS Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4 GeoServer Data Directory 43 4.1 Creating a New Data Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.2 Setting the Data Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.3 Structure of the Data Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.4 Migrating a Data Directory between different versions . . . . . . . . . . . . . . . . . . . . . . 49 5 Web Administration Interface 53 5.1 Interface basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5.2 Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.3 Layer Preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 5.4 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 5.5 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5.6 Tile Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 5.7 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 5.8 Demos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 6 Working with Vector Data 155 6.1 Shapefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 6.2 Directory of spatial files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 i 6.3 Java Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 6.4 GML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 6.5 VPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 6.6 Pregeneralized Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 7 Working with Raster Data 165 7.1 GeoTIFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 7.2 GTOPO30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 7.3 WorldImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 7.4 ImageMosaic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 7.5 ArcGrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 7.6 GDAL Image Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 7.7 Oracle Georaster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 7.8 Postgis Raster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 7.9 ImagePyramid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 7.10 Image Mosaic JDBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 7.11 Custom JDBC Access for image data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 7.12 Coverage Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 8 Working with Databases 187 8.1 PostGIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 8.2 H2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 8.3 ArcSDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 8.4 DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 8.5 MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 8.6 Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 8.7 Microsoft SQL Server and SQL Azure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 8.8 Teradata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 8.9 Database Connection Pooling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 8.10 JNDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 8.11 SQL Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 8.12 Controlling feature ID generation in spatial databases . . . . . . . . . . . . . . . . . . . . . . 224 8.13 Custom SQL session start/stop scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 8.14 Using SQL session scripts to control authorizations at the database level . . . . . . . . . . . . 226 9 Working with Application Schemas 229 9.1 Complex Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 9.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 9.3 WFS Service Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 9.4 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 9.5 Mapping File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 9.6 Application Schema Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 9.7 Supported GML Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 9.8 Secondary Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 9.9 CQL functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 9.10 Property Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 9.11 Data Stores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 9.12 Feature Chaining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 9.13 Polymorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 9.14 Data Access Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 9.15 WMS Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 9.16 WFS 2.0 Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 9.17 Joining Support For Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 9.18 Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 ii 10 Working with Cascaded Services 289 10.1 External Web Feature Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 10.2 Cascaded Web Feature Service Stored Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 10.3 External Web Map Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 11 Filtering in GeoServer 297 11.1 Supported filter languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 11.2 Filter Encoding Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 11.3 ECQL Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 11.4 Filter functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 11.5 Filter Function Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308 12 Styling 317 12.1 Introduction to SLD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 12.2 Working with SLD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 12.3 SLD Cookbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 12.4 SLD Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 12.5 SLD Extensions in GeoServer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 12.6 SLD Tips and Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 13 Services 473 13.1 Web Feature Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 13.2 Web Map Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 13.3 Web Coverage Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 13.4 Virtual OWS Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520 14 REST configuration 525 14.1 REST configuration API reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 14.2 REST configuration examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551 15 Advanced GeoServer Configuration 575 15.1 Coordinate Reference System Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 15.2 Advanced log configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585 15.3 WMS Decorations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586 16 Security 589 16.1 Role system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 16.2 Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 16.3 Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 16.4 Root account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 16.5 Service Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 16.6 Layer security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 16.7 REST Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 16.8 Disabling security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 16.9 Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 17 Running in a Production Environment 659 17.1 Java Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 17.2 Container Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662 17.3 Configuration Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663 17.4 Data Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665 17.5 Linux init scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 17.6 Other Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668 17.7 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668 17.8 Make cluster nodes identifiable from the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . 674 iii 18 Caching with GeoWebCache 675 18.1 Using GeoWebCache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 18.2 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678 18.3 Seeding and refreshing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683 18.4 HTTP Response Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683 18.5 GeoWebCache REST API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686 18.6 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 19 Google Earth 699 19.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699 19.2 Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699 19.3 KML Styling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 19.4 Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716 19.5 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730 20 Extensions 741 20.1 Control flow module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741 20.2 CSS Styling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744 20.3 Catalog Services for the Web (CSW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879 20.4 DXF OutputFormat for WFS and WPS PPIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885 20.5 Excel WFS Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888 20.6 GeoSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889 20.7 Imagemap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891 20.8 Importer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892 20.9 INSPIRE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 925 20.10 JP2K Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 929 20.11 libjpeg-turbo Map Encoder Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 929 20.12 Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 932 20.13 OGR based WFS Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 948 20.14 OGR based WPS Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 951 20.15 GeoServer Printing Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 952 20.16 Cross-layer filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 978 20.17 Web Processing Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 982 20.18 XSLT WFS output format module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 998 20.19 Web Coverage Service 2.0 Earth Observation extensions . . . . . . . . . . . . . . . . . . . . . 1003 21 Tutorials 1015 21.1 Freemarker Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1015 21.2 GeoRSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1017 21.3 GetFeatureInfo Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1020 21.4 Paletted Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1026 21.5 Serving Static Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1033 21.6 WMS Reflector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1033 21.7 WMS Animator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1036 21.8 CQL and ECQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1039 21.9 Using the ImageMosaic plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1045 21.10 Using the ImageMosaic plugin for raster time-series data . . . . . . . . . . . . . . . . . . . . . 1058 21.11 Using the ImageMosaic plugin for raster with time and elevation data . . . . . . . . . . . . . 1070 21.12 Using the ImageMosaic plugin with footprint mangement . . . . . . . . . . . . . . . . . . . . 1073 21.13 Building and using an image pyramid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1080 21.14 Storing a coverage in a JDBC database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1083 21.15 Using the GeoTools feature-pregeneralized module . . . . . . . . . . . . . . . . . . . . . . . . 1090 21.16 Setting up a JNDI connection pool with Tomcat . . . . . . . . . . . . . . . . . . . . . . . . . . 1097 21.17 geoserver on JBoss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1102 iv 22 Community 1105 22.1 Key authentication module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1105 22.2 DDS/BIL(World Wind Data Formats) Extension . . . . . . . . . . . . . . . . . . . . . . . . . . 1108 22.3 NetCDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1110 22.4 Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1112 22.5 Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1116 22.6 SpatiaLite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1136 22.7 NetCDF Output format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1139 22.8 Dynamic colormap generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1141 22.9 JDBCConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1145 22.10 MBTiles Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1147 22.11 GeoPackage Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1149 22.12 GRIB format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1154 22.13 REST PathMapper Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1155 22.14 PGRaster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1156 22.15 WPS download community module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1158 22.16 JMS based Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1160 22.17 SOLR data store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1173 22.18 SLD REST Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1181 22.19 Resumable REST Upload Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1188 22.20 GeoMesa data store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1190 22.21 GWC Distributed Caching community module . . . . . . . . . . . . . . . . . . . . . . . . . . 1190 22.22 Geofence Internal Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1191 22.23 GDAL based WCS Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1196 22.24 GWC S3 BlobStore plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1200
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值