An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
# Some good references are: | |
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
#1. Install PostgreSQL postgis and postgres | |
brew install postgis | |
initdb /usr/local/var/postgres | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
This script allows you to add markers to the MapBox markers interface, in bulk,
from a GeoJSON file that contains Point
geometries only.
Since it only accepts GeoJSON, you can use OGR, togeojson, or csv2geojson to get usable input data.
This requires you to use the Javascript console of your browser and know elementary Javascript. For instance, a process might look like:
get source code http://trac.osgeo.org/gdal/wiki/DownloadSource let's use GDAL 1.10.1 for this example.
here's the page on BuildingOnUnix http://trac.osgeo.org/gdal/wiki/BuildingOnUnix
here's the page for MrSID / GDAL http://trac.osgeo.org/gdal/wiki/MrSID
get the DSDK from LizardTech https://www.lizardtech.com/developer/ - version I used was MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44
I made a folder /home/oeon/local/src
and put it there. I also extracted my GDAL src code there.
i made a folder /home/oeon/local/gdal1101
#!/bin/bash | |
function s3du(){ | |
bucket=`cut -d/ -f3 <<< $1` | |
prefix=`awk -F/ '{for (i=4; i<NF; i++) printf $i"/"; print $NF}' <<< $1` | |
aws s3api list-objects --bucket $bucket --prefix=$prefix --output json --query '[sum(Contents[].Size), length(Contents[])]' | jq '. |{ size:.[0],num_objects: .[1]}' | |
} | |
s3du $1; |
#!/bin/bash | |
function to_tiles(){ | |
geojson=$1; | |
zoom=$2; | |
jq -c .features[] < "$geojson" | mercantile tiles $zoom | sort | uniq | |
} |