欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    FRAGSTATS_40教程.pdf

    • 资源ID:74643642       资源大小:1.35MB        全文页数:33页
    • 资源格式: PDF        下载积分:15金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要15金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    FRAGSTATS_40教程.pdf

    1|P a g e Last Updated:28 May 2012 Prepared by:Kevin McGarigal FRAGSTATS 4.0 Tutorial This tutorial is intended to provide FRAGSTATS users a quick start on how to use the software.All of the necessary data and files for the tutorial have been provided and these can be used as templates for how to format your own files latter on.However,this tutorial is not a substitute for the complete FRAGSTATS user manual;all serious FRAGSTATS users are responsible for understanding all of the information in the user manual.The tutorial is actually a series of short tutorials designed to demonstrate some of the basic features of FRAGSTATS;it is not intended to be a comprehensive guide,but rather a guide to help new users get started.The tutorials include the following:1.Setting Up Software and Inspecting Grids-Covers the basic setup of the software and computer for running FRAGSTATS and an inspection of the grids that will be used in the subsequent tutorials.All users should complete this tutorial.2.Analyzing a single grid-Covers the essential steps involved in analyzing a single grid,including the use of ancillary tables for calculating functional metrics.3.Batch processing multiple grids-Covers the use of batch files for processing multiple grids at once.4.Moving window analysis-Covers the use of a moving window analysis to create local landscape structure gradients.5.Running the command line version from R-Covers the execution of FRAGSTATS command line version from R(programming environment and statistical computing environment).2|P a g e Tutorial 1.Setting Up Software and Inspecting Grids In this tutorial,we will setup the software and inspect the grids to be analyzed in the subsequent tutorials.1.Download and install FRAGSTATS First,if you havent already done so,download FRAGSTATS 4.0 and run the setup utility to install the software on your computer.2.Optional Setup your Computer for use with ESRI ArcGIS If you intend to work with ascii or binary data formats,you can skip this step.However,if you have a valid ESRI ArcGIS license(version 10 or earlier)with Spatial Analyst or ArcView 3.3 Spatial Analyst and intend to work with ArcGrids(or Rasters),then there are two important requirements,as follows:First,you need to edit your computer systems environmental path variable.Specifically,FRAGSTATS must have access to the aigridio.dll library found in the“bin”(for ArcGIS installation)or the avgridio.dll library found in the“bin32(for ArcView 3.3 installation)directory.Note,the paths may differ depending on your version and installation.Search your computer for the corresponding file and copy the path to the bin or bin32 directory,as appropriate.Note,the path does NOT include the aigridio.dll or avgridio.dll file name;it ends with bin or bin32.For example,for an ArcGIS 10 installation,the path might look like:C:Program Files(x86)ArcGISDesktop10.0Bin The path to the corresponding bin directory should be specified in the windows system environmental variable,as follows:In Windows 7,the Environment variables can be accessed and edited from the Control Panel-System and Security-System-Advanced system settings under the“Advanced”tab and by clicking on“Environment Variables”(at the bottom of the dialog on the Advanced tab),as show in the figure below.In the list of System variables,select the“path”variable and select“edit”and add the path to the corresponding bin directory(e.g.,;C:Program Files(x86)ArcGISDesktop10.0Bin).Note,you need a semicolon between each path in the list and make sure you enter the correct path on your system.If you are using a different Windows operating system,youll have to figure out how to find the system environment variables,then edit the path variable as above.3|P a g e Second,you need to make sure that the ArcGrids that you intend to use,including those included with this tutorial,are located in a directory on your disk that does NOT contain any spaces in the full path.For example,if you have the tutorial grid reg78b located in the following directory:C:Documents and SettingsFragstatsTutorial_1reg78b you will get the following error message when attempting to Run FRAGSTATS:Error:Unexpected error encountered:cannot_set_access_window for:C:Documents and SettingsFragstatsTutorial_1reg78b.Model execution halted.4|P a g e This is an irreconcilable problem with ESRI and the only solution is to put all your grids,including those included in this tutorial,in a directory that does NOT contain spaces.Note,this is probably good practice anyways,since there are other software programs that cannot deal properly with spaces in the path.3.Inspect the grids Next,inspect the grids to make sure you understand the landscape definition before analyzing them,since the results of the analysis can only be interpreted in the context of the landscape definition.ArcGIS grids.-If you are planning on working with ESRI ArcGIS,open up the provided fragtutorial_1.mxd project in ArcMap.The project contains several data layers,as listed in the table of contents,including a landcover grid(lugrid)for an arbitrary extent in western Massachusetts.5|P a g e As you can see from the legend,the lugrid contains six landcover classes,including:1)open(largely agriculture),2)residential,3)water(open water bodies and large rivers),4)forest,5)wetland,and 6)urban.Open the lugrid layer properties and inspect the grid properties on the Source tab.In particular,note the grid dimensions(1104 columns by 1035 rows),cell size(50 m),format(GRID),and pixel type(signed integer).The signed integer pixel type is necessary if the landscape has a border;i.e.,strip of classified cells outside the landscape boundary and assigned negative class values.If the landscape does not contain a border,then an unsigned integer type is OK.In this case,the lugrid does not contain a border,but the sub-landscapes(below)do,so the pixel type has been set to signed integer.Next,open the lugrid layer attribute table and inspect the class values present on the grid.Note the class values and text description for each class.You will need to know the class values later on.6|P a g e Next,view the reg78b grid by selecting it in the table of contexts and zooming to the layer extent.This grid is a randomly selected roughly 5x5 km(25 km2)square sub-landscape sampled from the lugrid.Expand the legend and note the landcover classes present;it has the same six landcover classes as before,but with the addition of six border classes.7|P a g e The border is simply a strip of classified cells surrounding the landscape of interest that provides information on patch type adjacency along the landscape boundary.In the legend provided,the border classes have been assigned a lighter shade of the color assigned to the corresponding class inside the landscape boundary.Importantly,a border is identified in FRAGSTAST by negatively valued cells.An inspection of the grid attribute table reveals the same six landcover classes as before,but with both a positive(inside the landscape boundary)and negative(border,or outside the landscape boundary)version of each class.Note,I created all three of the grids in this project containing borders(reg78b,reg66b and reg21b)using the fragborder.aml script provided.This aml(arc macro language)is executed from the arc prompt and requires ArcInfo Workstation.Briefly,the script clips the lugrid layer with a polygon coverage for one of the sub-landscapes,and then buffers the polygon by 50 m and clips the lugrid layer again but with the buffered(i.e.,slightly larger)polygon.Next,the larger grid is multiplied by-1 to convert the cell values to negative.Lastly,the two grids are merged,with the smaller grid(the sub-landscape of interest)on top,resulting in positive values everywhere except the narrow strip of cells in the border.8|P a g e Lastly,view the other sub-landscape grids in the table of contents.There are three different sub-landscapes:reg78,reg66,and reg21,each of which also contains a version with a landscape border:reg78b,reg66b,and reg21b.These landscape differ largely in the amount of forest landcover.Ascii/binary grids.-If you are planning on working with ascii or binary grids,open up the provided files in a text editor and inspect them.Ascii files are interpretable,binary files are not.Neither are pretty to look at and you cant do much with them,but it is useful to know what these files look like.Open up reg78b2.asc in a text editor(the top left portion of this file is shown below).This a space-delimited ascii file(i.e.,there is a space between each cell entry)and is therefore interpretable.Note,this ascii file was created by converting the reg78b ArcGrid to an ascii file in ArcMap.Note the header information included in the first six lines of the file.This header information must be deleted before it can be analyzed in FRAGSTATS;however,the information on the grid dimensions(ncols=102 and nrows=102)and cellsize(50)will be needed later when parameterizing the FRAGSTATS model.In particular,note the landscape border indicated by the negative class values in the first row and column.Viewing the ascii grids is a bit more difficult without importing them into your favorite GIS.However,if you are an R user,you can use the following script(or open the 9|P a g e provided script,tutorial-1.R)to plot the grid in R.Note,there are several ways to plot the grids in R.If you are familiar with the Raster package,you can import the ascii grids and plot them quite easily,but specifying a color scheme for the legend and plotting a pretty legend is a bit tricky.The following script makes use of the base functions in the Graphics library:First,set the working directory to wherever you have installed the tutorial;e.g.:setwd(c:/work/fragstats/software/fragstats4/tutorial/tutorial_1)Next,read in the ascii grid,as a matrix,into an object(m):m-as.matrix(read.table(reg78b.asc)Next,in order to assign colors to each landcover class,identify each unique class value:uv-sort(unique(as.vector(m)Next,create breaks for assigning colors to class values(breaks are at the minimum-1,midpoints and maximum+1).Note,this is necessary because the plot function(image)is designed for continuous variables not categorical variables as is the case with the landcover image:my.breaks-(c(min(uv)-2,uv)+c(uv,max(uv)+2)/2 Next,create a color legend for the plot:my.colors-c(gray,lightskyblue,lightgreen,lightpink,lightyellow,yellow,purple,slateblue,green,skyblue,black)Next,check to make sure you have a color for every unique class value:if(length(my.colors)!=length(uv)stop(You need a color for every unique value)Next,print to the console the color associated with each class value to verify that you have what you want:data.frame(code=uv,color=my.colors)Finally,plot the image with the image()function in the graphic library.Note,because image()does a 90 degree counter-clockwise rotation of the image,a matrix transpose and some indexing is necessary to rotate the image back to its original orientation:10|P a g e image(t(m),nrow(m):1,asp=1,breaks=my.breaks,col=my.colors 11|P a g e Tutorial 2.Analyzing a Single Grid In this tutorial,you will compute a suite of structural and functional patch,class and landscape metrics for a single input grid.1.Open FRAGSTATS First,open FRAGSTATS from the start menu or by double clicking on the FRAGSTATS icon on the desktop.Note,if you have an ESRI ArcGIS 10 installation,there may be a significant delay(up to 30 seconds in some cases)in opening the user interface as FRAGSTATS tries to secure a valid ArcGIS license,so be patient-and dont forget to thank ESRI for their license management while youre waiting.If FRAGSTATS does not open or you get a runtime initialization error or any other kind of error,it probably means that you have ArcGIS installed on your machine and there is problem securing a valid license for Spatial Analyst.If you are sure that you followed the installation instructions and/or followed the instructions in Tutorial#1 step 2,then download the Diagnostic Tool from the FRAGSTATS website and after extracting the utility from the zip file,run the utility and copy the report and submit it in an email to mcgarigalkeco.umass.edu.Note,if you have ArcGIS installed on your machine,but either you dont have a valid Spatial Analyst license or you simply dont want to run FRAGSTATS with ArcGrids,then be sure that your systems environmental path varible does NOT contain a path to ArcGIS.If your systems path variable contains ArcGIS,FRAGSTATS thinks you are an ArcGIS user and that you want to use ArcGrids,and it tries to secure a valid Spatial Analyst license.Unfortunately,to use FRAGSTATS in this situation,you will have to remove ArcGIS from your systems path variable.2.Create a New model Next,you need to create a FRAGSTATS model for a categorical landscape representing the patch mosaic model of landscape structure.A FRAGSTATS model is simply a file containing a complete parameterization of FRAGSTATS;i.e.,everything needed to conduct an analysis.Click on the New button on the tool bar or select New from the File drop-down menu.This creates a blank model for you to parameterize.12|P a g e 3.Import a grid Next,import a grid to analyze.Specifically,you need to Add a layer to the batch manager on the Input layers tab.Click on the Add layer button to open the import data dialog.If you are using ESRI ArcGIS,you can select the ESRI grid data type in the left pane and then navigate to the tutorial directory by clicking on the.button and selecting the reg78b grid.Note,when you load an ArcGrid,the grid attribute information pertaining to row count(y),column count(x)and cell size are read from the grid header 13|P a g e itself,and thus these fields are grayed out in the dialog.The only grid attribute item that you need worry about(and can modify)is the background value.By default the background class value is set to 999,but you can change it here to any class value that you want,so long as you understand the implications.Briefly,background is a class used to distinguish cells that you essentially want to ignore in the analysis;these can be cells that couldnt be classified to a real landcover class for lack of data,or cells that you simply want to treat as part of the background matrix in the landscape.To fully understand the implications of designating background,be sure to read the help files on backgrounds,borders,and boundaries in the section on User guidelines-Overview.For now,keep the background value set to 999.If you are using ascii or binary files,you can select the corresponding data type in the left pane and then navigate to the tutorial directory by clicking on the.button and selecting the corresponding grid.For example,to use the provided ascii grid,select reg78b.asc.Note,when you try to load an ascii grid or binary grid,the grid attribute information must be entered manually.If you dont enter this information before selecting the grid,the software will complain that the layer attributes are in

    注意事项

    本文(FRAGSTATS_40教程.pdf)为本站会员(qwe****56)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开