The service name is postgresql and it accepts the usual commands for a background service:
startstoprestartstatus
| /** | |
| Returns an object which can be used to calculate statistics on the | |
| the passed numeric Array. | |
| */ | |
| var Stats = function (arr) { | |
| arr = arr || []; | |
| // http://en.wikipedia.org/wiki/Mean#Arithmetic_mean_.28AM.29 | |
| this.arithmeticMean = function () { | |
| var i, sum = 0; |
| import math | |
| def tweensegs(longitude1, latitude1, longitude2, latitude2, num_of_segments): | |
| ptlon1 = longitude1 | |
| ptlat1 = latitude1 | |
| ptlon2 = longitude2 | |
| ptlat2 = latitude2 | |
| numberofsegments = num_of_segments | |
| onelessthansegments = numberofsegments - 1 |
| # Credit goes to my colleague Tyler (http://tylerickson.blogspot.com/2011/09/installing-gdal-in-python-virtual.html) | |
| ENVDIR=/usr/local/pythonenv/ | |
| ENVNAME=nasabaer-env | |
| OWNER=arthur | |
| # Install GEOS if necessary | |
| # sudo apt-get libgeos-3.2.2 libgeos-dev | |
| # Install GDAL on the system |
In general, it seems there are roughly five (5) ways to get "file data" (e.g. a GeoTIFF) out of a PostGIS geoprocessing workflow:
Apparently even a difference of the least precision of the upper left-hand corner causes an alignment error in PostGIS. Consider this example, where I am comparing a land cover raster subset by an MTBS raster and the MTBS raster itself (with the goal being to add the latter to the former, creating the "burned" land cover).
```
SELECT ST_MetaData(r1.rast)
FROM
(SELECT rast
FROM geowepp_burnedarea
WHERE geowepp_burnedarea.rid = 2) r1
UNION
SELECT ST_MetaData(r2.rast)
| # Clear out any old ppa's that might conflict | |
| sudo rm /etc/apt/sources.list.d/*mapnik* | |
| sudo rm /etc/apt/sources.list.d/*developmentseed* | |
| sudo rm /etc/apt/sources.list.d/*chris-lea* | |
| # Add new ppa's | |
| echo 'yes' | sudo apt-add-repository ppa:chris-lea/node.js | |
| echo 'yes' | sudo apt-add-repository ppa:mapnik/nightly-trunk | |
| # Update |