Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wknowles
wknowles / clip-and-reproject-shapefile.sh
Created April 19, 2016 07:03
quick script to clip and re-project a shapefile
#!/bin/bash
base_file='ne_50m_land' # change this to the filename of your shapefile
echo "clipping shapefile ${base_file}.shp"
ogr2ogr -f "ESRI Shapefile" ${base_file}_clipped.shp $base_file.shp -clipsrc -180 -85.06 180 85.06
echo "setting ${base_file} to web mercator projection"
ogr2ogr -t_srs EPSG:3857 ${base_file}_clipped_3857.shp ${base_file}_clipped.shp
@wknowles
wknowles / creating-coastal-vignettes-for-web-mapping.md
Last active December 31, 2017 17:27
a guide to creating coastal vignettes for use in web maps. Using Natural Earth data, GDAL and QGIS.

Creating coastal vignettes for web mapping.

Summary

To start with I downloaded Natural Earth 1:50m land shapefile. This was then reprojected to Web Mercator / EPSG:3857. I ran a series of buffers on the reprojected shapefile within QGIS. These were then combined, exported to Mapbox and styled. The final map turned out like this:

coastal vignetts

View the full web map on Mapbox.

@wknowles
wknowles / nav.css
Last active March 8, 2016 14:44
nav info for ckd
nav {
width: 100%;
/*background: #253241;*/
text-align:center;
}
nav ul {
list-style-type: none;
margin: 0 auto;
padding: 0;
.site-header:after, .controls:after {
content: " ";
display: table;
clear: both;
}
a, a:focus, a:hover, figcaption a, figcaption a:focus, figcaption a:hover {
background-position: bottom;
background-repeat: repeat-x;
background-size: 2px 2px;
}
@wknowles
wknowles / Package Control.sublime-settings
Last active February 29, 2016 09:46
Sublime Text 3 Settings
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"Color Highlighter",
"DocBlockr",
"JSHint",
@wknowles
wknowles / README.md
Last active February 28, 2016 09:49
Patterson Cylindrical
@wknowles
wknowles / screenshotTable.sh
Created February 25, 2016 08:58
script to display colorscheme for terminal screenshots
#!/bin/bash
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#
/* Sticky headers for list views and lists in quick edit mode
* ---------------------------------------------
* Created by Daniel Stoelzner
* stoelzner.daniel@gmail.com
* http://spoodoo.com
* Copyright (c) 2015 Daniel Stoelzner (Licensed under the MIT X11 License)
* v2.9BETA for SharePoint 2013
* LastMod: 29th of May, 2015
* ---------------------------------------------
* Include reference to:
@wknowles
wknowles / index.html
Last active December 27, 2015 12:48
lagrange
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="/icon/favicon.ico" type="image/x-icon">
<link rel="icon" href="/icon/favicon.png" type="image/png">
<link rel="icon" sizes="32x32" href="/icon/favicon-32.png" type="image/png">
<link rel="icon" sizes="64x64" href="/icon/favicon-64.png" type="image/png">
<link rel="icon" sizes="96x96" href="/icon/favicon-96.png" type="image/png">
<link rel="icon" sizes="196x196" href="/icon/favicon-196.png" type="image/png">