Skip to content

Instantly share code, notes, and snippets.

@dalekunce
dalekunce / Myanmar_tracingguide.md
Created April 24, 2018 23:41
Myanmar Tracing Guide

OSM Tracing Guide for Myanmar

The Red Cross is mapping the Ayeyarwady Delta area in Myanmar as part of a multi-year mapping and data readiness activity to better understand where critical infrastructure and roads are to inform decision making during potential disasters. As recently as 2008 a cyclone killed at least 77,000 people with over 55,900 missing, and left about 2.5 million homeless. The map data will help the Red Cross to better understand where people live in relation to potential hazards so that we can help them be prepared for the disaster and so national decision makers can make better decisions in the immediate aftermath of a disaster. The Missing Maps project aims to map the most vulnerable places in the world (affected by humanitarian crises: disease epidemics, conflict, natural disasters, poverty, environmental crises). Building on HOT's disaster preparedness projects, the Missing Maps tasks facilitate pre-emptive mapping of priority countries to better facilitate disaster response, medical

@dalekunce
dalekunce / country_bbox.js
Created November 8, 2017 22:43
Simple script to get bbox from a geojson and save to a file
'use strict';
const turf = require('turf');
const countries = require('./countries.json');
const jsonfile = require('jsonfile')
var file = 'countries_bbox.json';
var bboxs = [];
@dalekunce
dalekunce / irma_tasks_2017_9_8_1200.geojson
Created September 8, 2017 18:19
hot irma tasks as of noon pacific on 9/8
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dalekunce
dalekunce / overpass_query_since_date
Created June 12, 2017 19:10
osm edits since a data/time
#
Simply modify the three following strings for node, ways and relations
newer than="2013-05-28T00:00:00Z
This script is for statistics. For example, it does not extract all nodes from a way if only one node is modified, since the way object and other nodes are not affected.
If you want only the nodes, you only keep the first section of the script where the nodes are extracted.
The polygon-query bounds is to clip the CAP103 area, extracting info only for this area.
@dalekunce
dalekunce / westafrica_newer_overpass.osm
Created December 20, 2016 17:42
overpass_getnewest
<osm-script output="json" timeout="3600">
<union into="_">
<query into="_" type="node">
<newer than="2015-11-01T00:00:00Z"/>
<bbox-query e="-6.229248046875" into="_" n="10.919617760254697" s="3.491489430459778" w="-14.919433593750002"/>
</query>
</union>
<print e="" from="_" geometry="skeleton" limit="" mode="body" n="" order="id" s="" w=""/>
<recurse from="_" into="_" type="down"/>
<print e="" from="_" geometry="skeleton" limit="" mode="skeleton" n="" order="quadtile" s="" w=""/>
@dalekunce
dalekunce / getsrtm.sh
Last active February 19, 2016 16:21
getsrtm.sh
# SRTM OpenTerrain downloader
# look up desired srtm30 tiles here https://gist.github.com/dalekunce/f9157ded57e8e7e6c4f5
# save to a file with each url being a new line
#run by using ./srtm.sh <file>
for line in `cat $1`;do
echo $line
s3cmd get $line
unzip $line
done
@dalekunce
dalekunce / osm_extract_workflow.md
Last active September 15, 2019 15:14
workflow for cutting part of an osm file

Quick workflow to setup and cut an osm file with a polygon file

##install osmconvert

wget -O - http://m.m.i24.cc/osmconvert.c | cc -x c - -lz -O3 -o osmconvert

##move it to bin folder

cp osmconvert /usr/local/bin/osmconvert
@dalekunce
dalekunce / rcrc_locations.geojson
Created December 31, 2015 03:44
rcrc_locations
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dalekunce
dalekunce / wgs84_westafrica_15km_aoi_pluscities.geojson
Created December 23, 2015 03:42
westafrica_borderproject.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dalekunce
dalekunce / posm_diary.md
Last active December 20, 2015 14:55
portable osm diary

The American Red Cross GIS Team is constantly looking for new ways to improve our workflows and learn from the OpenStreetMap and FOSS4G communities. I'm proud to say that 95% of the GIS analysis and map making we do is done using FOSS4G tools.

A couple of years ago we realized that to be effective consumers of OSM data and FOSS4G software we would need to start contributing and developing ourselves.

In the aftermath of Typhoon Haiyan we identified a need for a better OSM field data collection tool that could work with structured surveys. Eventually we created OpenMapKit with initial seed money from USAID Global Development Lab. We have used OpenMapKit in several Missing Maps field mapping missions last year in [Zimbabwe, Rwanda, Tanzania, and Bangladesh](http://osmstories.org/articles/Missing-Maps-community-map