Skip to content

Instantly share code, notes, and snippets.

@grischard
grischard / overpass.geojson
Created March 18, 2016 18:37 — forked from anonymous/overpass.geojson
data exported by overpass turbo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[
{
"localite_nom": "Beaufort",
"commune_nom": "Beaufort"
},
{
"localite_nom": "Dillingen",
"commune_nom": "Beaufort"
},
{
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
## Activate our environment
cd udata
source bin/activate
# Package udata
cd /home/admin/udata/udata
inv clean
inv assets
@grischard
grischard / lurefproxy.py
Created January 16, 2017 17:02
Proxy to reproject luref geojson from opendata.vdl.lu
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Flask
from flask import request
from flask import Response
import json
from pyproj import Proj
from pyproj import transform
import requests
-- This script is available for use under the BSD License
--
-- Jonas Häggqvist <rasher@rasher.dk>
-- Guillaume Rischard <guillaume@openstreetmap.lu>
-- Create grid, based on the function from http://trac.osgeo.org/postgis/wiki/UsersWikiGenerateHexagonalGrid
-- Hexagons are cut using the country polygon as a cookie cutter.
-- Magic values:
-- 2169 is the SRID.
# Error page is actually an image
error_page 403 /static/img/noaccess.png;
# define boolean
set $valid 0;
# Whitelist JOSM and Vespucci
if ($http_user_agent ~ "^(JOSM|Vespucci)") {
set $valid 1;
}
@grischard
grischard / josm2delete.sh
Last active March 10, 2018 11:38
Show layers that are in JOSM but not in ELI that have been deleted from ELI
#!/bin/bash
for i in `grep -of <(diff -wui <(git show db8d389:./imagery.geojson | grep url | sort) <(jsonpp imagery.geojson | grep url | sort) | grep '^-' | grep \} | cut -d \" -f 4) <(curl --silent https://josm.openstreetmap.de/wiki/ImageryCompare | awk '/\*\*\* URLs found in JOSM but not in ELI/,/but different name/' | perl -MHTML::Entities -pe 'decode_entities($_);')`; do
echo $i
git --no-pager log --name-status -n 1 -S $i sources
echo "--"
done
#!/usr/bin/env python
#
# Guillaume Rischard 2016
import psycopg2
import json
from clint import arguments
from clint.textui import colored, progress
PATH = "./streetlist/"
> brew update
==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
sh: line 1: 54489 Abort trap: 6 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx -find git 2> /dev/null
git: error: unable to find utility "git", not a developer tool or in PATH
Error: Failure while executing: git config --local --replace-all homebrew.analyticsmessage true