Skip to content

Instantly share code, notes, and snippets.

View govvin's full-sized avatar

거윈 | Win govvin

View GitHub Profile
@govvin
govvin / phl-mc-mapinkmurals.json
Last active April 18, 2022 01:19
MaPinkMurals. A MapComplete theme for adding #KakamPink murals on OpenStreetMap.
{
"id": "mapinkmurals",
"title": {
"en": "Mapping #Kakampink Murals in PH"
},
"shortDescription": {
"en": "Mapping artworks by #Kakampink volunteers"
},
"description": {
"en": "This map makes it easy to add #Kakampink artwork, and photos, in the public space, especially murals. "
@govvin
govvin / gist:485799d070d031fb85475c94001e3ace
Created May 12, 2021 02:09
Query for boundary relations with missing "admin_centre" roles
/*
Question: Boundary relations without "admin_centre" role nodes
Overpass Turbo query: http://overpass-turbo.eu/s/17ef
For admin_level details, see https://osm.org/wiki/Philippines/Mapping_conventions#Administrative_boundaries
*/
[out:json][timeout:600];
area[admin_level=2]["name"="Philippines"][boundary=administrative]->.NominatimArea;
@govvin
govvin / overpass_turbo_barangays_PH
Created May 12, 2021 01:43
Query for available Philippine barangay boundaries in OpenStreetMap
/*
Overpass Turbo query: Barangay boundaries in OpenStreetMap.
Run: https://overpass-turbo.eu/s/17ed
For admin_level details, see osm.org/wiki/Tag:boundary%3Dadministrative#11_admin_level_values_for_specific_countries
*/
[out:json][timeout:50];
{{geocodeArea:Philippines}}->.searchArea;
(
@govvin
govvin / overpass_turbo_tiles.md
Last active March 26, 2021 23:39
URIs of tiles that work with Overpass Turbo

#URIs that work with Overpass Turbo Go to Settings > Map and change the URI to your server of choice.

The default is: //{s}.tile.openstreetmap.org/{z}/{x}/{y}.png

The following tile servers also work:

  • Humanitarian: //{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png
  • Mapnik, Grayscale: //tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png
  • Thunderforest
@govvin
govvin / level0-bookmarklet.js
Created December 23, 2018 02:32
bookmarklet for opening OpenStreetMap elements (nodes, ways, relations, changesets) in Level 0 editor
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 November 12, 2018 08:24
MapCSS Styling Overpass Turbo query results with icons
{{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 November 12, 2018 08:08
MapCSS Styling Overpass Turbo query results
// simple styling
{{style:
node, area
{ color:white; fill-color:white; }
node[amenity=hospital]
{ color:blue; fill-color:blue; }
node[amenity=clinic]
@govvin
govvin / otq_contributors_given_aoi.txt
Last active May 14, 2018 03:11
Overpass Turbo Query: Find contributors within an AOI, within a certain date range
/*
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_pogo_check.txt
Last active May 2, 2018 00:42
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.
// 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 April 22, 2018 13:31
Bookmarklet to open an OpenStreetMap URL (node, way, changeset, etc.) in Level 0
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
}