In the project directory:
npm install tessera tilelive-mapnik tilelive-carto
brew install fswatch| with params as ( | |
| select | |
| 27.61649608612061 as minlon, | |
| 53.85379229563698 as minlat, | |
| 27.671985626220707 as maxlon, | |
| 53.886459293813054 as maxlat | |
| ), direct_nodes as ( | |
| select n.id, n.version, n.changeset, n.timestamp, n.lat, n.lon | |
| from | |
| planet n, |
| IFS="\n"; for line in $(grep JPG 2016_06_08_fluff4_geoinfo.txt); do echo $line | awk '{print "exiftool " $1 " -exif:gpslatitude=" $2 " -exif:gpslatituderef=S -exif:gpslongitude=" $3 " -exif:gpslongituderef=W -exif:gpsaltitude=" $4}'; done > fluff4.sh; IFS= |
| import math | |
| import sys | |
| import rasterio | |
| from rasterio.warp import (calculate_default_transform, transform) | |
| CHUNK_SIZE = 256 | |
| from __future__ import print_function | |
| import json | |
| import sys | |
| import fiona | |
| from fiona.crs import from_epsg | |
| import rasterio | |
| from rasterio import features |
To run this on EMR, do something akin to the following (with buckets changed as appropriate):
aws emr create-cluster \
--name "NED Conversion" \
--log-uri s3://ned-13arcsec.openterrain.org/logs/ \
--release-label emr-4.0.0 \
--use-default-roles \
--auto-terminate \
--ec2-attributes KeyName=stamen-keypair \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| <GDAL_WMS> | |
| <Service name="TMS"> | |
| <ServerUrl>http://tile.openstreetmap.org/${z}/${x}/${y}.png</ServerUrl> | |
| </Service> | |
| <DataWindow> | |
| <UpperLeftX>-20037508.34</UpperLeftX> | |
| <UpperLeftY>20037508.34</UpperLeftY> | |
| <LowerRightX>20037508.34</LowerRightX> | |
| <LowerRightY>-20037508.34</LowerRightY> | |
| <TileLevel>18</TileLevel> |
| "use strict"; | |
| var AWS = require("aws-sdk"); | |
| AWS.config.update({ | |
| region: process.env.AWS_DEFAULT_REGION || AWS.config.region || "us-east-1" | |
| }); | |
| var dynamodb = new AWS.DynamoDB(); |
| #!/usr/bin/env node | |
| /* eslint-disable no-sync */ | |
| "use strict"; | |
| var assert = require("assert"), | |
| fs = require("fs"), | |
| path = require("path"), | |
| util = require("util"); | |
| var env = require("require-env"), |