Skip to content

plourdejonathan/geomet-climate

 
 

Repository files navigation

geomet-climate

Build Status

Overview

geomet-climate provides the MapServer setup and configuration for deployment of MSC GeoMet climate service data OGC Web Services.

Installation

Dependencies

  • Python MapScript
  • GDAL Python bindings

Requirements

Dependencies

Dependencies are listed in requirements.txt. Dependencies are automatically installed during installation.

Installing geomet-climate

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

# setup virtualenv
virtualenv geomet-climate
cd geomet-climate
. bin/activate

# clone codebase and install
git clone https://github.com/ECCC-CCCS/geomet-climate.git
cd geomet-climate
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .

# configure environment
vi geomet-climate.env  # edit paths accordingly
. geomet-climate.env

Running

# help
geomet-climate --help

# get version
geomet-climate --version

# generate VRTs for all layers
geomet-climate vrt generate

# generate VRTs for single layer
geomet-climate vrt generate --layer=CMIP5.SND.RCP26.FALL.ANO_PCTL50

# generate tileindex for all layers
geomet-climate tileindex generate

# generate tileindex for single layer
geomet-climate tileindex generate --layer=CMIP5.SND.RCP26.FALL.ANO_PCTL50

# generate mapfile for WMS (English)
geomet-climate mapfile generate --language=en --service=WMS

# generate mapfile for WMS (English) with specific configuration for single layer
geomet-climate mapfile generate --language=en --service=WMS --layer=CMIP5.SND.RCP26.FALL.ANO_PCTL50

# generate mapfile for WCS (French)
geomet-climate mapfile generate --language=fr --service=WCS

# run server
geomet-climate serve  # server runs on port 8099

# run server on a different port
geomet-climate serve  --port=8011

# cache WMS and WCS Capabilities URLs
mapserv -nh QUERY_STRING="map=$GEOMET_CLIMATE_BASEDIR/mapfile/geomet-climate-WMS-en.map&service=WMS&version=1.3.0&request=GetCapabilities" > $GEOMET_CLIMATE_BASEDIR/geomet-climate-WMS-1.3.0-capabilities-en.xml && mv -f $GEOMET_CLIMATE_BASEDIR/geomet-climate-WMS-1.3.0-capabilities-en.xml $GEOMET_CLIMATE_BASEDIR/mapfile

mapserv -nh QUERY_STRING="map=$GEOMET_CLIMATE_BASEDIR/mapfile/geomet-climate-WMS-fr.map&lang=fr&service=WMS&version=1.3.0&request=GetCapabilities" > $GEOMET_CLIMATE_BASEDIR/geomet-climate-WMS-1.3.0-capabilities-fr.xml && mv -f $GEOMET_CLIMATE_BASEDIR/geomet-climate-WMS-1.3.0-capabilities-fr.xml $GEOMET_CLIMATE_BASEDIR/mapfile

mapserv -nh QUERY_STRING="map=$GEOMET_CLIMATE_BASEDIR/mapfile/geomet-climate-WCS-en.map&service=WCS&version=2.1.0&request=GetCapabilities" > $GEOMET_CLIMATE_BASEDIR/geomet-climate-WCS-2.0.1-capabilities-en.xml && mv -f $GEOMET_CLIMATE_BASEDIR/geomet-climate-WCS-2.0.1-capabilities-en.xml $GEOMET_CLIMATE_BASEDIR/mapfile

mapserv -nh QUERY_STRING="map=$GEOMET_CLIMATE_BASEDIR/mapfile/geomet-climate-WCS-fr.map&lang=fr&service=WCS&version=2.1.0&request=GetCapabilities" > $GEOMET_CLIMATE_BASEDIR/geomet-climate-WCS-2.0.1-capabilities-fr.xml && mv -f $GEOMET_CLIMATE_BASEDIR/geomet-climate-WCS-2.0.1-capabilities-fr.xml $GEOMET_CLIMATE_BASEDIR/mapfile

Development

Running Tests

. test/geomet-climate-test.env
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

Geospatial web services for Canadian climate data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 92.7%
  • Assembly 7.3%