UNIVERSIDAD COOPERATIVA DE COLOMBIA
Facultad de Ingenieria
PRACTICA 4
Integrantes: Andres Felipe Cabrera
paquetes
#instalamos y llamamos:
library(raster)
## Loading required package: sp
library(sp)
library(sf)
## Linking to GEOS 3.9.1, GDAL 3.2.1, PROJ 7.2.1
library(rgdal)
## Please note that rgdal will be retired by the end of 2023,
## plan transition to sf/stars/terra functions using GDAL and PROJ
## at your earliest convenience.
##
## rgdal: version: 1.5-25, (SVN revision 1143)
## Geospatial Data Abstraction Library extensions to R successfully loaded
## Loaded GDAL runtime: GDAL 3.2.1, released 2020/12/29
## Path to GDAL shared files: C:/Users/felip/Documents/R/win-library/4.1/rgdal/gdal
## GDAL binary built with GEOS: TRUE
## Loaded PROJ runtime: Rel. 7.2.1, January 1st, 2021, [PJ_VERSION: 721]
## Path to PROJ shared files: C:/Users/felip/Documents/R/win-library/4.1/rgdal/proj
## PROJ CDN enabled: FALSE
## Linking to sp version:1.4-5
## To mute warnings of possible GDAL/OSR exportToProj4() degradation,
## use options("rgdal_show_exportToProj4_warnings"="none") before loading sp or rgdal.
## Overwritten PROJ_LIB was C:/Users/felip/Documents/R/win-library/4.1/rgdal/proj
#paquetes para mas adelante:
library(readxl)
library(writexl)
bs
b4<-raster("C:/Users/Public/Practica4/FACADE/facade_b04.tif")
b5<-raster("C:/Users/Public/Practica4/FACADE/facade_b05.tif")
b6<-raster("C:/Users/Public/Practica4/FACADE/facade_b06.tif")
b7<-raster("C:/Users/Public/Practica4/FACADE/facade_b07.tif")
b8<-raster("C:/Users/Public/Practica4/FACADE/facade_b08.tif")
b9<-raster("C:/Users/Public/Practica4/FACADE/facade_b09.tif")
b10<-raster("C:/Users/Public/Practica4/FACADE/facade_b10.tif")
b11<-raster("C:/Users/Public/Practica4/FACADE/facade_b11.tif")
b12<-raster("C:/Users/Public/Practica4/FACADE/facade_b12.tif")
b13<-raster("C:/Users/Public/Practica4/FACADE/facade_b13.tif")
b14<-raster("C:/Users/Public/Practica4/FACADE/facade_b14.tif")
b15<-raster("C:/Users/Public/Practica4/FACADE/facade_b15.tif")
observamos las bs
#caracteristicas bs
b4
## class : RasterLayer
## dimensions : 800, 1000, 8e+05 (nrow, ncol, ncell)
## resolution : 0.1, 0.1 (x, y)
## extent : 40000, 40100, 2e+05, 200080 (xmin, xmax, ymin, ymax)
## crs : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
## source : facade_b04.tif
## names : facade_b04
## values : 0, 66 (min, max)
b5
## class : RasterLayer
## dimensions : 800, 1000, 8e+05 (nrow, ncol, ncell)
## resolution : 0.1, 0.1 (x, y)
## extent : 40000, 40100, 2e+05, 200080 (xmin, xmax, ymin, ymax)
## crs : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
## source : facade_b05.tif
## names : facade_b05
## values : 0, 66 (min, max)
b6
## class : RasterLayer
## dimensions : 800, 1000, 8e+05 (nrow, ncol, ncell)
## resolution : 0.1, 0.1 (x, y)
## extent : 40000, 40100, 2e+05, 200080 (xmin, xmax, ymin, ymax)
## crs : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
## source : facade_b06.tif
## names : facade_b06
## values : 0, 66 (min, max)
b7
## class : RasterLayer
## dimensions : 800, 1000, 8e+05 (nrow, ncol, ncell)
## resolution : 0.1, 0.1 (x, y)
## extent : 40000, 40100, 2e+05, 200080 (xmin, xmax, ymin, ymax)
## crs : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
## source : facade_b07.tif
## names : facade_b07
## values : 0, 66 (min, max)
b8
## class : RasterLayer
## dimensions : 800, 1000, 8e+05 (nrow, ncol, ncell)
## resolution : 0.1, 0.1 (x, y)
## extent : 40000, 40100, 2e+05, 200080 (xmin, xmax, ymin, ymax)
## crs : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
## source : facade_b08.tif
## names : facade_b08
## values : 0, 76 (min, max)
b9
## class : RasterLayer
## dimensions : 800, 1000, 8e+05 (nrow, ncol, ncell)
## resolution : 0.1, 0.1 (x, y)
## extent : 40000, 40100, 2e+05, 200080 (xmin, xmax, ymin, ymax)
## crs : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
## source : facade_b09.tif
## names : facade_b09
## values : 0, 78 (min, max)
b10
## class : RasterLayer
## dimensions : 800, 1000, 8e+05 (nrow, ncol, ncell)
## resolution : 0.1, 0.1 (x, y)
## extent : 40000, 40100, 2e+05, 200080 (xmin, xmax, ymin, ymax)
## crs : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
## source : facade_b10.tif
## names : facade_b10
## values : 1, 79 (min, max)
b11
## class : RasterLayer
## dimensions : 800, 1000, 8e+05 (nrow, ncol, ncell)
## resolution : 0.1, 0.1 (x, y)
## extent : 40000, 40100, 2e+05, 200080 (xmin, xmax, ymin, ymax)
## crs : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
## source : facade_b11.tif
## names : facade_b11
## values : 1, 63 (min, max)
b12
## class : RasterLayer
## dimensions : 800, 1000, 8e+05 (nrow, ncol, ncell)
## resolution : 0.1, 0.1 (x, y)
## extent : 40000, 40100, 2e+05, 200080 (xmin, xmax, ymin, ymax)
## crs : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
## source : facade_b12.tif
## names : facade_b12
## values : 0, 43 (min, max)
b13
## class : RasterLayer
## dimensions : 800, 1000, 8e+05 (nrow, ncol, ncell)
## resolution : 0.1, 0.1 (x, y)
## extent : 40000, 40100, 2e+05, 200080 (xmin, xmax, ymin, ymax)
## crs : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
## source : facade_b13.tif
## names : facade_b13
## values : 0, 66 (min, max)
b14
## class : RasterLayer
## dimensions : 800, 1000, 8e+05 (nrow, ncol, ncell)
## resolution : 0.1, 0.1 (x, y)
## extent : 40000, 40100, 2e+05, 200080 (xmin, xmax, ymin, ymax)
## crs : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
## source : facade_b14.tif
## names : facade_b14
## values : 0, 66 (min, max)
b15
## class : RasterLayer
## dimensions : 800, 1000, 8e+05 (nrow, ncol, ncell)
## resolution : 0.1, 0.1 (x, y)
## extent : 40000, 40100, 2e+05, 200080 (xmin, xmax, ymin, ymax)
## crs : +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
## source : facade_b15.tif
## names : facade_b15
## values : 0, 76 (min, max)
#informacion de las bs:
crs(b4) #hasta la b15
## CRS arguments:
## +proj=utm +zone=18 +datum=WGS84 +units=m +no_defs
#creamos el stack
Sentinel <- stack(b4, b5, b6, b7, b8 ,b9 ,b10, b11 ,b12 ,b13 ,b14 ,b15)
Conjunto de plots
par(mfrow = c(4,5))
plot(b4,main = "banda 4", col = gray(0:100 / 100))
plot(b5,main = "banda 5", col = gray(0:100 / 100))
plot(b6,main = "banda 6", col = gray(0:100 / 100))
plot(b7,main = "banda 7", col = gray(0:100 / 100))
plot(b8,main = "banda 8", col = gray(0:100 / 100))
plot(b9,main = "banda 9", col = gray(0:100 / 100))
plot(b10,main = "banda 10", col = gray(0:100 / 100))
plot(b11,main = "banda 11", col = gray(0:100 / 100))
plot(b12,main = "banda 12", col = gray(0:100 / 100))
plot(b13,main = "banda 13", col = gray(0:100 / 100))
plot(b14,main = "banda 14", col = gray(0:100 / 100))
plot(b15,main = "banda 15", col = gray(0:100 / 100))
extent(Sentinel)
## class : Extent
## xmin : 40000
## xmax : 40100
## ymin : 2e+05
## ymax : 200080
## banda.4 banda.5 banda.6 banda.7 banda.8 banda.9 banda.10 banda.11
## [1,] 0 0 0 0 0 0 1 2
## [2,] 0 0 0 0 0 0 1 1
## [3,] 0 0 0 0 0 0 1 1
## [4,] 0 0 0 0 0 0 1 1
## [5,] 0 0 0 0 0 0 1 1
## [6,] 0 0 0 0 0 0 1 2
## [7,] 0 0 0 0 0 0 1 2
## [8,] 0 0 0 0 0 0 1 2
## [9,] 0 0 0 0 0 0 1 2
## [10,] 0 0 0 0 0 1 2 2
## [11,] 0 0 0 0 0 1 2 2
## [12,] 0 0 0 0 0 1 2 1
## [13,] 0 0 0 0 0 1 2 1
## [14,] 0 0 0 0 0 1 2 1
## [15,] 0 0 0 0 0 1 2 2
## [16,] 0 0 0 0 0 1 2 2
## [17,] 0 0 0 0 0 1 2 2
## [18,] 0 0 0 0 0 2 3 2
## [19,] 0 0 0 0 0 2 3 1
## [20,] 0 0 0 0 0 2 3 2
## [21,] 0 0 0 0 0 2 3 2
## [22,] 0 0 0 0 0 2 3 2
## [23,] 0 0 0 0 0 2 3 2
## [24,] 0 0 0 0 0 2 3 2
## [25,] 0 0 0 0 0 2 3 2
## [26,] 65 65 65 65 75 77 78 62
## [27,] 62 62 62 62 72 74 75 59
## [28,] 65 65 65 65 75 77 78 62
## [29,] 65 65 65 65 75 77 78 62
## [30,] 65 65 65 65 75 77 78 62
## [31,] 65 65 65 65 75 77 78 62
## [32,] 21 21 21 21 31 33 34 18
## [33,] 65 65 65 65 75 77 78 62
## [34,] 22 22 22 22 32 34 35 19
## [35,] 65 65 65 65 75 77 78 62
## [36,] 65 65 65 65 75 77 78 62
## [37,] 22 22 22 22 32 34 35 19
## [38,] 22 22 22 22 32 34 35 19
## [39,] 65 65 65 65 75 77 78 62
## [40,] 65 65 65 65 75 77 78 62
## [41,] 23 23 23 23 33 35 36 20
## [42,] 24 24 24 24 34 36 37 21
## [43,] 65 65 65 65 75 77 78 62
## [44,] 25 25 25 25 35 37 38 22
## [45,] 65 65 65 65 75 77 78 62
## [46,] 65 65 65 65 75 77 78 62
## [47,] 65 65 65 65 75 77 78 62
## [48,] 65 65 65 65 75 77 78 62
## [49,] 65 65 65 65 75 77 78 62
## [50,] 62 62 62 62 72 74 75 59
## [51,] 65 65 65 65 75 77 78 62
## [52,] 65 65 65 65 75 77 78 62
## [53,] 62 62 62 62 72 74 75 59
## [54,] 65 65 65 65 75 77 78 62
## [55,] 24 24 24 24 34 36 37 21
## [56,] 65 65 65 65 75 77 78 62
## [57,] 65 65 65 65 75 77 78 62
## [58,] 65 65 65 65 75 77 78 62
## [59,] 62 62 62 62 72 74 75 59
## [60,] 62 62 62 62 72 74 75 59
## [61,] 62 62 62 62 72 74 75 59
## [62,] 65 65 65 65 75 77 78 62
## [63,] 62 62 62 62 72 74 75 59
## [64,] 63 63 63 63 73 75 76 60
## [65,] 63 63 63 63 73 75 76 60
## [66,] 63 63 63 63 73 75 76 60
## [67,] 65 65 65 65 75 77 78 62
## [68,] 64 64 64 64 74 76 77 61
## [69,] 65 65 65 65 75 77 78 62
## [70,] 65 65 65 65 75 77 78 62
## [71,] 64 64 64 64 74 76 77 61
## [72,] 65 65 65 65 75 77 78 62
## [73,] 65 65 65 65 75 77 78 62
## [74,] 64 64 64 64 74 76 77 61
## [75,] 64 64 64 64 74 76 77 61
## [76,] 64 64 64 64 74 76 77 61
## [77,] 65 65 65 65 75 77 78 62
## [78,] 64 64 64 64 74 76 77 61
## [79,] 65 65 65 65 75 77 78 62
## [80,] 65 65 65 65 75 77 78 62
## [81,] 65 65 65 65 75 77 78 62
## [82,] 65 65 65 65 75 77 78 62
## [83,] 65 65 65 65 75 77 78 62
## [84,] 65 65 65 65 75 77 78 62
## [85,] 65 65 65 65 75 77 78 62
## [86,] 65 65 65 65 75 77 78 62
## [87,] 65 65 65 65 75 77 78 62
## [88,] 65 65 65 65 75 77 78 62
## [89,] 65 65 65 65 75 77 78 62
## [90,] 0 0 0 0 0 2 3 2
## [91,] 65 65 65 65 75 77 78 62
## [92,] 65 65 65 65 75 77 78 62
## [93,] 65 65 65 65 75 77 78 62
## [94,] 65 65 65 65 75 77 78 62
## [95,] 65 65 65 65 75 77 78 62
## [96,] 65 65 65 65 75 77 78 62
## [97,] 65 65 65 65 75 77 78 62
## [98,] 66 66 66 66 76 78 79 63
## [99,] 65 65 65 65 75 77 78 62
## [100,] 66 66 66 66 76 78 79 63
## banda.12 banda.13 banda.14 banda.15
## [1,] 0 0 0 0
## [2,] 0 0 0 0
## [3,] 0 0 0 0
## [4,] 0 0 0 0
## [5,] 0 0 0 0
## [6,] 0 0 0 0
## [7,] 0 0 0 0
## [8,] 0 0 0 0
## [9,] 0 0 0 0
## [10,] 0 0 0 0
## [11,] 0 0 0 0
## [12,] 0 0 0 0
## [13,] 0 0 0 0
## [14,] 0 0 0 0
## [15,] 0 0 0 0
## [16,] 0 0 0 0
## [17,] 0 0 0 0
## [18,] 0 0 0 0
## [19,] 0 0 0 0
## [20,] 0 0 0 0
## [21,] 0 0 0 0
## [22,] 0 0 0 0
## [23,] 0 0 0 0
## [24,] 0 0 0 0
## [25,] 0 0 0 0
## [26,] 42 65 65 75
## [27,] 39 62 62 72
## [28,] 42 65 65 75
## [29,] 42 65 65 75
## [30,] 42 65 65 75
## [31,] 42 65 65 75
## [32,] 0 21 21 31
## [33,] 42 65 65 75
## [34,] 0 22 22 32
## [35,] 42 65 65 75
## [36,] 42 65 65 75
## [37,] 0 22 22 32
## [38,] 0 22 22 32
## [39,] 42 65 65 75
## [40,] 42 65 65 75
## [41,] 0 23 23 33
## [42,] 1 24 24 34
## [43,] 42 65 65 75
## [44,] 2 25 25 35
## [45,] 42 65 65 75
## [46,] 42 65 65 75
## [47,] 42 65 65 75
## [48,] 42 65 65 75
## [49,] 42 65 65 75
## [50,] 39 62 62 72
## [51,] 42 65 65 75
## [52,] 42 65 65 75
## [53,] 39 62 62 72
## [54,] 42 65 65 75
## [55,] 1 24 24 34
## [56,] 42 65 65 75
## [57,] 42 65 65 75
## [58,] 42 65 65 75
## [59,] 39 62 62 72
## [60,] 39 62 62 72
## [61,] 39 62 62 72
## [62,] 42 65 65 75
## [63,] 39 62 62 72
## [64,] 40 63 63 73
## [65,] 40 63 63 73
## [66,] 40 63 63 73
## [67,] 42 65 65 75
## [68,] 41 64 64 74
## [69,] 42 65 65 75
## [70,] 42 65 65 75
## [71,] 41 64 64 74
## [72,] 42 65 65 75
## [73,] 42 65 65 75
## [74,] 41 64 64 74
## [75,] 41 64 64 74
## [76,] 41 64 64 74
## [77,] 42 65 65 75
## [78,] 41 64 64 74
## [79,] 42 65 65 75
## [80,] 42 65 65 75
## [81,] 42 65 65 75
## [82,] 42 65 65 75
## [83,] 42 65 65 75
## [84,] 42 65 65 75
## [85,] 42 65 65 75
## [86,] 42 65 65 75
## [87,] 42 65 65 75
## [88,] 42 65 65 75
## [89,] 42 65 65 75
## [90,] 0 0 0 0
## [91,] 42 65 65 75
## [92,] 42 65 65 75
## [93,] 42 65 65 75
## [94,] 42 65 65 75
## [95,] 42 65 65 75
## [96,] 42 65 65 75
## [97,] 42 65 65 75
## [98,] 43 66 66 76
## [99,] 42 65 65 75
## [100,] 43 66 66 76