是否有可能通过以下方式以编程方式创建一个新的OGC WMS (1.1/1/3)服务:
任何脚本/要点或示例都会受到更多的赞赏。
干杯,M
发布于 2016-08-25 07:41:09
一般来说,一切都是关于配置文件的。我使用python脚本为Mapserver/Mapproxy设置自动创建新的WMS端点,该脚本也处理我的图像。
MapServer配置-模式:
MAP
NAME "WMS Server"
#IMAGECOLOR 255 255 255
IMAGETYPE custom
TRANSPARENT OFF
CONFIG "MS_ERRORFILE" [error.txt]
EXTENT [Extent]
SIZE 800 600
WEB
METADATA
"wms_title" [title]
"wms_srs" [epsg]
"wms_enable_request" "*"
END
END
PROJECTION
"init=[epsg]"
END
INCLUDE [layer list]
OUTPUTFORMAT
NAME "custom"
DRIVER "GDAL/GTiff"
MIMETYPE "image/tiff"
IMAGEMODE RGBA
TRANSPARENT ON
EXTENSION "tif"
FORMATOPTION "GAMMA=1.0"
END
ENDMapproxy配置-模式:
caches:
[cache folder]:
cache:
directory_layout: tms
type: file
grids:
- webmercator
image:
format: image/png
mode: RGBA
resampling_method: bilinear
encoding_options:
jpeg_quality: 100
transparent: true
meta_size:
- 2
- 2
sources:
- [source]
globals:
cache:
base_dir: [base dir]
lock_dir: [lock dir]
tile_lock_dir: [tile lock dir]
image:
paletted: false
grids:
webmercator:
base: GLOBAL_WEBMERCATOR
num_levels: 22
layers:
- name: [layer name]
sources:
- [cache]
title: [title]
services:
demo: null
wms:
md:
abstract: This is a minimal MapProxy example.
title: MapProxy WMS Proxy
srs:
- [epsg]
sources:
45_source:
coverage:
datasource: [coverage datasource]
srs: [epsg]
mapserver:
binary: [mapserver binary]
working_dir: /
req:
layers: [mapserver layer name]
map: [mapserver mapfile]
transparent: true
supported_formats:
- image/tiff
supported_srs:
- [epsg]
type: mapserver您所要做的就是将配置分成不同的部分,然后可以使用python脚本进行编辑。
发布于 2016-09-09 18:10:04
如果我们正在寻找将postgres中的数据发布到WMS,启用tilecache,并使用更高级的呈现引擎(如mapnik ),那么我想说,可能缺少一个组件是GIS服务器。
因此,如果我前面提到的您的需求是正确的,那么下面是系统设计的内容:
https://stackoverflow.com/questions/38524212
复制相似问题