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:3254632
Created August 4, 2012 04:57
osmosis error
Aug 3, 2012 10:57:25 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.40.1
Aug 3, 2012 10:57:25 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Aug 3, 2012 10:57:25 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Aug 3, 2012 10:57:25 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Aug 3, 2012 10:57:25 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-rxc failed
@mvexel
mvexel / gist:3257796
Created August 4, 2012 13:32
script used to periodically update data for http://lima.schaaltreinen.nl/redaction/#
#!/bin/sh
cd /osm/planet/us/uptodate/
mv us-new.o5m us.o5m
mv redaction-ways-new.o5m redaction-ways.o5m
/osm/software/osmupdate us.o5m us-new.o5m -t=tmp/ --planet-url=http://planet.openstreetmap.org/redaction-period/ -B=/osm/poly/us/us.poly
/osm/software/osmfilter us-new.o5m --keep-ways="@uid=722137" --keep-nodes= --keep-relations= -o=redaction-ways-new.o5m
/osm/software/osmconvert redaction-ways.o5m redaction-ways-new.o5m --diff --fake-lonlat -o=redaction-ways-change.osc
/osm/software/osmosis-latest/bin/osmosis --rxc redaction-ways-change.osc --wpc database=redaction user=osm password=osm
@mvexel
mvexel / gist:3640577
Created September 5, 2012 17:27
faulty SQL from shp2pgsql
This file has been truncated, but you can view the full file.
SET CLIENT_ENCODING TO UTF8;
SET STANDARD_CONFORMING_STRINGS TO ON;
BEGIN;
CREATE TABLE "tl_2012_us_states_dissolved" (gid serial,
"id" int4);
ALTER TABLE "tl_2012_us_states_dissolved" ADD PRIMARY KEY (gid);
SELECT AddGeometryColumn('','tl_2012_us_states_dissolved','geom','4326','MULTIPOLYGON',2);
COPY "tl_2012_us_states_dissolved" ("id",geom) FROM stdin;
0 0106000020E610000061000000010300000001000000390000005C76887F580465C01A323A2009332DC07533A31F0D0565C0729D62D520342DC0A053909F8D0565C0669E95B4E2332DC038DC476ECD0565C07C6934B918332DC0BC1FB75F3E0665C0B6C7444AB3312DC00327DBC09D0665C02043E389202E2DC07F7EDFBFF90665C0B6E5797077262DC0EC6987BF260765C04CAD8559681F2DC080828B15350765C01C92AF04521A2DC0AD1C5A643B0765C05A67D13B15182DC080F5B86F350765C0EE756F4562122DC01E0071572F0765C09ED920938C0C2DC0AAE28DCC230765C006B1FA230C0B2DC0E9BD3104000765C01683F92B64062DC0D6DF1280FF0665C0F23A8DB454062DC09424CFF5FD0665C08662484E26062DC07825C973FD0665C0301ADCD616062DC0263E7782FD0665C048E3344415062DC01E679AB0FD0665C0B40BE9F010062DC0C05E
@mvexel
mvexel / gist:3641217
Created September 5, 2012 17:53
valgrind shp2pgsql
mvexel@lima$ valgrind /usr/lib/postgresql/9.1/bin/shp2pgsql -c -D -I -i -s 4326 /osm/externaldata/census/tl_2012_us_states_dissolved.shp tl_2012_us_states_dissolved usboundary > /osm/tmp/us.sql
==5501== Memcheck, a memory error detector
==5501== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==5501== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==5501== Command: /usr/lib/postgresql/9.1/bin/shp2pgsql -c -D -I -i -s 4326 /osm/externaldata/census/tl_2012_us_states_dissolved.shp tl_2012_us_states_dissolved usboundary
==5501==
Shapefile type: Polygon
Postgis type: MULTIPOLYGON[2]
==5501==
==5501== HEAP SUMMARY:
@mvexel
mvexel / gist:3703142
Created September 12, 2012 00:03
10 shortest osm ways in Utah
id | len
-----------+-------------------
10086055 | 0.31805243453502
10163052 | 0.779236434027553
148346396 | 0.796935186703433
150809275 | 0.984805582524682
135488964 | 0.994712842046126
10242974 | 1.105460030193
10113886 | 1.12411794159561
159095055 | 1.15479053716816
@mvexel
mvexel / gist:4355365
Created December 21, 2012 19:59
test learnosm to md
![image](data:image/*;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAbrwAAG68BXhqRHAAAAAd0SU1FB9sFFhAQAF9bcF4AACAASURBVHjatL15kG3ZVeb3W3vvM9whp/fyDTXPr+aSqlSDJCQ0CyRwC2iBJNqYhibAYGNoBw43YbojsN3dduAIsKE7jA1uYwculTCIQSOaWkNJqlEqqWaVVHO9Mee8955h7738xz7nZj5VISRVO19lvFeZ+e4956y91vrWt761ngDct3YHrzr4Hu478wFR4ZAoyypEUVVVCYq2gnoVaUErqWR68/nv4ds/7jn1focASrjl8HuV/x8/Ht38JFacBI3WK3rdyptD/71PPPun12/XG0uVTE8tLC3Ntk+t188/8M3qULk8/fkf/5/8t7/WP//Af2IuvvwyOxgNwrAYxB+7+FcBuPP4/80PnPMz/8Gu+bOP/iVHjiwAYkVErlx+01nX8ujGZw4ANyH8vChXKvrzV628+YGX854CcO/aHdx8MBnsvjN3/JqK/A+CtqjUqjpT2BLRbUU2QJ8X5SlFngZ9UlROKrpxy+H3bpxt7NudqkRVjbcdfR93H38/WOXWw+97GUb9FIIxIggIx5beODfqF0/ens28XITKu8SYX95tti/ZnJ7e9W1zMjThePTxeDEun8yL7EFV/abNs7WFxfHWOw/8x+siw/mDjtVX5QtrD9jC5QFFbzv6Pu46eTu3Hfn+rltVuevJP5cYoywsLpnzl9/uV3KZf/+xzU8dUJXLQd4swrtU5XqEkagC/JdXrrzpdwEe2fgEV6+87fsz8H1nPgBgXrX6U/HetQ/8gKj+NcgBVVAUUEQAFRBQIF2AeFV9SpH7Ef2yqN6D8OQth973/NzQp98vMagxz0zCLbf+QjpEd/wer3rPr/+9F/fY5mdAEEAEMWOO+nOXrpp//yf
@mvexel
mvexel / WELCOME.md
Created March 7, 2013 16:01 — forked from tmcw/WELCOME.md

Welcome to OpenStreetMap You have just joined an international volunteer organization whose goal is nothing less than a rich, detail map of the whole world that is open-source. What does that mean? It means that this is a map whose data is available to everyone for free. OpenStreetMap is an important effort that will have impact around the globe. Millions who never have had access to geographical information now will have access to

@mvexel
mvexel / WELCOME.md
Last active December 14, 2015 15:39 — forked from tmcw/WELCOME.md

Welcome to OpenStreetMap, the world's open-source map.

You've just joined a community of over one million contributors who are creating a free, worldwide map. Welcome!

To introduce you to OpenStreetMap, we have compiled a guide with lots of information about mapping and the OpenStreetMap community. We hope you find this useful!

If you have questions that our guide does not cover, help is always close at hand on our Q&A web site.

Happy mapping!


@mvexel
mvexel / gist:5268045
Created March 29, 2013 00:59
SLC Hack Night OSM Links
http://www.openstreetmap.org/
http://tools.geofabrik.de/mc/
http://maps.stamen.com/#watercolor/12/37.8210/-122.4115
http://www.openstreetmap.us/
https://foursquare.com/
http://www.usatoday.com/weather/
http://map.project-osrm.org/
http://switch2osm.org/using-tiles/getting-started-with-leaflet/
http://www.meetup.com/wasatchwizardsofosm/
Process: WebProcess [14307]
Path: /System/Library/StagedFrameworks/Safari/WebKit2.framework/WebProcess.app/Contents/MacOS/WebProcess
Identifier: com.apple.WebProcess
Version: 8536 (8536.26.17)
Build Info: WebKit2-7536026017000000~1
Code Type: X86-64 (Native)
Parent Process: ??? [1]
User ID: 469667667
Date/Time: 2013-04-02 11:35:48.338 -0600