Skip to content

Instantly share code, notes, and snippets.

View tilmanb's full-sized avatar

tilmanb

  • Germany
View GitHub Profile
@tilmanb
tilmanb / index.html
Created October 9, 2020 16:05
Leaflet from CDN skeleton
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.6.2/proj4.min.js" integrity="sha512-EKjCCRjU5ClBwaRb6dGbElFNWJTE7Ek7+PlXelkum5uofPwlf6u2VRch1ty3csFCQn9XdyX89Te8jVg61qtm3Q==" crossorigin="anonymous"></script>
@tilmanb
tilmanb / gpx_stat.py
Created September 6, 2019 14:41
QPy-Analysen für GPX-Layer
from pprint import pprint
selected_layer = qgis.utils.iface.activeLayer()
selected_features = layer.selectedFeatures()
# temp-layer anlegen
temp_layer = QgsVectorLayer("Point?crs=epsg:4326", "zeitdifferenz", "memory")
# Felder anlegen
temp_dataprovider = temp_layer.dataProvider()
@tilmanb
tilmanb / notes2csv.py
Created March 13, 2015 13:57
Search for OSM notes and generate a csv file
# -*- coding: utf8 -*-
import csv
import xml.etree.ElementTree as ET
import codecs
import urllib2
import uuid
api = "https://api.openstreetmap.org/api/0.6/notes/search?q="
stringToSearchFor = "free parking"
@tilmanb
tilmanb / leaflet-marker.html
Created February 5, 2015 15:59
leaflet marker example
<html>
<head>
<link href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" rel="stylesheet" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script language="javascript">
var map;