Skip to content

Instantly share code, notes, and snippets.

View govvin's full-sized avatar

거윈 | Win govvin

View GitHub Profile
@govvin
govvin / otq_ql_bus_routes.txt
Created May 11, 2016 10:59
Display Public Transport routes in given bbox
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“route=bus”
*/
[out:json][timeout:25];
// gather results
(
// query part for: “route=bus”
node["route"="bus"]({{bbox}});
@govvin
govvin / otq_ql_querying_changes.md
Last active May 12, 2016 04:20
Overpass Turbo QL :: querying for changes

There are several ways to query for modifications using OverPass, with slightly varying results. Use wisely.

##Using diffs

//Overpass QL for querying results
//http://overpass-turbo.eu/s/b6e

//[out:csv(::lat,::lon,::type, ::version, ::user, place,name)]
[diff:"2016-05-07T00:00:00+8","2016-05-14T00:00:00+8"]; 
@govvin
govvin / otq_party_edits.md
Created March 8, 2016 02:58
query for changes made during events, given a geographical area, and a list of OSM uids

#Overpass Turbo query: for edits made during events, given a geographical area, and a list of OSM uids

[out:json]
[timeout:55];

{{dates="2016-02-23T00:00:00+8", "2016-03-07T00:00:00+8"}}
{{party=1041828}}

//union areas of study
@govvin
govvin / OTQ_event_edits_geocodearea.md
Created February 24, 2016 11:41
Query edits made in a geocoded region, by enumerated uids, within a date range. Perfect for events like mapathons and training workshops.

#Overpass Turbo Query

/* Overpass Turbo Query for edits made during mapathons, and similar mapping events. */

// set variables
{{dates="2016-02-22T00:00:00Z", "2016-02-25T23:59:59Z"}}
{{party=1041828}}
@govvin
govvin / otq_manila_fire_brigades.md
Created May 9, 2016 07:26
Overpass Turbo query to gather fire stations, volunteer fire brigades, and fire hydrants in Manila.
/*
Query for ALL fire stations and hydrants
//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
//{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png
//tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png

//{s}.tile.stamen.com/toner/{z}/{x}/{y}.png
//toolserver.org/~cmarqu/hill/{z}/{x}/{y}.png
//a.tile2.opencyclemap.org/transport/{z}/{x}/{y}.png
@govvin
govvin / manilaMapathon_edits.tsv
Created January 26, 2016 09:36
U.S. Embassy Mapathon stats, 2016-023
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 32 columns, instead of 1. in line 7.
ekip osmuser_uid osmuser_name changeset objects objects_c objects_m objects_d node_c way_c relation_c node_m way_m relation_m node_d way_d relation_d poi_total_nodes node_amenity node_shop node_office node_power node_place node_man_made node_history node_tourism node_leisure way_highway way_waterway way_building way_landuse way_man_made
0 900923 curran74 0 4053 3899 87 67 3216 683 0 82 5 0 60 7 0 0 0 0 0 0 0 0 0 0 0 11 4 663 1 0
0 3089153 Sea Tea Zen 0 3656 3551 89 16 3132 419 0 67 22 0 15 1 0 0 0 0 0 0 0 0 0 0 0 0 23 383 12 0
0 3556440 sch93 0 2006 1874 120 12 1550 324 0 108 12 0 9 3 0 0 0 0 0 0 0 0 0 0 0 3 12 307 0 0
0 3556185 osmcr 0 1853 1846 7 0 1586 259 1 4 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 225 15 0
0 3556439 Fdk Ville 0 1592 1433 99 60 1152 281 0 4 95 0 48 12 0 0 0 0 0 0 0 0 0 0 0 0 0 141 0 0
0 3556479 Jofel Bayron 0 1884 1354 490 40 1284 70 0 428 62 0 40 0 0 0 0 0 0 0 0 0 0 0 0 6 14 24 18 0
0
@govvin
govvin / otq_barangay_townhalls.txt
Created March 4, 2017 02:38
Barangay Halls in San Juan, Metro Manila
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“(amenity=townhall && "townhall:type"=village) && (type:node || type:way) || place=village in "San Juan, Metro Manila"”
*/
[out:json][timeout:25];
// fetch area “San Juan, Metro Manila” to search in
{{geocodeArea:San Juan, Metro Manila}}->.searchArea;
// gather results
(
@govvin
govvin / otq_maps.me_cleanup_streets_as_tourism
Created April 8, 2017 23:36
Overpass Turbo query to collect all nodes tagged as tourism=viewpoint OR tourism=attraction OR tourism=artwork with "street" or "st." in their names
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“(tourism=viewpoint || tourism=attraction || tourism=artwork) && (name ~ /street$/i || name ~ /str[.]/i) && type:node in philippines”
*/
[out:json][timeout:250];
// fetch area “philippines” to search in
{{geocodeArea:philippines}}->.searchArea;
// gather results
(
@govvin
govvin / OTQ_event_edits_bbox_by_uid.md
Last active April 27, 2017 11:14
Overpass Turbo Query for edits made during mapathons, and similar mapping events.

Overpass Turbo Query to return all edits made by users enumerated by UID, within a {{bbox}}.

Use http://whosthat.osmz.ru to determine OSM uid of users. UID is used, instead of usernames, to work around the possibility of users changing their names later on.

// set variables
{{dates="2017-04-26T00:00:00Z", "2017-04-27T23:59:59Z"}}
{{party=uid: 3529916, 3529870, 3091096, 3529864, 2734688, 1041828, 3529877, 3529856, 3529972, 3529907, 3529855}}
//{{party=user:}}
@govvin
govvin / otq_mapathon_edits.md
Created June 20, 2017 06:44
overpass turbo query for mapathon edits

Overpass Turbo Query

overpass turbo query for mapathon edits

{{party=uid: 1041828, 24338, 24338, 1577427, 6088831, 6088818, 5548564, 4892460, 4892371, 6088824, 4645947}}
[diff: "2017-05-29T07:00:00Z","2017-05-30T23:59:59Z"]


[out:json]
[timeout:200];