Displaying swisstopo Pixelkarte in Google Map using the new reprojected WMTS tiles.
See http://api3.geo.admin.ch/services/sdiservices.html#other-projections
A Pen by procrastinatio on CodePen.
| <body onload="init();"> | |
| <div id="map"></div> | |
| <script type="text/javascript" src="https://api.geo.admin.ch/loader.js"></script> | |
| <script type="text/javascript" src="simple.js"></script> | |
| <link href="simple.css" /> | |
| </body> |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
Displaying swisstopo Pixelkarte in Google Map using the new reprojected WMTS tiles.
See http://api3.geo.admin.ch/services/sdiservices.html#other-projections
A Pen by procrastinatio on CodePen.
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| import os | |
| import pyproj | |
| DEBUG= False |
| >>> from mapproxy.srs import SRS | |
| >>> from mapproxy.grid import TileGrid, tile_grid | |
| # Grid creation | |
| >>> grid = TileGrid(SRS(21781), | |
| ... bbox=(20000,30000,900000,350000), origin='ul', | |
| ... res=[4000,3750,3500,3250,3000,2750,2500,2250,2000,1750,1500,1250,1000,750,650,500,250,100,50,20,10,5,2.5,2,1.5,1,0.5,0.25,0.1]) | |
| # Grid origin | |
| >>> grid.origin |
| #!/usr/bin/env python | |
| import owslib | |
| from owslib.wms import WebMapService | |
| import requests | |
| import lxml | |
| urls= ['https://ge.ch/sitgags1/services/VECTOR/SITG_OPENDATA_01/MapServer/WMSServer', | |
| 'https://ge.ch/sitgags1/services/VECTOR/SITG_OPENDATA_02/MapServer/WMSServer', | |
| 'https://ge.ch/sitgags1/services/VECTOR/SITG_OPENDATA_03/MapServer/WMSServer', |
| #!/bin/bash | |
| ##### ch.swisstopo.pixelkarte-farbe-pk25.noscale - pk25_krel_20171012.geojson - 1000 0.1 ####### | |
| .venv/bin/python scripts/invalidate.py --profile ltmom_aws_admin --force --bucket bgdi-tod-cache-prod --layer ch.swisstopo.pixelkarte-farbe-pk25.noscale --timestamp current --extent 2812500.00074 1170000.00106 2830000.00075 1182000.00107 --resolutions 1000 0.1 --epsgs 21781 4326 2056 3857 | |
| .venv/bin/python scripts/invalidate.py --profile ltmom_aws_admin --force --bucket bgdi-tod-cache-prod --layer ch.swisstopo.pixelkarte-farbe-pk25.noscale --timestamp current --extent 2812500.00074 1158000.00106 2830000.00076 1170000.00107 --resolutions 1000 0.1 --epsgs 21781 4326 2056 3857 | |
| .venv/bin/python scripts/invalidate.py --profile ltmom_aws_admin --force --bucket bgdi-tod-cache-prod --layer ch.swisstopo.pixelkarte-farbe-pk25.noscale --timestamp current --extent 2777500.00072 1134000.00106 2795000.00074 1146000.00107 --resolutions 1000 0.1 --epsgs 21781 4326 2056 3857 | |
| .venv/bin/python scripts/inval |
So HAProxy is primalery a load balancer an proxy for TCP and HTTP. But it may act as a traffic regulator. It may also be used as a protection against DDoS and service abuse, by maintening a wide variety of statistics (IP, URL, cookie) and when abuse is happening, action as denying, redirecting to other backend may undertaken ([haproxy ddos config], [haproxy ddos])
| #!/usr/bin/env python | |
| # Get all GWR (ch.bfs.gebaeude_wohnungs_register) on a given parcel (ch.kantone.cadastralwebmap-farbe) | |
| import sys | |
| import re | |
| import requests | |
| import json | |
| import logging |
| #!/usr/bin/python3 | |
| import sys | |
| import csv | |
| import random | |
| import string | |
| from datetime import datetime | |