Skip to content

Instantly share code, notes, and snippets.

View johnbaums's full-sized avatar

John johnbaums

  • University of Melbourne
  • Melbourne
View GitHub Profile
@wkmor1
wkmor1 / rasterToKML.r
Last active December 24, 2015 09:08
convert raster objects or raster readable files to .kml overlay files
rasterToKML <- function(x, out='Rgrid', png=FALSE, name=out, proj="+proj=longlat") {
require(raster)
require(maptools)
require(rgdal)
require(rgeos)
x <- raster(x)
SG <- as(x, 'SpatialGridDataFrame')
proj4string(SG) <- CRS(proj)
SG <- GE_SpatialGrid(SG)
if(png) png <- sprintf('%s.png', out) else png <- tempfile()
@andrewharvey
andrewharvey / README.md
Created September 29, 2012 02:34
Geoscience Australia - Australian Bathymetry and Topography Grid

About

This package contains a set of tools, utilities and stylesheets for working with the Geoscience Australia Australian Bathymetry and Topography Grid.

Here is a sample rendering of this Geoscience Australia Australian Bathymetry and Topography Grid using the process documented in this repository.

Australian Bathymetry and Topography Grid

License

@hadley
hadley / gist:837414
Created February 21, 2011 17:50
which-encoding.r
all <- iconvlist()
names(all) <- all
tries <- llply(all[330:350], function(cur) iconv(song$artist, cur, "UTF-8"))
vapply(tries, function(x) sum(is.na(x)), integer(1))