This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# This script should be considered CC0 licensed | |
# the deg2num function is from http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#lon.2Flat_to_tile_numbers_2 | |
import math | |
def deg2num(lat_deg, lon_deg, zoom): | |
lat_rad = math.radians(lat_deg) | |
n = 2.0 ** zoom | |
xtile = int((lon_deg + 180.0) / 360.0 * n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
import requests, re, os | |
def download_file(url, fileName=None): | |
def getFileName(url, req): | |
h = req.headers | |
file = None; | |
if h.has_key("content-disposition") and h.get("content-disposition")!= None and 'filename=' in h.get("content-disposition"): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://data.nantes.fr/fileadmin/data/datastore/3-publication/_orthophoto_/nantesmetropole_ortho_2005_1327_6243.zip | |
http://data.nantes.fr/fileadmin/data/datastore/3-publication/_orthophoto_/nantesmetropole_ortho_2005_1328_6242.zip | |
http://data.nantes.fr/fileadmin/data/datastore/3-publication/_orthophoto_/nantesmetropole_ortho_2005_1328_6243.zip | |
http://data.nantes.fr/fileadmin/data/datastore/3-publication/_orthophoto_/nantesmetropole_ortho_2005_1328_6244.zip | |
http://data.nantes.fr/fileadmin/data/datastore/3-publication/_orthophoto_/nantesmetropole_ortho_2005_1329_6241.zip | |
http://data.nantes.fr/fileadmin/data/datastore/3-publication/_orthophoto_/nantesmetropole_ortho_2005_1329_6242.zip | |
http://data.nantes.fr/fileadmin/data/datastore/3-publication/_orthophoto_/nantesmetropole_ortho_2005_1329_6243.zip | |
http://data.nantes.fr/fileadmin/data/datastore/3-publication/_orthophoto_/nantesmetropole_ortho_2005_1329_6244.zip | |
http://data.nantes.fr/fileadmin/data/datastore/3-publication/_orthophoto_/nantesmetropole_ortho_2005_133 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<GDAL_WMS> | |
<Service name="TMS"> | |
<ServerUrl>http://tile.openstreetmap.org/${z}/${x}/${y}.png</ServerUrl> | |
</Service> | |
<DataWindow> | |
<UpperLeftX>-20037508.34</UpperLeftX> | |
<UpperLeftY>20037508.34</UpperLeftY> | |
<LowerRightX>20037508.34</LowerRightX> | |
<LowerRightY>-20037508.34</LowerRightY> | |
<TileLevel>18</TileLevel> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<title>OpenLayers Basic OSM Example with zoom level display</title> | |
<link rel="stylesheet" href="http://www.openlayers.org/dev/theme/default/style.css" type="text/css"> | |
<link rel="stylesheet" href="http://www.openlayers.org/dev/examples/style.css" type="text/css"> | |
<style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://published-files.eea.europa.eu/eudem/jrc_r_3035_25_m_gsgrda-eudem-dem-europe_2012_rev1/eudem_tiles_1000km/EUD_CP-DEMS_2500015000-AA.tif | |
http://published-files.eea.europa.eu/eudem/jrc_r_3035_25_m_gsgrda-eudem-dem-europe_2012_rev1/eudem_tiles_1000km/EUD_CP-DEMS_2500025000-AA.tif | |
http://published-files.eea.europa.eu/eudem/jrc_r_3035_25_m_gsgrda-eudem-dem-europe_2012_rev1/eudem_tiles_1000km/EUD_CP-DEMS_2500035000-AA.tif | |
http://published-files.eea.europa.eu/eudem/jrc_r_3035_25_m_gsgrda-eudem-dem-europe_2012_rev1/eudem_tiles_1000km/EUD_CP-DEMS_2500045000-AA.tif | |
http://published-files.eea.europa.eu/eudem/jrc_r_3035_25_m_gsgrda-eudem-dem-europe_2012_rev1/eudem_tiles_1000km/EUD_CP-DEMS_2500055000-AA.tif | |
http://published-files.eea.europa.eu/eudem/jrc_r_3035_25_m_gsgrda-eudem-dem-europe_2012_rev1/eudem_tiles_1000km/EUD_CP-DEMS_3500015000-AA.tif | |
http://published-files.eea.europa.eu/eudem/jrc_r_3035_25_m_gsgrda-eudem-dem-europe_2012_rev1/eudem_tiles_1000km/EUD_CP-DEMS_7500015000-AA.tif | |
http://published-files.eea.eur |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mainly inspired by http://mclear.co.uk/2013/10/06/publishing-to-npm-on-git-commit-using-github-hooks-and-travis/ | |
# One shot for installation: uncomment below 3 lines | |
# sudo apt-get install rubygems | |
# sudo gem install json | |
# gem install travis | |
key="your_key" # Obtained from ~/.npmrc | |
email="your_mail" # Obtained from ~/.npmrc | |
base_url_project_github="git@github.com:kosmtik/" | |
plugins="kosmtik-mbtiles-export kosmtik-map-compare kosmtik-overpass-layer kosmtik-fetch-remote kosmtik-tiles-export kosmtik-geojson-overlay kosmtik-overlay kosmtik-mapnik-reference kosmtik-deploy kosmtik-place-search kosmtik-open-in-josm kosmtik-osm-data-overlay" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<h1>Minimal WebWorker example</h1> | |
<p>Look in the console!</p> | |
<script src="main.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import subprocess | |
import sys | |
import getopt | |
import math | |
# Formulas from http://wiki.openstreetmap.org/wiki/Mercator#Python_Implementation | |
def merc_x(lon): | |
r_major = 6378137.000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
"""Call to adresse.data.gouv.fr API.""" | |
import codecs | |
import io | |
from collections import OrderedDict | |
import requests | |
requests_session = requests.Session() |