Skip to content

Instantly share code, notes, and snippets.

@xuanlongma
Created May 24, 2013 08:21

Revisions

  1. Richard Ma created this gist May 24, 2013.
    14 changes: 14 additions & 0 deletions gdal_reproject.R
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    ## a tiff file
    input <- "modis.evi.tif"
    output <- "modis.evi.reprojected.tif"

    ## GDAL command line for reprojection
    proj.cmd.warp <- 'gdalwarp -t_srs \'+proj=latlong +datum=WGS84\' -r near -overwrite'

    ## Invoke the system GDAL command
    system(command = paste(proj.cmd.warp, input, output, sep = ' '))

    ## END