2016-07-22 15 views

答えて

0

一般的にすべての設定ファイルについてです。私はMapserver/Mapproxyセットアップのために自動的に新しいWMSエンドポイントを作成します。このエンドポイントは、画像を処理するpythonスクリプトを使用します。

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の設定パターン:

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スクリプト。

0

私たちがpostgresのデータをWMSに公開し、tilecacheを有効にし、mapnikのような高度なレンダリングエンジンを使用したいのであれば、GISサーバーが欠けているコンポーネントが1つ存在する可能性があります。データベース接続など

  1. 利用のpostgres/PostGISの:だから

    私は以前ここに、その後に述べたように、私が正しくあなたの条件を推測していた場合は、システム設計は何ができるかです。

  2. Pythonを使用して独自のサーバーサイドプログラムを作成して、 MapServerを使用する場合は、動的WMS用のサービス定義ファイル( の場合は )を作成します。
  3. 次に、プログラムがタイルキャッシュ/タイルシードを処理することによって、 構成ファイル(.yaml)をmapproxyに変更します。
  4. 次に、WMSをmapnikにエスカレートしてレンダリングし、出力を公開します。 他の誰かが言及したように、各ステップにテンプレート 設定ファイルを持ち、パラメータ置換を行うのは簡単です。
関連する問題