Skip to content

Instantly share code, notes, and snippets.

Win Olario govvin

Block or report user

Report or block govvin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@govvin
govvin / level0-bookmarklet.js
Created Dec 23, 2018
bookmarklet for opening OpenStreetMap elements (nodes, ways, relations, changesets) in Level 0 editor
View level0-bookmarklet.js
javascript:(function(){m=(window.getSelection().toString().toLowerCase()||location.href).match(/(|node|way|relation|changeset)\D+(\d+)/);window.open('http://level0.osmz.ru/?url='+(m?m[1]+'/'+m[2]:''));})()
@govvin
govvin / gist:2560946cbc990841dc25a3443dc313ff
Created Nov 12, 2018
MapCSS Styling Overpass Turbo query results with icons
View gist:2560946cbc990841dc25a3443dc313ff
{{style:
node[amenity=hospital] {
icon-image: url('icons/maki/hospital-12.png');
icon-width: 18;
}
node[amenity=bank] {
icon-image: url('https://wiki.openstreetmap.org/w/images/thumb/3/3b/Bank-16.svg/16px-Bank-16.svg.png');
icon-width: 18;
@govvin
govvin / gist:620237d635ca5e6f7f821b534155a66f
Created Nov 12, 2018
MapCSS Styling Overpass Turbo query results
View gist:620237d635ca5e6f7f821b534155a66f
// simple styling
{{style:
node, area
{ color:white; fill-color:white; }
node[amenity=hospital]
{ color:blue; fill-color:blue; }
node[amenity=clinic]
@govvin
govvin / otq_ph_pogo_check.txt
Last active May 2, 2018
Overpass Turbo quey for tags utilized by Pokemon Go for nest tags, to check for suspicious edits in the Philippines. Filter out my own edits.
View otq_ph_pogo_check.txt
// search for Pokemon nests
[out:json][timeout:250];
{{date="2018-04-23T00:00:00Z+8"}}
//avoid false positives by filtering
//known LoCo mappers: maning, GOwin, Rally, Seav
{{party=uid: 1417, 1041828, 24338, 11126}}
(
{{geocodeArea:Philippines}};
)->.searchArea;
@govvin
govvin / l0lize.js
Created Apr 22, 2018
Bookmarklet to open an OpenStreetMap URL (node, way, changeset, etc.) in Level 0
View l0lize.js
javascript: a = document.location.href.split('/');
if (a[2] == 'www.openstreetmap.org') {
document.location.href = '%20http://level0.osmz.ru/?url=' + a[3] + '/' + a[4]
} else {
alert('This%20is%20not%20a%20valid%20OSM%20page.') % 20
}
@govvin
govvin / otq_contributors_given_aoi.txt
Last active May 14, 2018
Overpass Turbo Query: Find contributors within an AOI, within a certain date range
View otq_contributors_given_aoi.txt
/*
Find contributors within an AOI, within
a certain date range
source: http://overpass-turbo.eu/s/xjo
author: https://t.me/GOwin
*/
[out:csv(::user, ::uid, ::timestamp)]
//[out:json][timeout:25]
@govvin
govvin / otq_ph_bus_stops.otq.txt
Created Nov 12, 2017
Overpass Turbo Query: bus stops in the Philippines
View otq_ph_bus_stops.otq.txt
[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 Nov 7, 2017
Overpass Turbo query: number of village halls in a given geographic area
View otq_village_halls_in_an_area.query.txt
/*
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 Nov 7, 2017
query to count suspicicious nodes made (mostly) by maps.me users in the Philippines, filtered by date
View otq_osmph_papercuts_issue_11v2.overpass.txt
/*
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 Nov 6, 2017
Summary of node count of potentially mis-tagged objects in each Philippine region
View otq_query_osmph_papercuts_11.txt
/*
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
You can’t perform that action at this time.