% Title % Name % Date
List
| -- From http://geospatial.nomad-labs.com/2006/12/24/postgis-template-database/ | |
| -- $ sudo su postgres | |
| -- $ psql template1 | |
| \c template1 | |
| CREATE DATABASE template_postgis WITH template = template1; | |
| -- set the 'datistemplate' record in the 'pg_database' table for | |
| -- 'template_postgis' to TRUE indicating its a template | |
| UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis'; |
Say, you want to save your D3 application in a CouchDB database. This is just a proof of concept that this is possible. I use the »Focus + Context« diagram by Mike Bostock (http://bl.ocks.org/1667367) as an example.
Prerequisites:
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "ubuntu" | |
| config.vm.provision :shell, :path => "bootstrap.sh" | |
| config.vm.network "public_network", :bridge => "en0: Wi-Fi (AirPort)" | |
| config.vm.provider :virtualbox do |vb| | |
| vb.customize ["modifyvm", :id, "--memory", "2048"] |
| #!/bin/bash | |
| echo -e "\033[0mCOLOR_NC (No color)" | |
| echo -e "\033[1;37mCOLOR_WHITE\t\033[0;30mCOLOR_BLACK" | |
| echo -e "\033[0;34mCOLOR_BLUE\t\033[1;34mCOLOR_LIGHT_BLUE" | |
| echo -e "\033[0;32mCOLOR_GREEN\t\033[1;32mCOLOR_LIGHT_GREEN" | |
| echo -e "\033[0;36mCOLOR_CYAN\t\033[1;36mCOLOR_LIGHT_CYAN" | |
| echo -e "\033[0;31mCOLOR_RED\t\033[1;31mCOLOR_LIGHT_RED" | |
| echo -e "\033[0;35mCOLOR_PURPLE\t\033[1;35mCOLOR_LIGHT_PURPLE" | |
| echo -e "\033[0;33mCOLOR_YELLOW\t\033[1;33mCOLOR_LIGHT_YELLOW" |
Based on D3.JS and Dimple, ChartFactory provide the ability to build quickly D3.JS charts without coding any lines of javascript. Just define your dashboard in a JSON and voila !
charts: [
{id:'chart1',
width:800,height:250,
xAxis:{type:'Category',field: "Month",orderRule:'Date'},
| SINGLE FILE CONVERT | |
| gdal_translate input_nysdop_ortho.jp2 output.tif -b 1 -b 2 -b 3 -mask 4 -co COMPRESS=JPEG -co JPEG_QUALITY=25 -co PHOTOMETRIC=YCBCR --config GDAL_TIFF_INTERNAL_MASK YES -a_srs EPSG:2260 | |
| BATCH CONVERT | |
| for /r %g in (*.jp2) do gdal_translate -of GTiff "%g" "%~dpng.tif" -b 1 -b 2 -b 3 -mask 4 -co COMPRESS=JPEG -co JPEG_QUALITY=25 -co PHOTOMETRIC=YCBCR --config GDAL_TIFF_INTERNAL_MASK YES -a_srs EPSG:2260 | |
| BUILT VIRTUAL RASTER (CATALOG) | |
| gdalbuildvrt catalog.vrt e_06811416_06_05000_4bd_2011.jp2 e_06811414_06_05000_4bd_2011.jp2 e_06781416_06_05000_4bd_2011.jp2 e_06781414_06_05000_4bd_2011.jp2 | |
| gdalbuildvrt -allow_projection_difference -hidenodata -vrtnodata "255 255 255" nysdop.vrt *.jp2 -a_srs EPSG:2260 |
| function osm2geojson(xml) { | |
| var parser = new DOMParser(); | |
| var doc = parser.parseFromString(xml, 'text/xml'); | |
| var points = {} | |
| d3.select(doc).selectAll('node').each(function() { | |
| var n = d3.select(this) | |
| points[n.attr('id')] = [+n.attr('lon'), +n.attr('lat')] |
###This guide will give you the tools and show you how to download from the OpenStreetMap Overpass API on Windows. These steps were documented while setting up a Windows 7 64-bit machine.###
cURL and Wget are similar utilities to help you download things from the Command Prompt, either one will work - I think cURL might be easier to setup, but depending on your IT restrictions, etc. one or the other might work. You DO NOT need to do both steps A and B, one or the other. But if one method fails, try the other!