Skip to content

Instantly share code, notes, and snippets.

@y0n3l
y0n3l / gist:5129229
Last active December 14, 2015 18:28
Create an iCal from items you should return to the Valbonne Mediathèque
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Created on Mar 9, 2013
@author: y0n3l
'''
from datetime import datetime, date
from ftplib import FTP
from icalendar import Calendar, Event
@y0n3l
y0n3l / gist:2209054
Created March 26, 2012 19:37
Roads extract from La réunion using Overpass API
<-- just use this file at http://overpass.osm.rambler.ru/query_form.html to download the corresponding .osm file -->
<bbox-query s="-21.3896808624268" n="-20.8717155456543" w="55.2164878845215" e="55.836841583252"/>
<recurse type="node-way"/>
<union>
<query type="way">
<item/>
<!-- Just add some more tags here ... -->
<has-kv k="highway" regv="primary|secondary"/>
</query>
<recurse type="way-node"/>
@y0n3l
y0n3l / FR-Alpes-maritimes-motorway.xml
Created March 8, 2012 13:29
OSM extract for motorways in Alpes-Maritimes using Overpass API. Can be used from http://overpass.osm.rambler.ru/query_form.html
<!-- Can be used at http://overpass.osm.rambler.ru/query_form.html to download the corresponding .osm file -->
<!-- Alpes-Maritimes relation is 7385. An area based on a relation has the id of the relation plus 3,600,000,000. -->
<area-query ref="3600007385" />
<!-- Get all ways from the resulting nodes -->
<recurse type="node-way"/>
<union>
<!-- Get only ways tagged with 'motorway' -->
<query type="way">
<item/>
<has-kv k="highway" v="motorway"/>