Giter Site home page Giter Site logo

eccc-cccs / geomet-climate Goto Github PK

View Code? Open in Web Editor NEW
21.0 9.0 11.0 4.67 MB

Geospatial web services for Canadian climate data

Home Page: https://climate-change.canada.ca/climate-data

License: GNU General Public License v3.0

Python 88.18% Shell 9.67% Dockerfile 2.15%
climate cmip5 ahccd cangrd downscale cansips

geomet-climate's Introduction

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
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
pip3 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 legends for all layers
geomet-climate legend generate

# generate mapfile for WMS
geomet-climate mapfile generate --service=WMS

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

# generate mapfile for WCS
geomet-climate mapfile generate --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

. tests/geomet-climate-test.env
python3 setup.py test

Cleaning the build of artifacts

python3 setup.py cleanbuild

Releasing

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

Code Conventions

Bugs and Issues

All bugs, enhancements and issues are managed on GitHub.

Contact

geomet-climate's People

Contributors

alexandreleroux avatar dukestep avatar flaframboise avatar kngai avatar rousseaulambertlp avatar tomkralidis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geomet-climate's Issues

Explore using filters for WCS TIME requests

I think we could update our code to use the FILTER key in MapServer fot the WCS time requests instead of using band names.

This could also mean that we would not need to have a mapfile for WMS and another one for WCS.

See https://www.mapserver.org/uk/ogc/wcs_server.html#spatio-temporal-indexes

So basically we could add a filter in the tileindex layer and use mapscript for replacing the filter value with the parameter passed in the request.

We would have to test how many filters we can use because at the moment, using the band names allows us to ask for up to 256 bands (time step) at the same time.

@tomkralidis any thoughts or comments ?

Metadata for netCDF files created by WCS requests

Hi !

Our team would like to use WCS requests to fetch operational forecasts and feed them to an hydrological model. While this works at the moment, it would be nice for variables to have descriptive names (instead of Band1) and attributes.

Is this something that can be reasonably done and how someone new to the code base could contribute to this ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.