是否可以使用以下方式以编程方式创建新的OGC WMS(1.1 / 1/3)服务:
任何脚本/要点或样本都会更受欢迎。
干杯,M
答案 0 :(得分:0)
一般来说,一切都与配置文件有关。我使用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
END
Mapproxy config-pattern:
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脚本进行编辑。
答案 1 :(得分:0)
如果我们正在寻找postgres中的发布数据到WMS,启用tilecache,并使用更高级的渲染引擎,如mapnik,那么我会说可能有一个组件缺失的是GIS服务器。
因此,如果我正如我前面提到的那样正确地猜测您的要求,那么系统设计就是这样: