Skip to content

GeoMet mapfile is a system to manage MapServer configurations to access to the Environment and Climate Change Canada's Meteorological Service of Canada (MSC) open data, including raw numerical weather prediction (NWP) model data layers and the weather radar mosaic, via Open Geospatial Consortium (OGC) standards such as the Web Map Service (WMS).…

License

Notifications You must be signed in to change notification settings

ECCC-MSC/geomet-mapfile

Repository files navigation

GeoMet-Mapfile

Overview

geomet-mapfile manages MapServer mapfiles and provides WMS services on top of geomet-data-registry.

mapfile management is done either on disk (default) or using a store backend (e.g. Redis).

Installation

Requirements

Dependencies

Dependencies are listed in requirements.txt. Dependencies are automatically installed during geomet-mapfile installation.

Installing

# setup system wide packages
sudo apt-get install python-mapscript

# setup virtualenv
python3 -m venv --system-site-packages geomet-mapfile
cd geomet-mapfile
. bin/activate

# clone codebase and install
git clone https://github.com/ECCC-MSC/geomet-mapfile.git
cd geomet-mapfile
pip install -r requirements.txt
pip install -r requirements-dev.txt
python setup.py install

# configure environment
cp geomet-mapfile.env local.env
vi local.env  # edit paths accordingly
. local.env

Running

# help
geomet-mapfile --help

# version
geomet-mapfile --version

# see all subcommands
geomet-mapfile

# generate a mapfile for GDPS.ETA_TT without the `MAP` object and write to the configured store
geomet-mapfile mapfile generate -l GDPS.ETA_TT --no-map -o store

# generate complete mapfiles (with `MAP` object) for all layers in the GeoMet configuration and write them to disk
geomet-mapfile mapfile generate -o file

# read an existing GeoMet-Weather style file and removes unnecessary parameters (i.e CLASSGROUP, GEOTRANSFORM, etc.)
# useful for generating acceptable mappyfile style JSON objects from existing GeoMet-Weather styles

# generate mappyfile-ready JSON objects from existing GeoMet-Weather mapfiles
geomet-mapfile utils clean_styles -d /path/to/styles-dir -o . -of json

# store management

# get a key from the store.
geomet-mapfile store get -k GDPS.ETA_TT

# set a key in the store.
geomet-mapfile store set -k GDPS.ETA_TT -m /path/to/geomet-weather-GDPS.ETA_TT_en.map

Development

Running Tests

python setup.py test

Cleaning the build of artifacts

python setup.py cleanbuild

Releasing

python setup.py sdist bdist_wheel --universal
twine upload dist/*

Code Conventions

Bugs and Issues

All bugs, enhancements and issues are managed on GitHub.

Contact

About

GeoMet mapfile is a system to manage MapServer configurations to access to the Environment and Climate Change Canada's Meteorological Service of Canada (MSC) open data, including raw numerical weather prediction (NWP) model data layers and the weather radar mosaic, via Open Geospatial Consortium (OGC) standards such as the Web Map Service (WMS).…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages