Revision 9d19fb11
Added by Rick Reeves over 13 years ago
- ID 9d19fb11e34b5518456dc95bba973107d8df9de0
terrain/rscripts/makeImagePairTable.r | ||
---|---|---|
15 | 15 |
require(raster) |
16 | 16 |
require(rgdal) |
17 | 17 |
|
18 |
inputCgiarRaster <- raster("/data/project/organisms/rcr/AsterCgiarMerge/mergeCgiarAsterBdySRTM_BL.tif") |
|
19 |
inputAsterRaster <- raster("/data/project/organisms/rcr/AsterCgiarMerge/mergeCgiarAsterBdyASTER_BL.tif") |
|
20 |
inputMosaicRaster <- raster("/data/project/organisms/rcr/AsterCgiarMerge/mergeCgiarAsterBdyFinalBL.tif") |
|
18 |
inputCgiarRaster <- raster("/data/project/organisms/rcr/AsterCgiarMerge/mergeCgiarAsterBdySRTM_BLEven.tif")
|
|
19 |
inputAsterRaster <- raster("/data/project/organisms/rcr/AsterCgiarMerge/mergeCgiarAsterBdyASTER_BLEven.tif")
|
|
20 |
inputMosaicRaster <- raster("/data/project/organisms/rcr/AsterCgiarMerge/mergeCgiarAsterBdyFinalBLEven.tif")
|
|
21 | 21 |
inputCDEMRaster <- raster("/data/project/organisms/rcr/ValidateBoundary/CDEMMosCgiarAsterBdy_BLEven.tif") |
22 | 22 |
# |
23 | 23 |
# Difference image for entire merged image takes a while to create, |
... | ... | |
52 | 52 |
|
53 | 53 |
# Compute the difference image for the entire study area, and for the region along |
54 | 54 |
# the boundary (narrow, maybe 10 pixels either side) |
55 |
extent(rEdgeRegionMosaic) = extent(rEdgeRegionCDEM) # raster package author suggests this to resolve slight extent differences |
|
55 |
#extent(rEdgeRegionMosaic) = extent(rEdgeRegionCDEM) # raster package author suggests this to resolve slight extent differences
|
|
56 | 56 |
rEdgeRegionDelta <- rEdgeRegionMosaic - rEdgeRegionCDEM |
57 | 57 |
|
58 | 58 |
# get a vector of random column index numbers, constrained by column dimension of image |
... | ... | |
115 | 115 |
|
116 | 116 |
message("end of loop - hit key to write output table..") |
117 | 117 |
browser() |
118 |
write.csv(mOutTable,file="/data/project/organisms/rcr/tableForRic2000_5_8.csv",row.names=FALSE)
|
|
118 |
write.csv(mOutTable,file="/data/project/organisms/rcr/tableForRick2000_5_8Even.csv",row.names=FALSE)
|
|
119 | 119 |
# |
120 | 120 |
} |
Also available in: Unified diff
Uses correct, even boundary input images