Skip to content

Instantly share code, notes, and snippets.

View gislars's full-sized avatar

Lars Lingner gislars

  • mapwebbing
  • Berlin
View GitHub Profile
@gislars
gislars / get_route.py
Created September 5, 2023 13:53
get route from OSRM and within a buffer of that route all charging stations
from routingpy.routers import OSRM
import overpy
import json
from shapely.geometry import LineString, mapping
def query_overpass(route_file):
with open(route_file, 'r') as f:
route_data = json.load(f)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"version": 8,
"name": "Strassenraum",
"metadata": {
"maputnik:license": "https://github.com/maputnik/osm-liberty/blob/gh-pages/LICENSE.md",
"maputnik:renderer": "mbgljs",
"openmaptiles:version": "3.x"
},
"sources": {
"vts_pl_tiles": {
@gislars
gislars / gist:d40bb484bef91d2a1d10a413388954bf
Created September 16, 2018 11:33
Länge Fahrradinfrastruktur Berlin OpenStreetMap
{
"type": "FeatureCollection",
"name": "cycleways_length_berlin",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::3857" } },
"features": [
{ "type": "Feature", "properties": { "fid": 3, "name": "Reinickendorf", "LENGTH": 126928.45974066116, "COUNT": 638 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 1471353.914784491062164, 6907053.943815803155303 ], [ 1471270.124603770207614, 6906413.865648604929447 ], [ 1471356.464000829262659, 6906176.444157644174993 ], [ 1471385.240089201135561, 6905823.906621086411178 ], [ 1471428.409787729382515, 6905536.124498512595892 ], [ 1471441.95736975944601, 6905430.441489062272012 ], [ 1471464.38824715372175, 6905255.533576601184905 ], [ 1471586.694971688324586, 6905068.4661959996447 ], [ 1471719.009318445576355, 6904938.279982222244143 ], [ 1471870.047603554092348, 6904728.304892078973353 ], [ 1472021.074756713584065, 6904573.59762972779572 ], [ 1472154.134944057324901, 6904397.572744553908706 ], [ 1472219.99155481159687, 6904308.37117986753583
### Keybase proof
I hereby claim:
* I am gislars on github.
* I am gislars (https://keybase.io/gislars) on keybase.
* I have a public key ASDuVTptmDyWSJyfr8f1A5p69Dp06ZwKMwBC82OsfDGGoQo
To claim this, I am signing this object:
#!/bin/bash -e
## split-image.sh - Split a large image into same-size tiles
## Split a large image into same-size tiles
## and optionally convert to a print-ready PDF document
##
## For example split a huge A1-size banner into 8x A4 tiles
## and create a single PDF ready for print.
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9
@gislars
gislars / default.map
Created May 7, 2015 07:26
MapServer default map with GetFeatureInfo
MAP
CONFIG 'ON_MISSING_DATA' 'IGNORE'
CONFIG "MS_ERRORFILE" "../debugFile.log"
CONFIG 'PROJ_LIB' '../'
FONTSET '../fonts.lst'
IMAGETYPE png
MAXSIZE 4000
SIZE 800 800
UNITS meters
EXTENT -20405648.939901 -17712669.979681 20314497.045109 19408951.476421
@gislars
gislars / printconfig.json
Created July 12, 2014 12:15
json print config
{
"Decoration": {
"northarrow": null,
"scale": null
},
"Output": {
"orientation": "quer",
"height": 46.8,
"infobox": "oben links",
"width": 33.1,