All Projects → geoadmin → mf-chsdi3

geoadmin / mf-chsdi3

Licence: other
api3.geo.admin.ch source code.

Programming Languages

python
139335 projects - #7 most used programming language
Mako
254 projects
Makefile
30231 projects
javascript
184084 projects - #8 most used programming language
Less
1899 projects
shell
77523 projects

Projects that are alternatives of or similar to mf-chsdi3

tilematrix
helps handling tile pyramids
Stars: ✭ 15 (-57.14%)
Mutual labels:  geospatial, pyramid
convertbng
Fast, accurate WGS84 longitude and latitude ⬅️➡️ OSGB36 (OSTN15) conversion, using Python and Rust
Stars: ✭ 32 (-8.57%)
Mutual labels:  geospatial
Hfs2
web based file server
Stars: ✭ 220 (+528.57%)
Mutual labels:  webserver
bmcweb
A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Stars: ✭ 109 (+211.43%)
Mutual labels:  webserver
Criollo
A powerful Cocoa web framework and HTTP server for macOS, iOS and tvOS.
Stars: ✭ 229 (+554.29%)
Mutual labels:  webserver
mu-server
A lightweight modern webserver for Java
Stars: ✭ 31 (-11.43%)
Mutual labels:  webserver
Logarr
“Logarr” is a self-hosted PHP web app that consolidates, formats, and displays log and text files for easy analysis and monitoring.
Stars: ✭ 216 (+517.14%)
Mutual labels:  webserver
geopandas-spatial-join-example
An example of how to join point to polygon data with geopandas and Python
Stars: ✭ 21 (-40%)
Mutual labels:  geospatial
Kvantum
An intellectual (HTTP/HTTPS) web server with support for server side templating (Crush, Apache Velocity and JTwig)
Stars: ✭ 17 (-51.43%)
Mutual labels:  webserver
MiServer
MiServer- an APL-based web server - requires Dyalog APL available from http://www.dyalog.com
Stars: ✭ 43 (+22.86%)
Mutual labels:  webserver
EthernetWebServer SSL
Simple TLS/SSL Ethernet WebServer, HTTP Client and WebSocket Client library for for AVR, Portenta_H7, Teensy, SAM DUE, SAMD21, SAMD51, STM32F/L/H/G/WB/MP1, nRF52 and RASPBERRY_PI_PICO boards using Ethernet shields W5100, W5200, W5500, ENC28J60 or Teensy 4.1 NativeEthernet/QNEthernet. It now supports Ethernet TLS/SSL Client. The library supports …
Stars: ✭ 40 (+14.29%)
Mutual labels:  webserver
Router.cr
Minimum High Performance Middleware for Crystal Web Server.
Stars: ✭ 231 (+560%)
Mutual labels:  webserver
anyfesto
Low cost Raspberry Pi /Linux based access point with audio, education and communications local content server. Inspired by the ideas of sharing with others. Anyfesto - a platform from which to speak.
Stars: ✭ 66 (+88.57%)
Mutual labels:  webserver
Mux.jl
Middleware for Julia
Stars: ✭ 225 (+542.86%)
Mutual labels:  webserver
asws
Another static web server, plus JSON REST API for exposing specified directory listings. Useful for download pages or listings asset for web applications.
Stars: ✭ 21 (-40%)
Mutual labels:  webserver
Voovan
Voovan是高性能异步通信、HTTP服务器和客户端通信、动态编译支持、数据库操作帮助类等工具的框架, 如果项目觉得不错, 请点一下 star, 谢谢
Stars: ✭ 221 (+531.43%)
Mutual labels:  webserver
Butterfly Server
The Everything is Real-Time C# Backend for Single Page Applications
Stars: ✭ 247 (+605.71%)
Mutual labels:  webserver
Crow
A Fast and Easy to use microframework for the web.
Stars: ✭ 1,718 (+4808.57%)
Mutual labels:  webserver
krawler
A minimalist (geospatial) ETL
Stars: ✭ 51 (+45.71%)
Mutual labels:  geospatial
sits
Satellite image time series in R
Stars: ✭ 342 (+877.14%)
Mutual labels:  geospatial

mf-chsdi3

Branch Status
master Build Status

Table of contents

Description

Next generation services https://api3.geo.admin.ch for https://map.geo.admin.ch In mid August 2022 the project has been migrated to python3, docker and eu-central-1.

Install

The required environment variables are set in .env.default. They can be adapted or you can use a copy of .env.default, e.g. .env.mine and use that instead.

Install the python virtual environment (still virtualenvat this point)

make setup

Build the Pylons settings files and run the local waitress server

summon make serve

You may want to customize the variables. Copy the file .env.default as .ven.mine, change the variables you want and use them with

summon make ENV_FILE=.env.mine serve

📖 You need some external ressource to run the service, see External ressources dependencies

External Ressources Dependencies

To run the service locally you need to have access to the following external ressources:

  • Postgresql database pg-geodata-replica.bgdi.ch
  • S3 bucket service-mf-chsdi3-grid-geojsons-dev-swisstopo (NOTE: this bucket is only required by some of the Identity endpoints)

Postgresql Port Forwarding

You can use the ssh port forwarding feature to have access to pg-geodata-replica.bgdi.ch by using the jump host:

ssh ssh0a.prod.bgdi.ch -L 5432:pg-geodata-replica.bgdi.ch:5432

Then set the DBHOST environment variable to localhost (you can do this in your own environment file e.g. .env.mine and run the make file as follow: summon make ENV_FILE=.env.mine serve)

S3 Vector Bucket Access

To have access to the S3 bucket, you can either set your AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variable. ⚠️ When using those variables make sure that the command are not saved into history file !

Alternatively if you are using zsh you can use the aws plugin (see oh-my-zsh aws plugin) with the following command:

acp swisstopo-bgdi-dev

This command will automatically use your AWS profile swisstopo-bgdi-dev for any AWS connection services.

Docker

Docker build locally

make dockerbuild

Docker run locally

summon make dockerrun

📖 You need some external ressource to run the service, see External ressources dependencies

Push the locally built docker image to ECR

First log in to the AWS ECR registry with:

make dockerlogin

afterwards you can push the locally built image to ECR with:

make dockerpush

Unit Testing

Prerequisites

  • PostgreSQL DB pg-geodata-replica.bgdi.ch must be reachable
  • Access to AWS services
    • Read access to S3 bucket service-mf-chsdi3-grid-geojsons-dev-swisstopo (can be disable with S3_TESTS=0)

See External Ressources Dependencies for more infos on those prerequisites.

Starting the tests

To run the tests enter

summon make test

Or if you use your own environment file

summon make ENV_FILE=.env.mine test

⚠️ If you don't have AWS Access you can disable the S3 tests as follow

summon make S3_TESTS=0 test

Download WMS image legends

In order to download all images of a layer in the correct format and with the correct dimensions, simply use:

make legends BODID=ch.layername WMSHOST=wms.geo.admi.ch

Alternatively, you can also download a WMS legend for a specific scale.

make legends BODID=ch.layername WMSHOST=wms.geo.admi.ch WMSSCALELEGEND=1000

You will need the optipgn tool order to download the legends, use sudo apt install optipng to install it.

Python Code Styling

We are currently using the FLAKES 8 convention for Python code. You can find more information about our code styling here:

You can find additional information about autopep8 here:

To check the code styling:

make lint

To autocorrect most linting mistakes

make autolint

Varia

Lint a JSON file

export PATH=$(npm bin):$PATH
jsonlint-cli --pretty temp.json > chsdi/static/vectorStyles/ch.meteoschweiz.messwerte-foehn-10min.json
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].