sudo yum -y update
sudo yum-config-manager --enable epel
sudo yum -y install make automake gcc gcc-c++ libcurl-devel proj-devel geos-devel
cd /tmp
curl -L http://download.osgeo.org/gdal/2.0.0/gdal-2.0.0.tar.gz | tar zxf -
cd gdal-2.0.0/
./configure --prefix=/usr/local --without-python
make -j4
sudo make install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See tth.im/s3json for a full explanation of this code | |
const AWS = require('aws-sdk'); | |
const S3 = new AWS.S3(); | |
exports.handler = async (_, context) => { | |
try { | |
const query = 'SELECT * FROM s3object[*].results[*] r;'; | |
// test query is against data from https://swapi.co/api/planets/?page=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Discrete Fréchet Distance | |
* By Andreas Argelius http://argeli.us/ | |
* | |
* Implementation of Discrete Frechet Distance in Javascript. | |
* | |
* The paths are defined as [[x0, y0], [x1, y1], ...] | |
* | |
*/ | |
(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bulk convert shapefiles to geojson using ogr2ogr | |
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/ | |
# Note: Assumes you're in a folder with one or more zip files containing shape files | |
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere) | |
#geojson conversion | |
function shp2geojson() { | |
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var osmium = require('osmium'); | |
var _ = require("lodash") | |
var count = 0; | |
var restrictions=0; | |
var relHandler = new osmium.Handler(); | |
var geomHandler = new osmium.Handler(); | |
var nodes = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in ~/.bashrc | |
export SSH_AUTH_SOCK=/tmp/.ssh-socket | |
ssh-add -l > /dev/null | |
if [ $? = 2 ]; then | |
rm -f $SSH_AUTH_SOCK | |
echo Starting new ssh-agent... | |
eval $(ssh-agent -a $SSH_AUTH_SOCK) > /dev/null | |
ssh-add && echo "ssh-agent set up successfully with the following keys:" && ssh-add -l | |
fi |
- Add Indian disputed boundaries source:
planemad.bb1ba8b5
to you style project from the layers panel - If the source is locked, open the project.yml file and append it manually to the source field. You would also need to manually add the layers
boundaries-claimed
andboundaries-disputed
after theadmin
layer similiar to this:
source: "mapbox:///mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v6,planemad.bb1ba8b5"
layers:
- landcover
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
#go to /usr/local/lib and delete any node and node_modules cd /usr/local/lib sudo rm -rf node*