Package‘gfcanalysis’
October11,2023
Version1.8.0
Date2023-10-09
Language en-us
Title Tools for Working with Hansen et al.Global Forest Change
Dataset
Depends R(>=3.5.0),raster,methods
Imports sf,terra,geosphere,RCurl,plyr,ggplot2,grid,stringr,
animation,rasterVis
Encoding UTF-8
Description Supports analyses using the Global Forest Change dataset released by Hansen et al.gfcanalysis was originally written for the Tropical Ecology Assessment and Monitoring(TEAM)Network.For additional details on the Global Forest Change dataset,see: al.2013.``High-Resolution Global Maps of21st-Century Forest Cover Change.''Science342(15
November):850-53.The forest change data and more information on the
product is available at<earthenginepartners.appspot>. License GPL(>=3)
URL github/azvoleff/gfcanalysis
BugReports github/azvoleff/gfcanalysis/issues LazyData true
RoxygenNote7.2.3
NeedsCompilation no
Author Alex Zvoleff[aut],
Matthew Cooper[cre]
Maintainer Matthew Cooper<*******************>
Repository CRAN
Date/Publication2023-10-1112:20:02UTC
1
2animate_annual R topics documented:
animate_annual (2)
annual_stack (3)
calc_gfc_tiles (4)
calc_pixel_areas (5)
check_aoi (5)
download_tiles (6)
extract_gfc (7)
gfc_stats (8)
gfc_tiles (9)
plot_gfc (9)
scale_by_pixel_area (10)
scale_toar (10)
test_poly (11)
threshold_gfc (11)
utm_zone (13)
Index15 animate_annual Plot an animation of forest change within a given area of interest(AOI)
Description
Produces an animation of annual forest change in the area bounded by the extent of a given AOI,or AOIs.The AOI polygon(s)is(are)also plotted on the image.The gfc_stack must be pre-calculated using the annual_stack function.The animation can be either an animated GIF(if type is set to ’gif’)or a series of’.png’files with a corresponding’.html’webpage showing a simple viewer and the forest change animation(if type is set to’html’).The HTML option is recommended as it requires no additional software to produce it.The animated GIF option will only work if the imagemagicK software package is installed beforehand(this is done outside of R).
Usage
animate_annual(
aoi,
gfc_stack,
out_dir=getwd(),
out_basename="gfc_animation",
site_name="",
type="html",
height=3,
width=3,
dpi=300,
dataset="GFC-2022-v1.10"
)
annual_stack3
Arguments
aoi one or more AOI polygons as a SpatialPolygonsDataFrame or sf object.If there is a’label’field in the dataframe,it will be used to label the polygons in
the plots.If the AOI is not in the WGS84geographic coordinate system,it will
be reprojected to WGS84.
gfc_stack a GFC product subset as a RasterStack(as output by annual_stack)
out_dir folder for animation outputtruncated模型用什么软件
out_basename basename to use when naming animationfiles
site_name name of the site(used in making title)
type type of animation to make.Can be either"gif"or"html"
height desired height of the animation GIF in inches
width desired width of the animation GIF in inches
dpi dots per inch for the output image
dataset which version of the Hansen data to use annual_stack was run
See Also
annual_stack
annual_stack Generate an annual stack of forest change from GFC product
Description
Uses thresholded GFC data as output by threshold_gfc to make an annualized layer stack of forest change.See Details for the class codes used in the annual raster stack.The animate_annual function can be used to produce an animation of forest change from the generated layer stack.
Usage
annual_stack(gfc,dataset="GFC-2022-v1.10")
Arguments
gfc thresholded extract of GFC product for a given AOI(see threshold_gfc) dataset which version of the Hansen data to use
4calc_gfc_tiles
Details
The output raster stack uses the following codes to describe forest change at each pixel:
Nodata0
Forest1
Non-forest2
Forest loss3
Forest gain4
Forest loss and gain5
Water6
See Also
threshold_gfc,animate_annual
calc_gfc_tiles Calculate the GFC product tiles needed for a given AOI
Description
Intersects an AOI with the GFC product grid to determine what tiles are need to cover the AOI.
Usage
calc_gfc_tiles(aoi)
Arguments
aoi an Area of Interest(AOI)as a SpatialPolygons*or sf object.If the AOI is not in the WGS84geographic coordinate system,it will be reprojected to WGS84.
Value
a sf of the GFC tiles needed to cover the AOI
Examples
tiles<-calc_gfc_tiles(test_poly)
plot(tiles)
plot(test_poly,lt=2,add=TRUE)
calc_pixel_areas5 calc_pixel_areas Calculates the pixel area for each line of a raster
Description
Calculates the pixel area for each line of a raster
Usage
calc_pixel_areas(x)
Arguments
x a Raster*object
Value
a vector with the area in square meters of the pixels in each line of x(vector has length equal to
nrow(x))
check_aoi Check if aoi is an sf or sp type object If sp,convert to sf and return
Description
Check if aoi is an sf or sp type object If sp,convert to sf and return
Usage
check_aoi(aoi)
Arguments
aoi the area of interest object
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论