Skip to content

Instantly share code, notes, and snippets.

View simonpoole's full-sized avatar

Simon Poole simonpoole

  • Myself
  • A bit outside of Zürich, Switzerland
View GitHub Profile
10-27 04:47:32.612: D/Search(1045): urlString: http://nominatim.openstreetmap.org/search?q=Dietikon&viewboxlbrt=85390934%2C473778406%2C85396342%2C473783604&format=jsonv2
10-27 04:47:32.722: D/OkHttp(1045): --> GET http://nominatim.openstreetmap.org/search?q=Dietikon&viewboxlbrt=85390934%2C473778406%2C85396342%2C473783604&format=jsonv2 http/1.1
10-27 04:47:32.722: D/OkHttp(1045): Host: nominatim.openstreetmap.org
10-27 04:47:32.722: D/OkHttp(1045): Connection: Keep-Alive
10-27 04:47:32.722: D/OkHttp(1045): Accept-Encoding: gzip
10-27 04:47:32.722: D/OkHttp(1045): User-Agent: Vespucci/0.9.8.1.1205
10-27 04:47:32.732: D/OkHttp(1045): --> END GET
10-27 04:47:32.772: D/OkHttp(1045): <-- 400 Bad Request http://nominatim.openstreetmap.org/search?q=Dietikon&viewboxlbrt=85390934%2C473778406%2C85396342%2C473783604&format=jsonv2 (43ms)
10-27 04:47:32.772: D/OkHttp(1045): Date: Thu, 27 Oct 2016 08:47:32 GMT
10-27 04:47:32.772: D/OkHttp(1045): Server: Apache/2.4.18 (Ubuntu)
Switzerland 30 min -> 4.4 GB original 137'000 tiles, input 500MB .osm.bz2
The original imagery has 4 bands (RGB and NIR) and 16bit values
Build the virtual image using the RGB bands
gdalbuildvrt -a_srs EPSG:21781 -allow_projection_difference -b 1 -b 2 -b 3 -input_file_list tifs16.list 2016rgb.vrt
Translate from 16 bit to 8 bit values (note this is fairly slow)
gdal_translate -scale -of VRT -ot Byte 2016rgb.vrt 2016rgb8.vrt
@simonpoole
simonpoole / TonHs magic
Created July 8, 2017 05:32
pulll PRs as branches
+refs/heads/*:refs/remotes/github/*
+refs/pull/*/head:refs/remotes/github/pull/*
http://www.openstreetmap.org/user/Mathew%20Wade
http://www.openstreetmap.org/user/Bill%20Prat
http://www.openstreetmap.org/user/Chris%20Harris
http://www.openstreetmap.org/user/Mark%20Michal
New editors starting with maps.me
Month New Changes
>10 >100 >1000
2016-02 2 1
2016-03 26 17 6 1
2016-04 7257 1648 277 68
2016-05 6668 1090 144 25
2016-06 11212 1493 182 32
2016-07 11211 1438 163 28
gis=> \o schools_points.txt
schools_points.txt: Permission denied
gis=> \o /tmp/schools_points.txt
gis=> select St_asGeoJson(st_transform(way,4326)),hstore_to_json(tags) from planet_osm_point where amenity='school';
gis=> \o /tmp/schools_polygons.txt
gis=> select St_asGeoJson(st_transform(St_centroid(way),4326)),hstore_to_json(tags) from planet_osm_polygon where amenity='school';
"landuse/military/airfield":[
"plane",
"navy",
"guard",
"air force",
"war",
"troop",
"bomb",
"marine",
"army",
Rank Uid Time (chg. closed) Changeset ID
999995 7239739 2017-12-14 19:30:55 54633869
999996 7239612 2017-12-14 19:32:43 54633904
999997 3352650 2017-12-14 19:34:09 54633943
999998 7239704 2017-12-14 19:36:16 54633990
999999 7239597 2017-12-14 19:37:59 54634040
1000000 7221032 2017-12-14 19:39:17 54634076
1000001 7239656 2017-12-14 19:41:15 54634135
1000002 7239488 2017-12-14 19:42:38 54634171
<SK53> simonpoole: I've still not had the courage to de-cadastre my uncle's house (#14 here (Link: https://www.openstreetmap.org/#map=19/48.28660/-3.59883)https://www.openstreetmap.org/#map=19/48.28660/-3.59883)
...
<simonpoole> afraid of the ghost of cadastre past?