Skip to content

Instantly share code, notes, and snippets.

View mvexel's full-sized avatar

Martijn van Exel mvexel

View GitHub Profile
@mvexel
mvexel / gist:1602876
Created January 12, 2012 20:21
draft license change email
Hi all,
The final phase of the license changeover to the Open Database License[1] from our current CC-BY-SA is drawing near. From April 1[2], current OpenStreetMap data will only be available under the new license. This means that all data that was contributed by those who did not agree to the new Contributor Terms (CT) will be removed by then. Although the vast majority of contributors have agreed to the CT, some 'tainted' data is jeopardy of being lost. Have a look at the CleanMap[3] and Acceptance Statistics[4] tools to get a sense of what we're talking about. There's even significant stretches of interstate among the jeopardized data.
There are several things we can do together to minimize the data loss and ensure a smooth changeover to the new license:
* Contact mappers who have declined or not agreed yet. Use the OSM Inspektor[5] to identify those users in your area and contact them using the messaging function on the OSM web site. I'd highly recommend to start doing that first. Mappers who are no l
@mvexel
mvexel / gist:1602882
Created January 12, 2012 20:21
draft us license email
Hi all,
The final phase of the license changeover to the Open Database
License[1] from our current CC-BY-SA is drawing near. From April 1[2],
current OpenStreetMap data will only be available under the new
license. This means that all data that was contributed by those who
did not agree to the new Contributor Terms (CT) will be removed by
then. Although the vast majority of contributors have agreed to the
CT, some 'tainted' data is jeopardy of being lost. Have a look at the
CleanMap[3] and Acceptance Statistics[4] tools to get a sense of what
@mvexel
mvexel / nbi_osm_conflation_try1.txt
Created February 29, 2012 18:44
NBI <> OSM conflation first try
Query: select a.gid as nbi_id, a.facility_ca as nbi_name, a.route_numbe as nbi_ref, b.tags->'name' as osm_name, b.tags->'ref' as osm_ref from nbi_all_viaducts a, ways b where ST_Buffer(a.the_geom, 0.001) && b.linestring LIMIT 200;
nbi_id | nbi_name | nbi_ref | osm_name | osm_ref
--------+--------------------+---------+----------------------------+-------------------------
43993 | I-471 NC | 00471 | Daniel Carter Beard Bridge | I 471
43993 | I-471 NC | 00471 | Daniel Carter Beard Bridge | I 471
43994 | I-471 | 00471 | Daniel Carter Beard Bridge | I 471
43994 | I-471 | 00471 | Daniel Carter Beard Bridge | I 471
44019 | I-471 | 00471 | |
44019 | I-471 | 00471 | Daniel Carter Beard Bridge | I 471
@mvexel
mvexel / gist:2185826
Created March 24, 2012 18:17
osmosis crashes JRE
mvexel@lima$ osmosis --rb us.osm.pbf --wpd directory=/osm/tmp
Mar 24, 2012 12:11:51 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.40.1
Mar 24, 2012 12:11:51 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Mar 24, 2012 12:11:51 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Mar 24, 2012 12:11:51 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
#
@mvexel
mvexel / gist:2185839
Created March 24, 2012 18:19
osmosis JRE crash log
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fba2048fa3f, pid=24448, tid=140437278418688
#
# JRE version: 6.0_20-b20
# Java VM: OpenJDK 64-Bit Server VM (19.0-b09 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea6 1.9.13
# Distribution: Ubuntu 10.04.1 LTS, package 6b20-1.9.13-0ubuntu1~10.04.1
# Problematic frame:
@mvexel
mvexel / gist:2356599
Created April 11, 2012 03:09
problematic postgis query
SET search_path TO us,postgis,hstore;
DROP TABLE IF EXISTS candidates;
CREATE TABLE candidates AS
WITH agg_intersections AS
(
WITH intersection_nodes_wayrefs AS
(
WITH intersection_nodes AS
(
SELECT
@mvexel
mvexel / gist:2646988
Created May 9, 2012 17:31
Angle calculation in PostGIS
DROP TABLE IF EXISTS angletmp;
CREATE TABLE angletmp AS
WITH
intersections AS
(
SELECT
ST_Transform
(
(ST_Dump
(
@mvexel
mvexel / tiger.py
Created May 12, 2012 18:19 — forked from emacsen/pyxbot.py
OSM Tiger expansion code
#!/usr/bin/env python
"""This is the base library that can used to run various OSM bots
which are implemented as plugins"""
import sys
import os
from xml.sax.handler import ContentHandler
from xml.sax import make_parser
import codecs
@mvexel
mvexel / gist:3186208
Created July 27, 2012 04:39
graph builder java runtime error.
2012-07-26 22:36:46,931 DEBUG [MapBuilder.java:62] : Matching: RouteVariant(811 from CANYON RD @ 1195 N (UTA_19144)) ncoords = 314
2012-07-26 22:36:47,224 DEBUG [StreetMatcher.java:114] : seen / total: 13179 / 50000
2012-07-26 22:36:47,382 DEBUG [StreetMatcher.java:114] : seen / total: 13486 / 100000
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f4c0a42e0b7, pid=564, tid=139964451636992
#
# JRE version: 6.0_24-b24
# Java VM: OpenJDK 64-Bit Server VM (20.0-b12 mixed mode linux-amd64 compressed oops)
@mvexel
mvexel / gist:3254628
Created August 4, 2012 04:57
osm change file
<?xml version='1.0' encoding='UTF-8'?>
<osmChange version="0.6" generator="osmconvert 0.7A">
<bounds minlat="18.70231" minlon="-179.7538999" maxlat="71.46277" maxlon="-66.9069899"/>
<delete>
<node id="39119187" version="4" timestamp="2010-12-13T22:39:45Z" changeset="6653839" uid="28237" user="lyx"/>
<node id="39140353" version="3" timestamp="2009-10-10T21:36:34Z" changeset="2808342" uid="175186" user="the_winch_tiger"/>
<node id="39140358" version="3" timestamp="2009-10-10T21:36:34Z" changeset="2808342" uid="175186" user="the_winch_tiger"/>
<node id="39140360" version="3" timestamp="2009-10-10T21:36:34Z" changeset="2808342" uid="175186" user="the_winch_tiger"/>
<node id="39140363" version="3" timestamp="2009-10-10T21:36:34Z" changeset="2808342" uid="175186" user="the_winch_tiger"/>
<node id="39140365" version="3" timestamp="2009-10-10T21:36:34Z" changeset="2808342" uid="175186" user="the_winch_tiger"/>