Skip to content

Commit ba63e97

Browse files
committed
Transition from "raster" to "terra" package
1 parent e69a37a commit ba63e97

98 files changed

Lines changed: 3113 additions & 1935 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DESCRIPTION

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ Imports:
2424
htmlwidgets,
2525
leaflet,
2626
openeo,
27-
raster,
28-
ncdump,
29-
methods
27+
terra
3028
Depends:
3129
R (>= 4.0.0)
3230
LazyData: true
31+
LazyDataCompression: bzip2

NAMESPACE

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
# Generated by roxygen2: do not edit by hand
22

3-
export(EO_assessment_class)
4-
export(EO_assessment_numeric)
5-
export(add_to_database)
6-
export(additive_per_image)
7-
export(aggregate_NDTrI)
3+
export(add_lakeID)
84
export(bbox_from_point)
95
export(bbox_from_polygon)
106
export(bbox_from_rectangle)
117
export(best_nk)
12-
export(create_database)
8+
export(combine_years_dynamic)
9+
export(combine_years_lakeData)
10+
export(combine_years_pixelData)
11+
export(discreteClassAssessment)
1312
export(display_geometry)
1413
export(download_openEO_job)
1514
export(dynamic_per_pixel)
1615
export(find_trends)
17-
export(load_bandLayer)
18-
export(load_database)
19-
export(load_netcdf)
16+
export(index_spread)
17+
export(load_BandLayer)
2018
export(map_layer)
2119
export(nc_scene_per_image)
22-
export(nc_time_filter)
2320
export(ndi_per_image)
24-
export(ndtriLake_to_df)
25-
export(ndtri_spread)
21+
export(numericAssessment)
22+
export(oneLake_df)
23+
export(open_netcdf)
2624
export(pixel_clusters)
2725
export(plot_class_assessment)
2826
export(plot_dynamic)
29-
export(plot_image_dates)
30-
export(plot_lake_ndtri_histogram)
27+
export(plot_lake_index_histogram)
3128
export(plot_layer)
3229
export(plot_numeric_assessment)
30+
export(plot_scene_coverage)
3331
export(prepare_for_clustering)
34-
export(save_lake_data)
32+
export(sameDimProjection)
3533
export(save_leaflet)
34+
export(seasonal_index_per_lake)
3635
export(seasonal_index_per_pixel)
36+
export(show_pixels)
3737
export(start_openEO_job)
3838
export(trends_to_classes)
3939
export(waterscene_proportion)
@@ -42,8 +42,6 @@ importFrom(geosphere,distGeo)
4242
importFrom(grDevices,col2rgb)
4343
importFrom(grDevices,colorRampPalette)
4444
importFrom(grDevices,dev.new)
45-
importFrom(grDevices,dev.off)
46-
importFrom(grDevices,png)
4745
importFrom(grDevices,rgb)
4846
importFrom(graphics,abline)
4947
importFrom(graphics,arrows)
@@ -69,31 +67,25 @@ importFrom(leaflet,colorFactor)
6967
importFrom(leaflet,colorNumeric)
7068
importFrom(leaflet,leaflet)
7169
importFrom(leaflet,setView)
72-
importFrom(methods,is)
73-
importFrom(ncdump,NetCDF)
7470
importFrom(openeo,create_job)
7571
importFrom(openeo,download_results)
7672
importFrom(openeo,list_file_formats)
7773
importFrom(openeo,list_jobs)
7874
importFrom(openeo,processes)
7975
importFrom(openeo,start_job)
80-
importFrom(raster,as.matrix)
81-
importFrom(raster,brick)
82-
importFrom(raster,crop)
83-
importFrom(raster,crs)
84-
importFrom(raster,extend)
85-
importFrom(raster,image)
86-
importFrom(raster,projectExtent)
87-
importFrom(raster,projectRaster)
88-
importFrom(raster,raster)
89-
importFrom(raster,subset)
90-
importFrom(raster,values)
9176
importFrom(stats,cor)
77+
importFrom(stats,density)
9278
importFrom(stats,kmeans)
9379
importFrom(stats,lm)
9480
importFrom(stats,median)
9581
importFrom(stats,quantile)
9682
importFrom(stats,sd)
83+
importFrom(terra,crs)
84+
importFrom(terra,describe)
85+
importFrom(terra,ext)
86+
importFrom(terra,image)
87+
importFrom(terra,project)
88+
importFrom(terra,rast)
89+
importFrom(terra,values)
90+
importFrom(terra,xFromCol)
9791
importFrom(tidyr,spread)
98-
importFrom(utils,read.csv)
99-
importFrom(utils,write.table)

R/EO_assessment_class.R

Lines changed: 0 additions & 120 deletions
This file was deleted.

R/aggregate_NDTrI.R

Lines changed: 0 additions & 71 deletions
This file was deleted.

R/bbox_from.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#' Bounding Box from point coordinate
22
#'
3-
#' @param lon,lat Longitude and latitude in WGS 84 EPSG:4326
3+
#' @param lat,lon Latitude and longitude in WGS 84 EPSG:4326
44
#' @param meters The distance around the point to create the bounding box.
55
#' Needs to be > 0.
66
#'
77
#' @export
88
#'
99
#' @importFrom geosphere destPoint
1010
#'
11-
bbox_from_point <- function(lon, lat, meters = 20){
12-
c("north" = geosphere::destPoint(p = c(lat, lon), b = 0, d = meters)[2],
13-
"east" = geosphere::destPoint(p = c(lat, lon), b = 90, d = meters)[1],
14-
"south" = geosphere::destPoint(p = c(lat, lon), b = 180, d = meters)[2],
15-
"west" = geosphere::destPoint(p = c(lat, lon), b = -90, d = meters)[1]
11+
bbox_from_point <- function(lat, lon, meters = 20){
12+
c("north" = geosphere::destPoint(p = c(lon, lat), b = 0, d = meters)[2],
13+
"east" = geosphere::destPoint(p = c(lon, lat), b = 90, d = meters)[1],
14+
"south" = geosphere::destPoint(p = c(lon, lat), b = 180, d = meters)[2],
15+
"west" = geosphere::destPoint(p = c(lon, lat), b = -90, d = meters)[1]
1616
)
1717
}
1818

0 commit comments

Comments
 (0)