Project

General

Profile

« Previous | Next » 

Revision 13367984

Added by Jim Regetz over 12 years ago

  • ID 13367984d29edca632a9fe5d3a6fe40c756167e3

added R script to run multiscalesmooth example on Oregon SRTM

View differences:

terrain/research/oregon/arcgis/v2/test-smooth.R
1
# Experimental R procedural code to run multiscalesmooth function on
2
# srtm_oregon binary grid produced by Ming
3
#
4
# Jim Regetz
5
# NCEAS
6
# Crated on 27-Mar-2012
7

  
8
library(raster)
9

  
10
# set up some local paths on atlas
11
src.dir <- "/home/regetz/git/environmental-layers/terrain/research/oregon/arcgis/v2"
12
data.dir <- "/home/layers/commons/topo/v2/experimental"
13

  
14
source(file.path(src.dir, "multiscalesmooth9a_clean.R"))
15

  
16
srtm_oregon <- raster(file.path(data.dir, "srtm_oregon"))
17

  
18
# create a subset of data to work with
19
srtm.sub <- crop(srtm_oregon, extent(srtm_oregon, r1=4001, r2=6000,
20
    c1=4001, c2=6000))
21

  
22
srtm.sub.sm <- multiscalesmooth(srtm.sub, sd=0.001)
23

  

Also available in: Unified diff