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 / 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
{
"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": {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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)