Skip to content

Instantly share code, notes, and snippets.

View govvin's full-sized avatar

거윈 | Win govvin

View GitHub Profile
@govvin
govvin / otq_ph_bus_stops.otq.txt
Created November 12, 2017 05:27
Overpass Turbo Query: bus stops in the Philippines
[out:xml][timeout:90][bbox:29.4013195,33.8818359,33.4131022,36.0791016]
;
(
area(3600443174); // Philippines
area(3600147488); // National Capital Region
)->.a;
(
node["highway"="bus_stop"](area.a);
way["highway"="bus_stop"](area.a);
@govvin
govvin / otq_village_halls_in_an_area.query.txt
Created November 7, 2017 08:55
Overpass Turbo query: number of village halls in a given geographic area
/*
number of village halls in a province
*/
[out:csv(::id,"name",::lat,::lon,::is_in;false)]
[timeout:60];
area["name"="Calabarzon"]->.territory;
way(area.territory)["townhall:type"="village"];
foreach(
node(w)->.n;
.n is_in->.a;
@govvin
govvin / otq_osmph_papercuts_issue_11v2.overpass.txt
Last active November 7, 2017 05:46
query to count suspicicious nodes made (mostly) by maps.me users in the Philippines, filtered by date
/*
See: https://git.io/vFCea
*/
[out:csv("ISO3166-2", name, total )][timeout:500];
{{period="2017-10-31T23:59:59Z"}}
//All PH regions
area["ISO3166-2"~"^PH"][admin_level=3][boundary=administrative];
// Count the occurunces in each area
@govvin
govvin / otq_query_osmph_papercuts_11.txt
Last active November 6, 2017 00:11
Summary of node count of potentially mis-tagged objects in each Philippine region
/*
OSMph Papercuts issue #11 - https://git.io/vFCea
*/
[out:csv(name, total )];
//All PH regions
area["ISO3166-2"~"^PH.*"][admin_level=3];
// Count the occurunces in each area
@govvin
govvin / phl_tags_draft.xml
Created September 10, 2017 02:18
JOSM presets of common objects in the Philippines
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0" author="GOwin" description="tagging conventions in the Philippines" shortdescription="" version="0.01">
<group name="PH Tags">
<!--
This file is generated by EasyPresets plugin.
https://github.com/maripo/JOSM_easypresets/blob/master/README.md
It support just a few tags and attributes.
If you want to share your custom tags with other users, please look through the official document.
https://github.com/maripo/JOSM_easypresets/blob/master/README.md
@govvin
govvin / hydrants_davao_city_20170814.geojson
Last active August 14, 2017 20:17
fire hydrant data provided by BFP-Davao City allowed for OSM conflation.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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];
@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_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_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
(