Skip to content

Instantly share code, notes, and snippets.

@dalekunce
dalekunce / mac_gis_setup.md
Last active July 29, 2023 22:18
Yosemite GIS Machine Setup

Mac OS X GIS Setup

OS X Preferences


# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
@dalekunce
dalekunce / synology_nodejs_install.md
Created January 18, 2015 13:23
Install nodejs on synology box
@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 / 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 / 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dalekunce
dalekunce / mapillary_setup.md
Last active May 13, 2017 09:57
Mapillary Setup and Tools

#merge gpx files

gpsbabel -i gpx -f file1.gpx -f file2.gpx -o gpx -F merged.gpx

#attach GPX to photo get needed libs first

pip install gpxpy
brew install pyexiv2 exiftool
git clone https://github.com/mapillary/mapillary_tools.git
python geotag_from_gpx.py path/to/photos gpx_track.gpx timeoffset
@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