发布于2021-06-12 15:20 阅读(18) 评论(0) 点赞(20) 收藏(0)
将瓦片地图存储为文件或数据库,在部署不同机器时,需要复制一份,为了部署方便,可以将地图发布为WMS服务。这样,局域网内的电脑均可利用该地图数据。
参考:https://www.freesion.com/article/7812301331/
https://www.cnblogs.com/luxiaoxun/p/5022333.html
过程如下:
利用Geowebcache+Tomacat+分极瓦片地图数据部署
- <bean id="gwcXmlConfig" class="org.geowebcache.config.XMLConfiguration">
- <constructor-arg ref="gwcAppCtx" />
- <!--<constructor-arg ref="gwcDefaultStorageFinder" />-->
- <constructor-arg value="D:\\GisMap\\" />
- <!-- By default GWC will look for geowebcache.xml in {GEOWEBCACHE_CACHE_DIR},
- if not found will look at GEOSEVER_DATA_DIR/gwc/
- alternatively you can specify an absolute or relative path to a directory
- by replacing the gwcDefaultStorageFinder constructor argument above by the directory
- path, like constructor-arg value="/etc/geowebcache"
- -->
- <property name="template" value="/geowebcache.xml">
- <description>Set the location of the template configuration file to copy over to the
- cache directory if one doesn't already exist.
- </description>
- </property>
- </bean>
<constructor-arg>使用固定路径,该路径可以为任意新建路径文件夹。Geowebcache启动之后会检查此文件夹下是否存在gewebcache.xml文件,如果不存在则按模板新建立并读取使用,如果存在则直接读取使用.
4. 启动Tomacat,这时会在 <contructor-arg> value目录下生成gewebcache.xml文件。然后关闭tomacat
5. 打开gewebcache.xml,在<layers>下增加:
-
- <arcgisLayer>
- <name>ARCGIS-Demo</name>
- <tilingScheme>D:\\GisMap\\Layer\\conf.xml</tilingScheme>
- <tileCachePath>D:\\GisMap\\Layer\\_alllayers</tileCachePath>
- </arcgisLayer>
<name>随着起, <tilingScheme>和<tileCachePath>对应瓦片地图的文件及目录
6. 瓦片地图由全能地图下载瓦片后,通过工具菜单中的拼图,导出为AcrGIS Server缓存瓦片。结构如下
注意:把conf.xml 和conf.cdi的编码格式改为不带BOM的UTF-8,不然web服务器访问不到
7. 启动tomcat,继而启动Geowebcache服务,浏览器访问 localhost:8080/geowebcache,如果一切正确的话可以看到下面的页面:
8. 点击
出现:
9. 点击Seed this layer:如下图:
注意,该地图数据 的投影方式为EPSG:3857。
10.点击【jpeg】,出现下图
原文链接:https://blog.csdn.net/keebai/article/details/117709252
作者:niceboty
链接:http://www.javaheidong.com/blog/article/222425/93de5665f000ebb78ba9/
来源:java黑洞网
任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任
昵称:
评论内容:(最多支持255个字符)
---无人问津也好,技不如人也罢,你都要试着安静下来,去做自己该做的事,而不是让内心的烦躁、焦虑,坏掉你本来就不多的热情和定力
Copyright © 2018-2021 java黑洞网 All Rights Reserved 版权所有,并保留所有权利。京ICP备18063182号-2
投诉与举报,广告合作请联系vgs_info@163.com或QQ3083709327
免责声明:网站文章均由用户上传,仅供读者学习交流使用,禁止用做商业用途。若文章涉及色情,反动,侵权等违法信息,请向我们举报,一经核实我们会立即删除!