Home

Global Map Raster Devel- opment (GMRD) Tool User`s Manual

image

Contents

1. i gensig trainingmap training_area MODIS group target MODIS subgroup suk Fig 4 5 2 1 gensig dialog box 79 Each field in the dialog box should be specified as follows e Ground truth training map training_area MODIS e Name of input imagery group target e Name of input imagery subgroup sub e Name for output file containing result signature sig After you specify the parameters click the Run button If an amount of pixels is not adequate signature file may not be created properly with an error message of Signature n not positive defi nite In that case you should expand training area of the land cover class equivalent to the signa ture n and then execute 1 gensig again Now you are ready to run the maximum likelihood classification on your image Select Imagery gt Classify image gt Maximum likelihood Classification MLC in the GRASS Layer Manager Fig 4 5 3 a GRASS GIS Layer Manager fee ww GRASS GIS Map Display 1 Location Japan_LatLlon_GM File Settings Raster Vector Volumes Database Help ce g X go c YA D Ei A ay E rene z eo F oa 78 78 o Alec t k Develop images and groups gt Manage image colors gt A 5 i Ortho photo rectification requires Xterm i ortho photo o Dis 1 play Rectify image or raster i rectify Classfied_Japan fill_r Histogram Spectral response i spectral Brovey sharpening i fusion
2. Workspace I Map display Import raster data es Import vector data P Import 3D raster data Import database table 7 Export raster map Export wector map Export 3D raster maps t joos Export database table Link external formats 3 Manage maps and wolumes Map type conversions Raster to vector r to wect Georectify Raster series to wolume r to rast3 Raster 2 5D to volume r to rast3elew Graphical modeler Run mod e Vector to volume v to rast3 NVIZ requires Tcl Tk nwiz 2D vector to 3D vector v to 3d 3D image rendering m nviz image Pe scars Pope Bearing distance to coordinates m cogo RSs eee less Cartographic Composer ps map I Fig 3 7 8 v to rast command will convert an input vector map into raster format You can specify each parameter in the v to rast dialog box as below Name of input vector map jpn _msk MODIS Name for output raster map jpn_mask Source of raster values cat 50 iu to rast 4 rector faster conve ron q fo fae i it ISLE Li WEPSIU Dpi ee Le See a a ae my i Converts rasterize a vector map into a raster map jpn_msk MObIsS Name for output raster map Source of raster values cat Add created map s into layer tree Close dialog on finish v to rast input jpn_msk MODIS output jpn_mask use cat Fig 3 7 9 v to rast command dialog box Now you are ready to run the r
3. Export raster map Export vector map Export 30 raster maps Export database table Link external formats Manage maps and volumes b Map type convermons F Raster to vecter r to vwect Georectify Raster senes to volume r to rast3 Raster 2 50 to volume riorast3alev Graphical modeler Run model Vectorte wolume toras AE AEE CME LEA AP verher ta A ertr el Fig 4 2 1 v to rast command As shown in the v to rast dialog box in Fig 4 2 2 specify training_area MODIS for the Name of input vector map field and training area for the Name of output raster map field You also need to choose attr for the Source of raster values Fig 4 2 2 to further specify information as signed to raster data To specify the source for your raster values move to the Attribute tab and select a field name from a list In this exercise we will choose Class in the Name of column for attr parameter field Fig 4 2 2 Once you have specified all the options described above click the Run button to execute the command toast vector conversion pza aces vto rast vector raster conversio Y Converts rasterize a vector map into a raster map Converts rasterize a vector map into a raster map Required Selection j Required Selection Attributes Optional Name of input vector map Name of column for attr parameter data must be num
4. LandsatLook Thermal Image 1 5 MB LandsatLook Quality Image 3 8 MB LandsatLook ies with a Reference 10 4 MB Select Download Option Cancel Fig 3 9 4 Download Options dialog box to choose a product to download If you are ready to download data you will see the Download Scene dialog box Fig 3 9 5 You can click the Download button to start downloading the image ov Click the download button to download Scene ID LC81100572014092LGN00 Download Close Fig 3 9 5 Download Scene dialog box in the USGS s EarthExplorer If you want to fill cloud covered areas you need images from forty eight days before and after your target date Additionally you may need to download more images if you need multiple Land sat images to cover your study area Once you obtain the necessary series of images you can au tomate image processing You need to store all downloaded images into the same folder to auto mate the data import process For this exercise we are going to create a landsat folder under the DATA GSI MODIS directory Once you finish downloading images you need to check the landsat_setenv txt file to make sure all environ parameters are correct to run scripts The contents of the landsat_setenv txt are almost identical to modis_setenv txt except for the product name setting Fig 3 9 6 You need to set the PRODUCT_NAME parameter as LO8 Fig 3 9 6 Once you load the env
5. Vpr EE Conditional Formatting 7 r ay Ga f ue 9v Format as Table 3 Delete a _ aste gg BZU Se Oh SSS FE Be xg 0 E Cell Styles Hei rormat 2 Fiter Select Clipboard Font Alignment Number Styles Cells Editing Al v fe cat v B E D E F G H l J K L M N cat Ivalue class cl c2 c3 4 c5 c6 c7 c8 c9 c10 c11 2 1 2 1 269 3623 225 469 3338 1701 583 259 3352 259 439 3 2 3 1 240 2670 180 458 2542 1357 443 274 2465 251 458 4 3 3 1 240 2670 180 458 2542 1357 443 274 2465 251 458 5 a 2 1 269 3623 225 469 3338 1701 583 259 3352 259 439 6 5 3 1 240 2670 180 458 2542 1357 443 274 2465 251 458 7 6 2 uf 239 3393 258 443 3263 1725 583 257 3136 231 423 8 7 d 1 239 3393 258 443 3263 1725 583 257 3136 231 423 9 8 2 1 239 3393 258 443 3263 1725 583 257 3136 231 423 10 9 2 1 313 3832 305 504 3741 1961 658 298 3643 235 478 11 10 2 1 313 3832 305 504 3741 1961 658 298 3643 235 478 12 11 3 6 287 2815 195 492 2664 1445 571 318 2789 228 502 13 12 3 6 392 2950 276 621 2796 1554 656 405 2979 306 599 14 13 2 1 313 3832 305 504 3741 1961 658 298 3643 235 478 15 14 3 6 287 2815 195 492 2664 1445 571 318 2789 228 502 16 15 3 6 287 2815 195 492 2664 1445 571 318 2789 228 502 17 16 3 6 392 2950 276 621 2796 1554 656 405 2979 306 599 18 17 2 1 313 3437 296 481 3359 1818 607 363 3442 331 525 19 18 2 1 292 3317 262 469 3251 1769 624 274 3394 229 467 20 19 2 1 231 3208 179 403 3011 1370 423 264 2933 252 440 21 20 2 1 313 3437 296 481
6. A or E hr a a ih F al ioe ETA deg i eee z oe y Aa a ei eae ee J NASA ee ee de Ol 5 7 LAND PROCESSES DISTRIBUTED ACTIVE ARCHIVE CENTER HOME ABOUT PRODUCTS GETOATA TOOLS USER COMMUNITY CUSTOMER SERVICE dearch NEWSFEED GQ siemar GD ff ATTENTION Welcome Welnome News Data in Action naive Fires In Westem Australla MODS VOOM Collections Siaius oOo fom the wen ra MES ane n ASTER Oar 262012 i is le Products Lists the satelite images availabie Land Remote Sensing Dala Access Whore MATAS now available online Sel Dala Guik yia ihri fee shee Oe ara needed bo acquire the Raheliie ar ss a minj News regarding MODIS Land Cover Type x Product Tools oun Some look bo hep you work wilt MODIS Land Products GA Tutorial A th ikerlan when Ihis image was caplured on Klan 2 2072 Goren of Tires Mod liket User Commmuniby gt Read more mews A place to share knowledge with tallest Citing LP DAAC and Data management fres started by qavemment awihorities were buming in ihe Kimberley reglon of Westem Australia Fig 3 3 1 LP DAAC home page https lpdaac usgs gov The LP DAAC creates and distributes various MODIS products We will use MCD43B4 and MCD43B2 for our exercise MCD43B4 is a 16 day composite 1 km resolution 7 band data product synthesized with TERRA and AQUA images whereas MCD43B2 is a product designed for data quality assurance and quality control Q
7. Software licenses 1 What type of open source license does each software use GRASS GNU General Public License GPL V2 R GNU General Public License GPL V2 GDAL MIT License Python GPL compatible pyModis GNU General Public License GPL V2 Can I modify and distribute your program without your permission Yes The scripts copyright still belong to the Geospatial Information Authority of Japan GIS however you can freely use modify and distribute the scripts de scribed in this Manual We distribute our scripts for use as is and without warran ty of any kind If I have questions regarding your scripts and Manual who I should ask for 125 e You can contact the Secretariat of International Steering Committee for Global Mapping at sec iscgm org 4 How do I cite this Manual and its scripts in using them e Global Map Raster Development tool ver1 0 Copyright c 2014 Geospatial Infor mation Authority of Japan If you cite this Manual in a scientific paper use Geo spatial Information Authority of Japan Global Map Raster Development tool ver1 0 2014 126 Appendix A 1 Developing a Tree Cover Map with See5 Cubist This section explains how to calculate percent tree cover using See5 Cubist You should consider using this approach when your estimation accuracy calculated using the procedures described in Chapter 5 is not good enough See5d Cubist lets you set up multiple sub regions to build estim
8. Vere Bii Pechages Wenders Help FRR Coenole iaka Fig 2 5 10 R startup dialog Once you have R working correctly next you need to install spatial data analysis packages such as sp and rgdal To install these two R packages you will need to execute the following in stall packages statements In the install packages command specify your install destination for both packages In this case you want to specify the R library folder in the C Program Files R R 3 0 2 gt install packages sp lib C Program Files R R 3 0 2 library gt install packages rgdal lib C Program Files R R 3 0 2 library After you execute the first command you may be asked to specify a download mirror site CRAN mirror If so you should be given the option to choose the closest mirror site from a list of locations You can also simply choose the first mirror site O Cloud as a generic mirror site 293 gt Argentina La Plata D Argentina Mendoza Australia Canberra Australia Melbourne Austria Belgium Brazil BA Brazil PR Brazil RU Brazil SP 1 Brazil SP 2 Canada BC Canada N5 Canada ON Canada QC 1 Canada QC 2 Chile China Beijing 1 China Beijing 2 China Hefei China Xiamen Colombia Bogota Colombia Cali Paes 3k Fig 2 5 11 Selecting a mirror site to download R packages 24 3 Pre processing Satellite Images This chapter introduces the procedures
9. agg slave continuous 7 Executing See5 and Cubist Execute Seed and create a tree file Then create simulation training data and run Cubist for each group See5 exe f category sh modis_gen_simulation sh veg_training_see5_1 csv catl data 1 2 3 18 sh modis_gen_simulation sh veg_training_see5_2 csv cat2 data 1 2 3 18 sh modis_gen_simulation sh veg_training_see5_3 csv cat3 data 1 2 3 18 cubist exe f catl cubist exe f cat2 cubist exe f cat3 8 Importing calculated results Import the Seed tree file by running the modis_import_Seed sh script gt modis_import_See5 sh category tree cagetory 132 Fig A 1 2 Example of output raster using the modis_import_Seed sh script 9 Importing calculated results from Cubist For each group from the last section import the calculation results you got from running Cubist while applying a mask Execute the command below gt r mask o input group_rast maskcats 1 gt sh modis_import_result sh catl model category 1 Run the following command to integrate the calculation results gt modis_integrate_result sh The integrated raster is named result_tree_cover_dep Rename this file and repeat the above command until you have processed all groups An example below renames result_tree_cover_dep to ted1 which represents the tree cover map for the group 1 gt g rename rast result_tree_cover_dep tcdl 133 In some cases you may no
10. using MODIS data in 2003 and the comparison of estimation between 2003 and 2008 in some parts The method described in Kobayashi et al mixed three land cover types forest urban bare ar ea and others using a 5 increment to develop training data for a tree cover map As we de scribed in Section 5 2 we chose a 10 increment instead 117 FAQ Software Installation and Environment Settings 1 Are there any specific requirements for my personal computer to run the series of analysis You don t need a high end machine to run the scripts used in this Manual However you will want to ensure you have sufficient free hard disk space to store satellite images and intermediate data during your analysis A large memory size also helps to the analysis run faster and enables you to deal with a larger analysis area The modis_aggregate_index sh requires a large amount of memory to process We used a machine that had 4 GB of memory and suggest you use a machine with equal or greater memory specifications You need to have close to 100 GB of free hard disk space to finish our tutorial We only dealt with one month s worth of data for our analysis Therefore if you want to analyze data collected over a longer time period of time than the current tutorial you will need more free disk space A Landsat and VIIRS image analysis will require an even more space 2 I saw 32 bit and 64 bit versions of R and OSGeo4W Which one is better to i
11. Example 1 Maximum Likelihood gt g region nsres 00 00 30 ewres 00 00 30 gt r resample input LC_Japan output LC_Japan_reclass_resamp GRASS output raster LC_Japan_reclass_resamp Example 2 Decision Tree gt g region nsres 00 00 30 ewres 00 00 30 gt r resample input LC_JP_DT output LC_JP_DT_resamp GRASS output raster LC_JP_DT_resamp We will use the LC_Japan_reclass_resamp for the following exercises 4 9 Generating random verification points You can visually check your land cover classification results by generating random verification points First you will generate random points using the modis_verify_point sh script and next you will export the random points as a KML file using the modis_export_kml sh script You can also use the exported KML to create an error matrix to evaluate classification accuracy 88 Use modis_verify_point sh to generate random verification points The modis_verify_point sh takes the classified LC map as a first argument and the number of points you want to generate as a second argument Syntax modis_verify_point sh land cover map the number of points Example gt sh modis_verify_points sh LC_Japan_reclass_resamp 50 The modis_verify_point sh generates random points for each land cover class as a series of vec tor maps that have verify_points_class The second argument in the script refers to the number of points per land cover class in your land
12. For Japanese boundary data you can visit http www gs1 go jp kankyochiri globalmap e html and follow the link Download Global Map Japan Fig 3 7 2 45 f Soospatia nlomaton Autry of Japan 6 an tAE S pea Search J eee fi sat i O site Hap GS HOME gt Global Map Global Map i Japanese ver What s New 2013 11 18 Release of Maps of Puntland region in northeastern somalia using Gioball Map aL i el OI BE CENT o er EA an iDa Mai LIENS E et Fig 3 7 1 Global Map Japan download page http www gsi go jp kankyochiri globalmap e html Download Global Map Japan version 2 Vector data Released in 2011 Layer lem Shape file fan lgm jpn al 2 zip jpn a i Boundary jpn br Zip n jpn t 12 2 l Drainage gm jpn hydro 2 zip jpn hydro 2 zi Population lam ipn pop 2 zip lom jpn pop u 2 zip frransportation lgm jpn trans 2 zip am jpn trans u 2 zip e Legend Global Map Specifications version 2 2 e Global Map Japan version 1 1 Raster data Released in 2006 Layer BIL TIFF Elevation am ipn el 1 Lzip lom ipn el u 1 1 zip flana Cover lgm jpn ic 1 L zip lom ipn Ic ie L zip flana Use lgm jpn u 1 L zip lom ipn tu u 1 L zip Vegetation lom jpn ve 1 L zip lom jpn ve u 1 1 zip e Legend Global Map Specifications version 1 2 1 e Global Map Japan version 1 0 Raster data Released in 2000 Layer BIL Elevation j Zi j Zi lana Cover lam ipn Ic 1 0 zip lam ipn Ic u
13. 28k szip SZIF compression library 685k werces c vce10 The Merces C 3 library for parsing XML files 634k werces c ve Odevel The Merces 2 3 VC10 library for parsing gt 154k zlib The zlib compression and decompression library runtime a Web 4 Default ui 4 j Hide obsolete packages Fig 2 3 7 Selecting wxpython in the Libs category After you select the wxpython package in the package list Fig 2 3 7 proceed and finish the in stallation process It may take several minutes to complete the OSGeo4W installation process Up on your successful installation you will see the OSGeo4W Shell icon on your desktop 2 4 Installing pyModis pyModis is a Python library used to download MODIS data from NASA s FTP server pyModis s official website is http pymodis fem environment eu Fig 2 4 1 To install the pyModis program click the How to install pyModis hyperlink on the pyModis homepage Fig 2 4 1 15 F o welcome come to pyModig pyModis 0 7 ry pyMadis 0 7 3 documentation next modules index Welcome to pyModis pyMedis is a Free and Open Source Python based Ebrary to work with MODIS data It offers bulk download for user selected time ranges mosaicking of MODIS tiles and the reprojection from Sinusoidal to other projections convert HDF format to other formats pyMedis library was developed to replace old bash scripts developed by Markus Neteler to download MODIS data from NASA
14. First click the OSGeo4W Installer link to download the installer osgeo4w setup x86_64 exe Once you down load the installer run the installer osgeo4w setup x86_64 exe to start the installation process Fig 2 3 2 11 ds 3 osgeodw set _ upee Fig 2 3 2 Click the osgeo4w setup exe icon you downloaded to start the installation process Once the installation processes starts choose the Advanced Install option to select specific li braries Fig 2 3 3 amp amp OSGeo4W Setup OSGeo4W Net Release Setup Program w gt This setup program is used for the initial installation of the OSGeo4WV environment as well as all subsequent updates Make sure to remember where you saved it The pages that follow will guide you through the installation Please note that OSGeo4W consists of a lange number of packages spanning a wide vanety of purposes We only install a base set of packages by default You can always mn this program at any time in the future to add remove or upgrade packages as necessary Express Desktop Instz E Express Web GI5 Inst gt Advanced Install Fig 2 3 3 Three options for OSGeo4W installation After selecting the installation method shown in Fig 2 3 3 accept the default settings until you reach to the Select Packages window shown in Fig 2 3 4 At that point there are several options you will need to choose from For this tutorial you are going to
15. Skip na nja 358k cud The CURL HTTP FTP library and commandline utility 4 Skip ria nja 503k gpsbabel GPS file conversion plus transfer to from GPS units 4 Skip na nja 7288k gs Ghostscript 4 Skip nya nia 84k libgeotif The Libgeotiff library commandline tools and supporting tak 4 Skip nya nia 245k libpq The libpg library for accessing PostgreSQL psql commandline 4 Skip nya nia 36k libspatialindex devel libspatialindexlinker libraries and include files 4 Skip 7824k msys Minimal 5 Stem 4 Skip 1 606 neted The NetCDF library and commands for reading and writing Ne 4 Skip dk proj The PROWJ 4 library and commands for coordinate system transie 62751 E O 4780k python core Python core interpreter and runtime 4 Skip 5 391k python help Python documentation in a Windows compiled help file _ m Is Aru 1 pma I Hide obsolete packages Fig 2 3 5 An expanded command line utility list during OSGeo4W installation lt OSGeodW Setup Select Packages E All 4 Defaut Commandiine Ltilities 4 Default Desktop 4 Default Fig 2 3 6 Expanding the Libs category to select wxpython Scroll down the expanded list and find wxpython from the list Fig 2 3 7 14 E OSGeod4W Setup Select Packages select packages to install O Keep Few Cur O Ep Category 2 3 k spatialte The SpatiaLite library for adding spatial capabilities tc 501k solite3 The SQLite3 library for accessing SQLite3 database file
16. You also can use the output KML file to create verification data Syntax modis_verify_points sh_ prefix of output Example gt sh modis_export_kml sh verify_cells 158 e unite_kml py Description Merges multiple KML files that were created in the modis_export_kml sh command for each land cover class Place both unite_kml py and input KML files in a same directory be fore executing this command This is a python script and we recommend using this script through the OSGeo4W shell Syntax unite_kml py Example gt python unite_kml py Output all_class kml 159 e modis check classification sh Description Using verification data this script generates an error matrix to assess classification accu racy This script also outputs a KML file with which you can visually confirm your classifi cation accuracy Youll need to prepare your input verification data as shapefiles and en sure it that the input data contains a column titled Class to store land cover code as inte gers Syntax modis_check_classification sh _ land cover raster _ verification vector _ output error matrix file _ output KML file Example gt sh modis_check_classification sh LC_Japan_reclass verify_area shp error_matrix txt verify kml Error message ERROR Unable to open data source lt c DATA GSI_MODIS moce shp gt ERROR ERROR import error If the test vecto
17. and oceans VIIRS data is used to measure cloud and aerosol properties ocean color sea and land surface temperature ice motion and temperature fires and Earth s albedo VIIRS extends and improves upon a series of measurements initiated by the NOAA Advanced Very High Resolution Radiometer AVHRR and the NASA Moderate Resolution Imaging Spectroradiometer MODIS Details Metadata Documentation Notes Spatial 37 67 138 33 140 35 35 12 Max Area 130 62 40 62 Note XY Plane searches are resized to enforce a minimum lation difference of 0 1 degrees Fig 3 10 1 NOAA s VIRRS image download site To search for the images you want to download you can set a time period as well as location as search criteria Fig 3 10 2 62 Notes Spatial 37 57 137 85 140 97 35 02 Note XY Plane searches are resized to enforce a minimum lat lon difference of 0 1 degrees Temporal maximum range is 366 days Start Date Start Time UTC format YYYY MM DD 2014 03 01 format HH MM SS 00 00 00 End Date End Time UTC format YYYY MM DD 2014 03 05 format HH MM SS 23 59 59 Specify the range of the times for _ Each Day Or The Entire Range Of Days Fig 3 10 2 Specify a time period and location for your image search You also need to select a data product to download from the long list under the temporal search section For this exercise scroll down the site and find the Environmental Data Record list
18. ccccccccccccccececeeseeseeeeeees 98 5 1 Aggregating Indices within Training ALreas cccccccccecceecceccececeeseuceuceuceeceuseseecessesees 98 5 2 Creating Training Data for the Image Classification cccccceccesccecceecesceeecesceeeceeees 99 Do uh nine A Decision Tree WIOGElrss52 5 lt aaianns coh aaws scans naanronteanles eaneiieatubaning sats ease shake bokaee ee 101 SA Mstinatine Percent Vee C OV El errer ira EER E EER EAO AAO 103 5 5 Combining the Prediction Images and Creating a Tree Cover Image ccccceeeee 103 5 6 Matching Spatial Resolution to Fit the Global Map Standard cece eee eee ee 104 5 7 Excluding Open Water Areas from the Analysis cccccccccceccecceceeseeceesesseeseeseesseneues 105 5 8 Assessing Accuracy with Random POIMUS c2ijryscetsihinnistivnid iva ettioontannde stun Ciocaneeotiataataracs 109 5 9 Exporting the Tree Cover Map ccccccccccccccceccescecceccuseuseeccescsccsccuseuseuceeceeseuseuseeseeseess 113 FEMS nC Re ere COS ea a E E T EA E EEEN 116 Classy mne Land Cover Ty pC sicasacessssescososdassedsactannsadlebnesayi cesta EAE 116 Developing Training Data for the Tree Cover Map seeecssssessssssesessreeseseseesesersrsesersesesereesesee 116 Pstunatine Percent rect OV Gr reenn T EREEREER AOT 116 TAO eee E ear mune tative saree he cao Sareea enable wom acheter waa gu erie O OORE E OOE 118 Software Installation and Environment Settings ccccccccc
19. geoinfo cr chiba u p pub geoinfo globalproducts GG 56789 GG 6 GLCNMO GLCNMOdocument pdf e Global Map Global Land Cover GLCNMO developed by Ryutaro Tateishi Bayaer Mo hamed Aboel Ghar Hussam AlI Bilbisi Javzandulam Tsendayush Adel Shalaby Al mujiang Kasimu Nguyen Thanh Hoan Toshiyuki Kobayashi Bayan Alsaaideh Md Mi janur Rahman and Enkhzaya T sevengee A publication of the 2 4 edition of GLCNMO is still in the review process In the above GLCNMO PDF document the authors classify fourteen LC classes out of the twenty listed in Table 4 1 1 using both maximum likelihood and decision tree methods It is possi ble for you to classify the other six LC classes from MODIS images that are not already classified in the document using GRASS tools Detailed descriptions of the classification procedures can be found within the PDF document cited above Developing Training Data for the Tree Cover Map We adopted our method to develop training data for the tree cover maps which is described in FAQ section from the following report e Orkney 2013 Developing tools to evaluate environmental deterioration using satellite im ages and the Global Map project products Orkney 48 p Yokohama Japan in Japanese Estimating Percent Tree Cover We consulted the following document when developing our tree cover estimation tools e T Kobayashi J Tsend Ayush and R Tateishi Estimation of percent tree cover in Eurasia 116
20. option If you combine these capabilities you can narrow the list relatively easily There are many websites that do a good job explaining those regular expressions We listed a few command examples here but please refer to those websites for further explanations of regular expressions Map names that start with interp gt g mlist r pattern interp Map names that start with interp and end without si gt g mlist r pattern interp exclude si Map names that start with interp and end with a number gt gmlist r pattern interp 0 9 e A short list of websites that explain regular expression http en wikipedia org wiki Regular_expression http www regular expressions info https docs python org 2 library re html Why does modis_aggregate_index sh sometimes stop in the middle of the process e modis_aggregate_index sh is a memory intensive process So you may need to allo cate more memory space to the R process by memory limit size Alternatively you can narrow your analysis area e If you divide your analysis area into small areas and need to merge the results af terwards use the r patch GRASS command as follows Here we assume each tree cover percent layer as result_tree_cover_dep_resamp_1 2 MAPS g mlist type rast sep pat result_tree_cover_dep_resamp r patch in SMAPS out dree_cov_dep_all 121 5 I have ground truth data for my land cover classif
21. 3359 1818 607 363 3442 331 525 22 21 2 1 321 3185 244 508 3359 1866 657 381 3119 297 559 23 22 2 1 237 2815 242 433 2852 1538 455 269 2811 267 432 4 gt gt veg training 3 4 gt i Ready IEE m 100 1 Fig 5 2 1 Training data for model building CSV format Next you are going to create your training data from the csv file you created in the last section so that you can feed it into the Cubist processes using modis_gen_simulation sh Cubist is a tool for generating rule based predictive models from data http www rulequest com cubist win html This script creates simulation data that Cubist uses to build a predictive model by mixing three LC types forest urban bare and cropland herbaceous from the training csv data Fig 5 2 1 with various proportions This script assumes the LC code of 1 2 3 4 5 and 141n Table 4 1 1 as forest 100 16 17 and 18 as urban bare area and 7 8 11 and 12 as cropland herbaceous Then it interprets the LC code in the csv file Fig 5 2 1 with this assumption If you don t specify LC code numbers in the following command all numbers will be associated with the cropland herbaceous type Therefore if you find some data that cannot be classified as cropland herbaceous type e g snow ice 19 or water bodies 20 you need to remove those data from the csv file Syntax modis_gen_simulation sh input file output file Forest category No Urban category No
22. 5 Installing Statistical Package R R is an open source statistical software package that allows users to not only conduct standard statistical data analysis but also develop data analysis environments with the R language R pro vides various statistical analysis methods through downloadable modules and offers strong data visualization methods For our purposes R can be used as a spatial analysis tool and its function alities complement standard GIS software functions In this Manual R will be used for some statistical processing and data visualization You may need to download the R installer if you don t already have the software installed in your machine The installer can be found on the R home page at http www r project org Fig 2 5 1 G The R Project for Statistical t curr past fe PBF womver projectong gt Bt 2 amp Be G L POLE POA 5 vare u H pama a hi r maari a pE e Perity x E at es RE What 1 E7 maa ee T ae Cato Stearn 2 La P hee i a Ta wal x L imn a E 4 L i i et 1 3 60 i I 7 oe a at p Foundation Ciueanng 4 group Factor i 41 Factora 18 Members amp Donors a Browpe Fo hi Minien Lista E S E rs ii i k Bug Tracking es I i eS Developer P gr _ H 4 l Y Conberences eas ea ees Ses Fi a Fa My Search 1 y mA y Documentatii i LLLI ci Manuals PAs R pabet softwere arTonmoeni for stabsbcal computing and
23. Add created map s into layer tree Close dialog on finish v to rast input training_area MODIS output lt required gt use attr column landc Fig 5 v to rast dialog left Required tab right Attribute tab 124 6 Can I develop training data for a tree cover map from an existing vegetation map There 1s no standard way to develop training data however a project conducted by Orkney et al 2012 see Chapter 6 attempted to develop training data from a vector vegetation map they downloaded from the Japanese government http http vegetation jp Here we describe an outline of the processes Download vegetation polygon data from http vegetation jp Import downloaded GIS data into GRASS Convert the imported vector map into raster format gt Rasterize with a fine resolution since you will summarize this raster ized vegetation layer later by a coarser resolution layer For example you can rasterize the data with a 3 second resolution Reclassify the raster by assigning 1 to forest vegetation and 0 to all others r reclass Use the r sum command to summarize the rasterized vegetation layer In this case you can set the analysis resolution to 30 seconds before conducting the r sum command Since we set the vegetation map resolution at 3 seconds each cell should have one hundred 3 second cells and the number you obtain from the r sum command will represent the percent of forested area within each 30 second cell
24. Documentation hep eran ias mx Institute Tecnologico Autonomo de Mexico Manuals anaw esi ORME i Cokpo de Posigraduados Texcoco The R Jounal Wii AL Data Amsterdam Books Utrechti Unversity rer University of Auckland Hisu Fig 2 5 2 R project download page highlighting mirror sites in Japan On the next installation page Fig 2 5 3 select the download link that matches your operating system Q The Comprehensive R Archive Netw Software R Sources R Binari Packages Other Documentation Manuals D amans manama o c B r The Comprehensive R Archive Network ownload and Inatall R binary distributions of the base system and contributed packages Windows and Mac most Ekely want one of these versions of R Download R for Limy e Download R for 1 Osx is part of many Limx distributions you should check with your Linux package management in addition to the link above Source Code for all Platforms mdows and Mac users most kkely want to download the precompded bmanes isted in the upper not the source code The sources have to be compiled before you can use them If you do not what thes means you probably do not want to do it The latest release 2013 09 25 Frisbee Saiing R 3 0 2 tar gz read what s new im the latest verson Sources of R alpha and beta releases daily snapshots created only in time periods before a planned release Dady snapshots of current patched and de
25. FTP server It is very useful for GIS and Remote Sensing Platform of Fondazione Edmund Mach to update its large collection of MODIS data it has several features POF documentation Enter search terms or a module class or function name itis very useful for downloading large numbers of MODIS HOF XML files and Download the documentation for using this in a cron job for automated continuous updating it support FTP and HTTP NASA repository it can parse the XML file 1o obtain information about the HDF files it can convert a HDF MODIS file to GEOTIF file using MODIS Reprojection Tool it can create a mosaic of several tiles using MODIS Reprojection Tool and can hloh 26 Cost create the xmi metadata file with the information of all tiles used in mosaic Contents Howto compile documentation Fig 2 4 1 pyModis home page The pyModis library is managed by a source code management system called git In order to access the pyModis repository site click the github repository hyperlink shown in Fig 2 4 2 with in the red circle r ro x About pyModis pyModis 0 7 3 doe 4 gt amp pymodis fem ervircerment eu nfo htrn how to inetall pymodis ov e B pmi P f D gt How to install pyModis a Pp za Fa a How t report a big Using pip a Howto compile documentation From version 0 6 3 it is possible to Install pysedis using pip You have to run the following command as a POF lin
26. GIS commonly referred to as GRASS Geographic Resources Analysis Support System is a free and open source Geographic Information System GIS software suite used for geospatial data management and analysis mage processing graphics and maps production spatial modeling and visualization GRASS Ss is currently used in academic and commercial settings Page 1 of 11 gt gt gt around the world as well as by many governmental meer and thier consulting companies It is a founding member of the Open Soe cundation OSGeo Jan 18 2014 P GRASS GIS vienna Code Sprint 2014 The GRASS GIS Community Sprint Newcomers How to start with GRASS Screenshots click for more a Apoul GRASS GIS Read the First Day Documentation a Go through Tutorial and Courses in various languages a Learn more with the GRASS GiS migration hints MNN Module of the Day Llarget TROIS 20 ERNY re OR SEET ESTR and mapset 1 J W G RAS S k IS The worhd s leading Free GIS soliware Home Download Documentation Gallery Support Donations Development Get invodved GSE Download ms windows installer packages for GRASS GIS Stand alone Installer package penre ma Details For Windows XP through Windows amp both 32 and 64 bit It is the easiest way fo install WINGRASS on a single user machine IC includes an option to download and install the sample datasets used in fhe tutorials as part of the install process Page lof il gt gt
27. MASK format 12 3 thru 7 maskcats string nmask input water_area MODIS Fig 5 7 6 r mask dialog You can visually confirm whether the mask applied correctly Fig 5 7 7 108 Sat GRASS GIS Map Display 1 Location Jepan_Latton S fofoart a LA Ei r eos Fae j O Jiddada E 5o lg w i LG 4 ens 2 F B LIRIOLIGNIE 35 50 55 99N Coordinates MAS d Render Fig 5 7 7 An original image left and the masked image right 5 8 Assessing Accuracy with Random Points To evaluate the accuracy of your tree cover estimation you can either visually confirm your tree cover estimation using Google Earth or compare your estimation against independent test data First we will describe the steps necessary to generate random verification points for visual exami nation Use the r random command to generate random points for the visual examination Fig 5 8 1 This command creates random points within a specified input raster extent as a raster and or vec tor map This command adds a value field field name Value to the vector attribute table and stores the raster values in that field result_tree_cover_dep MODIS The number of points to allocate n number 50 V Add created map s into layer tree E Close dialog on finish lt 2 rrandom raster random lt Foe es Creates a raster map layer and vector point map containing randomly l
28. No _ UB category No Example gt sh modis_gen_simulation sh veg_training csv rep2 1 2 3 18 166 4 3 Creating a decision tree e cubist exe Description Creates a decision tree by executing Cubist with the simulation training data generated from modis_gen_simulation sh This execute file requires data and names files To exe cute this you should set cubist exe and cygwinl dll to the same directory Syntax cubist exe f base name Example gt cubist exe f sim 167 4 4 Estimating percent tree cover e modis_ import_result sh Description Calculates percent tree cover by analyzing Cubist output files Syntax modis_import_result sh_ input file _ option See5 class layer _ class No Output res percent tree cover raster Example gt sh modis_import_result sh rep2 model Error message awk parsemodel awk 64 fatal cannot open file rerere model for reading No such file or directory Removing raster lt MASK gt If you mistype the input model file name youll need to rerun the script using the correct model file name 168 e modis_import_Seed sh Description Analyzes Seed output and creates tree cover raster data Syntax modis_ import_See5 sh _ input file tree _ output layer Output LC JP_DT Example gt sh modis_import_See5 sh LC_JP_DT tree LC_JP_DT Error message awk parsetree awk 4 fatal
29. QSC e DATA Fie Edi View Took Add Heip T Search Degand 7 Boa tolde Search Se Dropbos D GIMO E mont Get Dinscizons Hishory A Libraries Dorumens al Mui ke Ferbures Places i Trn 2 GS hiy Places B 4 71 i F Link Cornputers au A F 3 Cut i oS iC share AATE IAG C ga Unti Copy q share TS Delete ty Adebevrcak Dette Contents A JP Uoti j pm ATERM FaS211 Remar File name irurang aree on Hide Folders Fig 4 1 7 Procedure for saving a KML file 4 2 Importing Training Data into GRASS We will use modis_import_kml sh to import the KML training data into GRASS You simply need to specify the input KML file path name and output layer name Syntax modis_import_kml sh KML file GRASS vector Example gt sh modis_import_kml sh training_area kml training_area Output GRASS vector layer name training_area The imported training polygons are saved as a vector layer in GRASS You need to convert the imported training data into the GRASS raster format for a supervised image classification To convert to raster files use the v to rast command in GRASS found under File gt Map type conversion gt vector to raster l v to rast in the GRASS Layer Manager Fig 4 2 1 72 Fie Settings Raster Vector Imagery Volumes Databasa ewe R Workspace Map display import raster data Import vector date impot FD raster data Import database table
30. Signup Sign in lucadelu pyModis amp Star 9 pFork 8 python library to work with MODIS data http pymodis fem environment eu lt gt Code 201 3 15 5 Issues branch master v pyModis Pull Requests fix documentation pa Pulse a lucadelu ates 87 71e3a5d Fe E docs f te j Graphs EE pymodis Network EE scripts HTTPS gitignore E AUTHORS ou can clone with HTTPS or Subversio CHANGES D COPYING ee Clone in Desktop B INSTALL AL requirements NSTA ae lt Download ZIP B MANIFEST Connecting to collector githubapp com Fig 2 4 3 Github repository site for pyModis After downloading the source code zip file you will need to unzip the files Find the setpu py in the unzipped files and execute setup py script to install pyModis To run the setup py you can use the OSGeo4W Shell you already installed Double click the OSGeo4W icon on your desktop to start acommand line Then move your current directory to the unzipped pyModis program directory Next you can type the following command to start installing pyModis gt python setup py install Notes Once you add a path to the python exe in the PATH setting you can then use a standard command line console cmd exe to execute setup py The OSGeo4W Shell makes this easy because it automatically sets up a path to python exe allowing you to easily run setup py 17 If the setup py command succeeds pyModis should have installed properly 2
31. and select the VIIRS Imagery Band 01 03 EDR options Fig 3 10 3 Then you can click the Search button and start the image search Fig 3 10 4 If it takes too long to get a search result you may have set your temporal search criterion too long or your spatial criterion too wide In that case you may need to narrow your search criteria 63 VIRS Near Constant Contrast NCC EDR Ground Track Mercator GTM Geolocation public 07 18 2012 CI VIRS Net Heat Flux EDR Geolocation restricted VIRS Aerosol Optical Thickness AOT EDR public 05 02 2012 EI VIRS Cloud Base Hei ght EDR public 04 27 2013 EI VIRS Cloud Cover Layers EDR public 04 27 2013 I VIRS Cloud Effective Particle Size EDR public 04 27 2013 FI VIRS Cloud O ptical Thickness EDR public 04 27 2013 VIRS Cloud To p Height EDR public 04 27 2013 EI VIRS Cloud To p Pressure EDR public 04 27 2013 EI VIRS Cloud To p Temperature EDR public 04 27 2013 E VIRS Ice Surface Tem perature EDR public 03 14 2013 VIRS Imagery Band 04 EDR public 02 07 2012 Elvirs magery Band 05 EDR public 02 07 2012 EIVIRS Land Surface Te mperature EDR public 08 10 2012 VIRS Near Constant Contrast Imagery EDR public 07 18 2012 E Clear CMO frrr win ri Fig 3 10 3 Select VIIRS Imagery Band 01 03 EDR from the Environmental Data Record list highlighted ate CUR pudIIC Us 14 20 DI UVC CPU DHUN VIIRS Surface Albedo EDR restricted VIIR
32. and providing example text in the following format e Script name Description e Describe the script s processing Syntax e Describe the script s format e Express blank spaces as _ e Enclose arguments in double quotes e Enclose an example argument in parentheses Example e Describe an example command input Error message e Describe possible error messages e Describe ways to respond to the error message 136 2 Pre processing 2 1 Setting the MODIS data analysis environment e modis_setenv txt Description Loads and sets various environment variables so software runs correctly Syntax modis_setenv txt Example gt source modis_setenv txt 137 2 2 Downloading MODIS data e modis download sh Description Downloads specified MODIS data from the MODIS Combined located under MOTA Syntax modis_download sh _ e mail address _ tile 28v05 h29v05 _ product name MCD43B4 005 _ year 2008 start date 03 28 _ end date 04 04 _ save path Example 1 tile option gt sh modis_download sh t h28v04 h28v05 h29v05 sample orkney co jp MCD43B4 005 2012 09 01 10 31 C DATA GSI_MODIS MCD43B2 Example 2 area option gt sh modis_download sh r 138 5 35 2 140 5 36 7 sample orkney co jp MCD43B4 005 2012 09 01 10 31 C DATA GSI_MODIS MCD43B2 138 2 8 Reprojecting and merging images modis_merge sh Descri
33. are useful for your analysis Once you decide what image you want to download click the download button Fig 3 9 3 and start downloading the image Land Cover E Landsat Archive E De E Ls OuUMIRS Pre WRS 2 oDe E L7 ETM SLC off 2003 present E E L7 ETM SLC on 1999 2003 m m E E L1 5 M855 am p i Fig 3 9 2 Options to select satellite image products using USGS s EarthExplorer 56 Search Criteria Data Sets Additional Criteria ESTS 4 Search Results If you selected more than one data set to search use the dropdown to see the search results for each specific datz set Show Result Controls Dala Seat Click here to export your results L8 OL TIRS x First Previous 1 F Next gt Last Displaying 1 10 of 40 Entity ID LC6107035201408 LGNO00 Coordinates 36 04321 140 11835 Acquisition Date 28 MAR 14 Path 107 Entity ID LC81070362014087LGNO00 Fig 3 9 3 A download link in the USGS s EarthExplorer When you click the download icon in Figure 3 9 3 the Download Option dialog box will ap pear and you should choose the Level 1 Geo TIFF Data Product option and proceed with the download process If you haven t created your image download account on the EarthExplorer site you need to create one at this time Download Options 2 Please select from the following download options LandsatLook Natural Color Image 5 1 MB
34. as well as composite index 1m ages 5 1 Aggregating Indices within Training Areas You are going to aggregate various indices using the band DN NDVI NDSI and SI values you calculated in Chapter 4 in the following manner 1 For each cell you will first aggregate the indices created by modis_calc_index sh This aggregation process requires the three images that possess from the highest to the third highest NDVI values across the data analysis period 2 Then we will extract the three highest pixel values and calculate the average values of NDVI bands and SI We will also calculate the minimum NDSI For this procedure use the modis_aggregate_index sh script You need to specify a target year as an argument An example for this command follows gt sh modis_aggregate_index sh 2012 This script generates the following kind of raster data e agg ndviave Average NDVI with the three highest NDVI values among all input data e age band01 07 Average DN of each MODIS band 1 7 with images of the three highest NDVI values e agg ndsimin Minimum NDSI from the three selected NDSI images The three selected NDSI images will be chosen to have the same date as the three highest NDVI value images e agg siave Average SI from the three selected SI images The three selected SI images will be chosen to have the same date as the three highest NDVI value images 98 If you encounter a memory error during this process you may
35. brovey Classify image gt Clustering input for unsupervised classification i cluster i i b Fher aage Input for supervised MLC i gensig i b nse Maximum likelihood classification MLC gaa ee SE Interactive input for supervised classification requires Xterm i class Satellite images products gt Input for supervised SMAP i gensigset i Sequential maximum a posteriori classification SMAP i smap Fig 4 5 3 1 maxlik menu Then the i maxlik dialog box will be displayed as shown below Fig 4 5 4 80 ga imaxlik imagery classification MLC Ea og ES gt Classifies the cell spectral reflectances in imagery data Classification is based on the spectral signature information generated by either i duster i dass or i gensia Required Optional Name of input imagery group target MmopIs Name of input imagery subgroup sub Name of file containing signatures sig Name for raster map holding dassification results LC Japan Close Add created map s into layer tree E Clase dialog on finish Command output Manual group name subgroup name 7 sigfile name dass name Copy Help Lmaxlik group target MODIS subgroup sub sigfile sig class LC_lJapan Fig 4 5 4 1 maxlik dialog box Each field in the i maxlik dialog box Fig 4 5 4 should be specified as follows e Name of input imagery group e Name of input imagery subgroup e Name of the
36. containing signature target MODIS sub sig e Name for raster map holding classification result LC_Japan Notes If the warning message of Signature n is not valid ill conditioned appears you might create training area of the land cover class equivalent to the signature n once again This warning indicates that signature n is not reflected in the classification results Once you specify all the necessary parameters click Run and execute the classification The classification results will be automatically added to your layer list 81 MSL Dke da dS Lice are T Mae Pt Fig 4 5 5 Classification results using the maximum likelihood method in GRASS 4 5 3 Classifying Land Cover Using the Decision Tree Method We classified MODIS images using the Maximum Likelihood classifier in the last section In this section we are going to use a different approach a decision tree model to classify images to create a LC map Similar to the maximum likelihood method the decision tree approach also uses training data to build a classification model Once we build a decision tree model we can apply the model to the MODIS images to generate a LC map You will need training data and grouped images to run the decision tree script You already learned how to create grouped images in 4 5 1 However you still need to prepare your training data as vector data If you haven t prepared your training data you can follow
37. cover map So the total number of random points will be the product of the number of land cover class in your map and the number unspecified in the com mand For example if you have five LC classes in your LC map you will have five verification vec tor layers in GRASS Next you will run the modis_export kml sh to export the random points from GRASS as a series of KML files If you generated five LC class vector layers with the modis_verify_point sh command then you will have five KML files This command does not need any argument and you don t need to add the kml extension to the output file name Syntax modis_export_kml sh kml filename without extension Example gt sh modis_export_kml sh verify_cells Output verify_cells LC code number kml You can combine a series of verification KML files into one KML file using unite_kml py Before you run the unite_kml py script make sure that the unite_kml py and the series of KML files are in the same directory 89 Run the unite_kml py after you change your current directory to the directory where you have stored the unite_kml py and the KML files You will generate a KML file called all_class kml in the current directory Syntax unite_kml py Example gt python unite_kml py Notes The unite_kml py can be executed not only on MSYS but also on any other Python runtime environment such as OSGeo4W shell Output all_class kml Now you can
38. e You also can download images manually You can visit USGS s http earthexplorer usgs gov or NASA s http reverb echo nasa gov reverb web site and download images without charge 4 When a script becomes out of control what should I do e You can stop scripts by pressing the control key and c at the same time Ctrl You may need to press this key combination several times if the program still out of control Individual processes 1 I tried to see the MODIS images I downloaded with modis_import sh in GRASS but nothing showed up e You may need to set a color map for the layer you want to view We described how to set a color map in Section 3 5 If your region setting is much larger than the im 120 2 3 4 age extent your layer may look very small or you may not be able to find it In that case you may need to manually enlarge the area you want to view I encounter an error that says signature 2 1s not integer values when I use 1 gensig What should I do e This error occurs 1f you have null values in your data So you need to fill in your NULL data by following the process described in Section 3 8 Alternatively you can set the null values to a different value by using the r null command in GRASS I want to know several g mlist command examples e You can use a wild card a regular expression and an extended regular expression for a map name filter You also can use the include and exclude
39. e input csv file output from modis_aggregate_dn sh e Forest category No code of Forest in Table 4 1 1 e Urban category No code of Urban in Table 4 1 1 gt Notes Category numbers except numbers in the forest and urban categories will be in the Cropland Herbaceous category Example gt sh modis_gen_simulation sh veg_training csv rep2 data 1 2 3 18 Output file rep2 data Since you will use the output from this command in later processes you need to make sure that the output file name has the extension data in its file name 5 3 Running a Decision Tree Model We are almost ready to run Cubist to build a tree cover prediction model Before you run Cubist however you need to make sure you have cubist exe and the name file in your working directory The name file for example rep2 name is required to run Cubist We prepared a template name file for your convenience You need to find the template names file in your working directory and change the file name to reflect the output file name you created during the last process For ex 101 ample if you specified rep2 data in the modis_gen_simulation sh command you need to rename template names file to rep2 names Now you can run Cubist to create a prediction model based on the training data The cubist exe uses the f option to specify your input data file We haven t explained how to use the Cubist progra
40. have chosen a region larger than your computer s memory can handle When using the R program to run the aggregate process sometimes this memory error cannot be avoided Narrowing your analysis region often helps you avoid this problem 5 2 Creating Training Data for the Image Classification We will need to create training data for the Cubist analysis To do this you will randomly select points from your training area and attach attribute values such as tree coverage and land cover type as well as all the aggregated indices you calculated in Section 5 1 You will need to prepare training data that shows tree cover for the process we are demonstrating You can prepare your training data by following the procedures described in detail in Sections 4 1 and 4 2 In sum first prepare a new folder in Google Earth and digitize polygons to encompass areas that represent pure land cover types for forested urban and cropland herbaceous Then you can store tree cover percent in the Name field of the property dialog box see Fig 4 1 5 Re peat this process until you obtain enough training areas for each land cover type Once your train ing data are ready as a KML file you can import training polygons into GRASS as a raster map by following the steps described in Section 4 2 Instead of preparing training data by yourself you can use existing data that represents tree cover The Global Forest Change 2000 2012 data is one example that y
41. have the chance to make con firm the options you have selected in the console window After reviewing your settings type y and hit the enter key if you are ready to proceed with the process Otherwise type n to restart the command and revise your option settings In the following example the script tries to fill cloud areas using images from the previous and subsequent ninety six days data option 3 in 2012 first and then uses the previous and subse quent years data next search order option 1 Syntax modis remove cloud Example gt cd c DATA GSI_MODIS gt sh modis_remove_cloud sh Specify target year VA0n Choose interpolation order 1 previous next year s data gt previous next 96 day s data 2 previous next 96 day s data gt previous next year s data 1 2 2 1 1 Select image data of the same year to use for interpolation 1 use previous 48 days only 2 use next 48 days only use both 48 days Your answer Target year 2012 Interpolation order previous next year s data gt previous next 48 day s data Image data to use use both 48 days Now it s ready to process Execute y n Y Examples of output layer names interp_MCD43B4 A2012249_band1 interp_MCD43B4 A2012249 band2 e interp MCD438B4 A2012249 band3 The modis_remove_cloud sh process will create a series of GRASS raster data with a prefix of interp This script is not sensitive to the current
42. kml output verify_area_all shp 94 H cat EEErE on ar _n iai P PIF on i r e re amend rt Bo a Pou r Le an Law ed i _ pen rt Ln BE cao t eed Z Fig 4 10 2 An attribute table created through the above example command land cover codes are stored in the Class field as integers Once you create the shapefile with the ogr20gr command you need to move the shapefile to the DATA GSI MODIS directory Then you can run the modis_check_classification sh to generate an error matrix This script also outputs a KML file that represents test data areas as KML points You can use these points to check your verification points in Google Earth Syntax modis_ check classification classified raster layer truth data file output error matrix output KML Example gt sh modis_check_classification sh LC_Japan_reclass_resamp verify_area_all shp error_matrix txt verify_all kml Input output file name examples Input file verify_area_all shp Output file error_matrix txt verify_all kml If you prepared a classification test data as a shapefile you can use modis_check_classification sh to generate an error matrix Fig 4 10 3 You need to make sure that the test shapefile has a Class column that stores true LC type code as integers 95 Example gt sh modis_check_classification sh LC_Japan_reclass
43. mask command using your rasterized political boundary map You can find the r mask command under the raster menu and specified required parameters as below Fig 3 7 10 Create inverse MASK from specified maskcats list i p to use as MASK nmask iInput jpn_mask MODs 51 Fig 3 7 10 r mask command to apply an analysis mask e Raster map to use as MASK jpn_mask MODIS e Category values to use for MASK You also can use this technique to create a mask with a different area for example a small part of the country instead of treating the entire country as one polygon 3 8 Removing Cloud Cover In this section you will learn how to use the cloud removal script Since this script runs within the GRASS GIS environment you need to work on this tutorial in the GRASS GIS 6 4 3 GUI with MSYS mode Most MCD48B products include some cloud covered areas Since clouds hide land cover they cause issues with image classification To ameliorate image classification quality we will extract information from images taken in a different time period and use that data to fill in the clouded area pixels The quality assessment data MCD43B2 will tell us the extent of cloud cover There fore make sure you download and preprocess both MCD43B2 and MCD438B4 products before you start the following exercise Additionally to limit the analysis to land not water we recommend setting a mask as we described in 3 7 To fill in the clou
44. open the all_class kml you just created with Google Earth You can visually check the classification results against Google Earth images Fig 4 9 1 ay Googie Been Fie pdr Vi ee ee Heg F Geach hppa hadiri Google earth qa Fig 4 9 1 Verifying the classification results using Google Earth 90 You can store your visual land classification as a KML file and use it to further examine classi fication accuracies in the next section To store your classification call right click a target polygon in Google Earth and open a dialog box for the polygon Then you can input your classification call as a land cover code Table 4 1 1 in the Name property box Fig 4 9 3 Repeat this process until you obtain enough verification points for the accuracy assessment in the next step 30417 54th Ave 5 Auburn WA 98001 HS Temporary Places 4 rat verify_cells_test_L5_3_class2 kml 4S rtemp_randam_cell WA Add Cut Topy Q E Delete F Layers Rename aE a Save ta My Places p AP Ba an j Save Place As gt J N ij Past ta Google Earth Community Farum e EOE Ro b gt Oe 3D Email p i i Ue me Snapshot View gt ELSE we BE Hal att W Slobarecerarerress M More test ihrechions PHisbory Fig 4 9 3 Type a land cover code Table 4 1 1 in the Name field to store your visual classifi cation call 91 After you input your classification call in the
45. path you are in when you execute it because this script deals with GRASS data Some pixels in the cloud removed images may have null values To remove these null values use modis_fillnull sh This script uses an inverse distance weighting IDW technique to fill null values This script will create a new null free set of raster data with the same name as its input data The original data will be renamed with the prefix old_ during the process Syntax modis_ fillnull sh target year Example gt sh modis_fillnull sh 2012 Examples of output layer names e old_interp_MCD43B4 A2012249 band1 e old_interp_MCD48B4 A2012249 band2 e old_interp_ MCD43B4 A2012249 band3 54 apan atl or i eS eee EEE Bode deeply cance eth geen backgroend color Fig 3 8 1 Before left and after right the cloud removal process 3 9 Processing Landsat images In addition to the MODIS image you can use images from the Landsat8 project to create land cover maps The GMRD tool includes a series of scripts to import merge topographically correct reflectance and fill cloud covered area with pixels from different images When you decide to apply a topographic collection on your images before importing them into GRASS digital numbers will be converted into reflectance automatically There is no automated image downloading mechanism for Landsat So as your first step you need to manually download images from Landsat image
46. process In spite of this error message sometimes created by pyMoids you can still continue to download images Next download MCD438B2 products and store the downloaded files to the same directory you used for MCD43B4 files The sequence of analysis requires that you store a pair of MODIS prod ucts e g MCD43B4 and MCD43B2 in the same directory If you want to use the MODIS 500 m products you need to make a different directory and store the image and QA QC products in the same directory such as MCD43A4 C DATA GSI_MODIS MCD438A4 Example 1 downloading QA QC products in the MCD43B4 directory gt sh modis_download sh t h28v04 h28v05 h29v05 sample orkney co jp MCD43B2 005 2012 09 01 10 31 C DATA GSI_MODIS MCD43B4 38 ret fa GO gt Computer OS C DATA GSLMODIS MCD43B4 4 Search MCD4384 p Organize v Include in library Share with Burn New folder 2 EEE Cl x Enoia Name g Date modified Type Size E Desktop listfileMCD43B4 005 tt 6 5 2012 10 07 PM Tet Document 0 KB Downloads _ MCD43B4 A2007281 h28v05 005 2007310135041 hdf 6 5 2012 10 08 PM _ HDF File 0 KB Recent Places _ MCD43B4 A2007289 h25v05 005 2007312143103 hdf 6 5 2012 10 08 PM _ HDF File 16 033 KB J GIS_DATA MCD43B4 A2007289 h25v05 005 2007312143103 hdf xml 6 5 2012 10 08 PM XML Document 19 KB F Dropbox _ MCD43B4 A2007289 h28v04 005 2007311190828 hdf 6 5 2012 10 08 PM HDF File 2 114 KB MCD43B4
47. simply need to type in the name of your new mapset For purposes of this exercise enter the mapset name MODIS and click the OK button Fig 3 1 9 These actions will create a mapset named MODIS Create nena Enter name for new mapset MODIS Fig 3 1 9 Create a new mapset If you create a mapset correctly it will appear in the column titled Accessible mapsets Fig 3 1 10 You can now start GRASS by selecting a location for this exercise select Japan_LatLon and a mapset MODIS from the lists and clicking the Start GRASS button at the bottom of the wiz ard Fig 3 1 10 30 Welcome to GRASS GIS 6 4 3 The world s leading open source GIS Select an existing project location and mapset or define a new location GIS Data Directory C GI5_DATAYGRASS Choose project location and mapset Project location Accessible mapsets Define new location projection coordinate system directories of GIS files ala MODIS i Create new mapset PERMANENT in selected location Create mapset Rename delete selected mapset or location Fig 3 1 10 A newly created mapset is shown in the Welcome to GRASS GIS window GRASS with the MYSIS mode starts with three windows Fig 3 1 11 GRASS GIS Layer Man ager GIS Map Display and MSYS screen The GRASS GIS Layer Manager top left in Figure 3 1 11 is used to manage layers and enter various GRASS commands The GIS Map Display top right d
48. spe cific information Syntax landsat_interpolate sh Example 61 gt sh landsat_interpolate sh 3 10 Processing VIIRS images VIIRS is another source of satellite images from which you can create land cover data You can download VIIRS images from the National Oceanic and Atmospheric Administration s NOAA website http www nsof class noaa gov saa products search datatype family VIIRS For this ex ercise we will assume you will download the Image Band EDR products band 1 3 to run VIIRS related scripts Similar to the Landsat processing there is no automated image downloading mechanism for VIIRS So as your first step you need to manually download images from the image provider Fig 3 10 1 ONOAA _4 gt gt COMPREHENSIVE LARGE ARRAY DATA e STEWARDSHIP SYSTEM CLASS k CLASS Home Login Register gt Help About CLASS EE CLASS Help All NOAA SEARCH Around CLASS NPP Visible Infrared Imager Radiometer Suite VIIRS vy GO Search VIIRS Data Description Visible Infrared Imaging Radiometer Suite VIIRS Data Records from Suomi NPP This data family contains the raw sensor and environmental data records from the Visible Infrared Imaging Radiometer Suite VIIRS on board the Suomi National Polar orbiting Partnership S NPP satellite VIIRS is a scanning radiometer that collects visible and infrared imagery and radiometric measurements of the land atmosphere cryosphere
49. th 28 Fig 3 1 6 Datum transformation selection dialog box In the last step of creating a location you can review your location parameter settings Fig 3 1 7 Define new GRASS Location 7 Summary GRASS Database C Users heshikik Documents GIS DataBase Location Name Japan_LatLong Location Title Projection EPSG code 4326 WGS 84 PROJ 4 definition proj longlat no_defs a 6378137 f 298 257223563 towags84 0 000 0 000 0 000 Fig 3 1 7 The summary of location settings In the dialog window Fig 3 1 8 you will be asked if you want to set the default region extents and resolution In this exercise we won t set a default region and resolution since those parame ters will be automatically set during other data importing processes you will need to go through later in this exercise So for now select No and go to next step Fig 3 1 8 Fig 3 1 8 Default region and resolution setting At this point you have created a new location and are now ready to create a mapset for your da ta analysis 29 When creating a location the software automatically creates a mapset named PERMANENT However the PERMANENT mapset is a special mapset that should be used to store original data intact so it is a good practice to create a new mapset for use during your analysis To facilitate this process a Create new mapset wizard will automatically appear after you create a location so you
50. the Welcome to GRASS GIS dialog shown in Figure 3 1 2 will appear You need to specify your data directory recall we are using C GIS_DATA GRASS for this exercise by clicking the Browse button next to the GIS Data Directory text box Once you 25 set your GIS Data Directory your directory path will be shown in the text box Fig 3 1 2 If you use an external hard disk to secure enough free disk space create a new GRASS data directory and specify the directory in the GIS Data Directory column y Welcome to GRASS GIS cation and mapset w location GIS Data Directory Choose project location and mapset Manage Project location Accessible mapsets Define new logo projection coordinate system directories of GIS files Create new mapset in selected location Create mapset Rename delete selected mapset or location Rename mapset Start GRASS Fut Fig 3 1 2 GRASS startup screen In the next step you will set up your GRASS location and mapset using the Location wizard You can access the location wizard by clicking the Location wizard button on the Welcome to GRASS GIS dialog Fig 3 1 2 With the Location wizard Fig 3 1 4 you can create a location interactively First enter the GRASS Database Directory where a location will be created For example if you were using the same directory path we designated you would type C GIS_DATA GRASS in the GRASS Data Di
51. use MCD43A4 and MCD48A2 instead 32 e OSGeo4W_PATH OSGeo4W install path e g ce OSGeo4W e R_BIN R exe full path e g c Progra 1 R R 3 0 2 bin x64 R exe e RSC_BIN Rscript exe full path e g c Progra 1 R R 3 0 2 bin x64 Rscript exe e R_LIBS R library full path e g c Progra 1 R R 3 0 2 library e PRODUCT_NAME _ MODIS product name e g MCD43B4 or MCD43A4 e QC_NAME MODIS QC product name e g MCD43B2 or MCD43A2 e COLLECTION MODIS product collection number e g 005 Notes Scripts may not work properly if you include a space in the path To avoid problems later please make sure to specify an alias name that doesn t include spaces You can con firm each path s alias using the dir x command e g Progra 1 is set as an alias for Program Files Notes You also need to set the R_LIBS variable A path to the R library depends on where you install R packages in Section 2 5 If you follow the steps in 2 5 exactly you should set a full path the same as explained above If you did not start R as an administrator your li brary path may be in the user folder instead e g c users yourname Documents R win library 3 0 1 edit the following variables 12 There is nothing to edit below this line normally 14 export PATH OS5SGEO04W_PATH bin PATH 15 export PYTHONHOME OS5GEO4W PATH apps Python27 6 export GDAL DATA OS5GE04W_PATH share gdal 17 export MODIS DOWNLO
52. use the ogr20gr command for this data format conversion It is easy to convert a KML file into shapefile however it is little bit tricky to convert the Name field values stored as text data in the KML file into integers in the output shapefiles that are a required field attribute for later processes You are also required to name the field Class to store the land cover code in the output shapefile In the ogr20gr command you can use sql option for the data type and field name conversion Check the OGR home page for additional details on the ogr20gr command http www gdal org ogr20gr html Syntax ogr2oer f file format output shapefile input kml sql sql command Example gt ogr2ogr f ESRI Shapefile verify_area_all shp all_class kml sql SELECT cast Name as integer as Class from rtemp_random_cell Notes With the sql option you read the Name attribute in the input KML file as an integer and save it in the Class column in the attribute table of a shapefile You should specify rtemp_random_cell as the layer name and this layer name is the same as the folder name in the all_class kml Fig 4 10 1 LLL oil LLL NFL F Places 4 vi g all_elass krmnl 4 E rtemp_random_cell Ie e IES A AA AA es MODOGGORAIBA L we ee ie i ie Fig 4 10 1 A KML folder name Input and output files Input all_class
53. ve_jpn if jpn_mask 1 if LC_Japan_reclass_resamp 20 254 result_tree_cove Fig 5 9 2 Raster Map Calculator e Name for new raster map to create ve_jpn e Expression if Gpn_mask 1 if LC_Japan_reclass_resamp 20 254 re sult_tree_cover_dep_resamp 254 After you execute the map calculation exports the resulting map as a GeoTIFF file using the r out gdal command 114 e rr RS V Exports GRASS raster maps into GDAL supported formats Required Print Optional Command output Manual Name of raster map or group to export input name ve_jpn mMobpIis F Name for output raster file output name C DATA GSI_MODIS ve_ipn tif cose rin cop J Hep r out gdal input ve_jpn MODIS output C DATA GSL MODIS ve_jpn tif Fig 5 9 3 Exporting the final tree cover percent map as a GeoTIFF file Name of raster map or group to export ve_jpn e Name for output raster file C DATA GSI_MODIS ve_jpn tif 115 6 Tips and References In this Chapter we ve listed documents and online resources that we used to develop the GMRD tools provided in this Manual We ve also listed tips for you to use when developing various raster data Classifying Land Cover Type We developed our methods and scripts based on the methods developed in the Global Map Global Land Cover GLCNMO 1st and 24 editions You can download a document regarding the 1st edition of GLCNMO from following URL e ftp
54. 013 09 25 by Duncan Murdoch watson nd unih gow oran_mirren bin windows base MEWS R 3 0 thti Fig 2 5 5 The windows installer download page Once you download the installer execute R 3 0 2 win exe by right clicking the file and choosing Run as administrator in the context menu Gust like you did when installing GRASS 20 At the beginning of the installation process the User Account Control dialog will appear When it does click Yes and go to next step When the language selection dialog opens select English Fig 2 5 6 Select Setup Language esm Select the language to use during the installation Fig 2 5 6 Select Setup Language dialog Then finally the actual setup process will start as shown below Figure 2 5 7 j Setup R for Windows 3 0 2 Welcome to the R for Windows 3 0 2 Setup Wizard This will install R for Windows 3 0 2 on your computer Itis recommended that you cose all other applications before continuing Click Next to continue or Cancel to exit Setup Fig 2 5 7 R project setup dialog 99 You can accept all default settings during the installation except for at the Select Components dialog box Fig 2 5 8 At the Select Components dialog you will need to choose installation files based on your operating system You can run the 32 bit Files on both 32 bit and 64 bit Windows If you are not sure which OS version you are using select 32 bi
55. 1 0 zip flana Use lgm jpn u 1 0 zip lam ipn lu u 1 0 zip Vegetation am ipn ve 1 0 zip lgm j zi e Legend please see Global Map Specications version 1 2 1 noted above Fig 3 7 2 Downloadable data list at the Global Map Japan site red circle the political bound ary data Once you reach the download site download a political boundary shapefile to your destination directory and import the files into GRASS You can use v in ogr command Fig 3 7 3 for this pur pose 46 S GRASS GIS Layer Manager Settings Raster Vector Imagery Volumes Database Help Workspace gt Map display b Import raster data Import vector data Import 3D raster data SE OS E Import database table Export raster map Export vector map Export 3D raster maps e a SS Export database table e lates ASCII points GRASS ASCII vector import v in ascii ASCI points as a vector lines v in lines Historical GRASS vector import v convert Historical GRASS vector import all maps v convert all DXF import v in dxf Fig 3 7 3 v in ogr command to import vector data into GRASS Once you select the v in org command from the file menu Fig 3 7 3 select the downloaded po litical boundary data as a source file and run the command Fig 3 7 4 Import vector data Settings Source type File i Directory Database Protocol Source settings Format ESRI Shapefile File C DATA GSI_MODIS globalmap p
56. 12127 Records VIIRS3SIEDR 03 11 49 579 03 17 57 888 2127_c20140301091746 287048_noaa_ops h5 VI3BO_npp_d20140301_ 2014 03 01 t1531369_e1537399 bi siai Fig 3 10 5 An example of image lists 1 Check the images you want to download 2 Update the selection list and 3 Go to the shopping cart On the shopping cart page Fig 3 10 6 you will see the image list you chose If you already have an image download account you will see the Place Order button however 1f you don t yet have an account the Register button will appear instead Fig 3 10 6 and you can register with your name and email address SNOAA CLASS Aone Around CLASS i Hame e Search for Dala e Uphred Bearch n seamh Reang e Shopping Cari a Order Sinua i Help User Anemami h User Pino ob Uter Pre Advanced e Bowniloe Rriease in a Wersi if March W i Hha Linke a CLASS Wire et HHE e HEC a BE a HESHS e HOVA i MN If you haven t registered yet Register button will show up instead In thal case you need to register and creale a download account before NOAA ICME WEANMH GCLANS TSERIES CAN TIOG SATELLITES CLIMATE BESLARCE COASTS CARLLHS COMPREHENSIVE LARGE ARRAY DATA STEWARDSHIP SYSTEM CLASS SATIDAAL OCPASIC ARD waht CLASS iE r Lagout n Hip Total size of selected data sets Number of data sais you place your order ce Fig 3 10 6 29S DORPREA
57. 3 5 3 Add various raster map layers menu To finish creating the RGB composite image specify band1 image as red band4 as green and band3 as blue in the RGB composite dialog Fig 3 5 4 42 i d rgb display raster RGE gt Displays three user specified raster maps as red green and blue overlays in the Y active graphics frame Optional Manual Name of raster map to be used for red red name band 1 El Name of raster map to be used for green green name Name of raster map to be used for blue lue name band 3 d rgb o red lt required gt green lt required gt blue lt required gt Fig 3 5 4 RGB composite image dialog A composite RGB image may look like Figure 3 5 5 P bada da i 146 39 09 70E 46 08 05 03N Fig 3 5 5 RGB composition image R band1 G band4 B band3 Again if you want to use the MODIS 500 m products MCD43A4 and MCD43A2 you need to repeat the same procedures described in sections 3 2 to 3 5 replacing MCD43B4 with MCD438A4 for each image processing command Don t forget to change the modis_setenv txt settings 43 3 6 Managing Intermediate Data You are about to start a series of image processing using GRASS During the processes you will create lots of intermediate data and you may want to delete thos
58. 76 86 5338845 1 This example shows that the raster value of the chosen point longitude 139 406476 latitude 36 533845 is 1 A map legend may help you to understand which raster values are shown in the map view Add a legend by clicking the Analyze map icon in the Map Display window Fig 4 6 2 and selecting Add legend 84 cation Jape pan I atLon om IRR DA o P ada de iE Add scalebar and north arrow Add legend Add text layer Fig 4 6 2 Add legend menu The Legend of raster map dialog box will pop up Fig 4 6 3 and you can check on the Show hide legend option At this point you can adjust some variables by clicking the Set options button in the dialog box before you click OK You should take note to remember the relationships between raster values and the LC codes for the image reclassification in the next step 4 7 Set options Drag legend object with mouse in pointer mode to position Double click to change options Define raster map name for legend in properties dialog Fig 4 6 3 Raster map legend dialog box 4 7 Reclassifying raster values We are going to reclassify the raster values to match your chosen LC code Table 4 1 1 You will use the r reclass command from the Raster menu Fig 4 7 1 85 jw GRASS GIS Map Display 1 Locatii LOr Rg fo Develop raster map Manage colors Query raster maps Map type c
59. 9 Mar 2012 04 32 WinGRASS 6 4 2 2 Setup exe 09 Mar 2012 04 32 WinGRASS 6 4 2 1 Setup exe md5sum 19 Feb 2012 13 24 WinGRASS 6 4 2 1 Setup exe 19 Feb 2012 13 24 WinGRASS 6 4 1 1 Setup exe 12 Apr 2011 12 56 WinGRASS 6 4 1 1 Setup exe md5sum 12 Apr 2011 12 51 ka ka ka V GRASS GIS 6 4 for MS Windows Native Note Altematively to the stable winGRASS package available here you can also download daily winGRASS binary snapshots Table of Contents Introduction Release Notes Fig 2 2 3 List of GRASS installers for various software versions Once you finish downloading the installer right click on the downloaded file and select Run as administrator on the context menu to start the installation process Fig 2 2 4 Troubleshoot compatibility s a bis Bw B Edit with Notepad x amp Move to Dropbox m amp amp Whatis locking this file aor aie Share with gt rewi py amp Hg Workbench aw 9 TortoiseHg r Mow W Scan for threats n i Restore previous versions Sete en ae W Dond Send to Dte edifiet MINSI AM O Cut Fig 2 2 4 GRASS installation 6 Once the installation process starts you may accept all default settings except the component choice dialog box Fig 2 2 6 You need to check the Important Microsoft Runtime DLLS option in the dialog box and continue accepting the default settings to complete the installation Fig 2 2 7 and 2 2 8 lt lt GRASS GIS 6 4 3 1 Se
60. A QC If you want to analyze the 500 m resolution im ages instead use MCD43A4 and MCD438A2 products To download MODIS products use modis_download sh Before executing the command it is a good idea to create a data folder to store downloaded data From here to Section 3 5 of this Manual we will use MCD438B4 to describe how to download data and complete other processes After you complete this initial process you can conduct same processes by simply replacing MCD43B4 with MCD48B2 30 gt mkdir c DATA GSI_MODIS MCD43B4 The modis_download sh script downloads specific MODIS products for a given time period and spatial extent The modis_download sh will automatically download data for the same date range you set for the previous and the following year For example if you download images between 2012 09 01 and 2012 10 31 modis_download sh automatically downloads images taken between 2011 09 01 and 2011 10 31 as well as images between 2013 09 01 and 2013 10 31 You can download several image tiles by specifying MODIS s tile numbers in the modis_download sh command The LP DAAC stores images as tiles and each tile has horizontal h and vertical v numbers For example h28v04 h28v05 and h29v05 tiles almost entirely cover the Japanese archipelago Fig 3 2 2 z amp Google Earth S fo e ls Search pD oa 1s S 2 a S EB lS bls Sign in Search i ex pizza near NYC Get Directions History v Pl
61. A2007289 h28v04 005 2007311190828 hdf xml 6 5 2012 10 08 PM XML Document 19 KB ea Libraries _ MCD43B4 A2007289 h28v05 005 2007311193743 hdf 6 5 2012 10 08 PM HDF File 6 690 KB Documents MCD43B4 A2007289 h28v05 005 2007311193743 hdf xml 6 5 2012 10 08 PM XML Document 19 KB a Music _ MCD43B4 A2007297 h25v05 005 2007333110018 hdf 6 5 2012 10 07 PM_ HDF File 15 961 KB Pictures MCD43B4 A2007297 h25v05 005 2007333110018 hdf xml 6 5 2012 10 07 PM XML Document 19 KB E Videos _ MCD43B4 A2007297 h28v04 005 2007333160928 hdf 6 5 2012 10 08 PM HDF File 2 103 KB MCD43B4 A2007297 h28v04 005 2007333160928 hdf xml 6 5 2012 10 07 PM XML Document 19 KB j Computer _ MCD43B4 A2007297 h28v05 005 2007333163813 hdf 6 5 2012 10 07 PM_ HDF File 6 815 KB amp 0s c MCD43B4 A2007297 h28v05 005 2007333163813 hdf xml 6 5 2012 10 07 PM XML Document 19 KB G share TS WXLBE1 X _ MCD43B4 A2008249 h25v05 005 2008274195059 hdf 6 5 2012 10 06 PM HDF File 15 753 KB MCD43B4 A2008249 h25v05 005 2008274195059 hdf xml 6 5 2012 10 06 PM XML Document 18 KB Ga Network _ MCD43B4 A2008249 h28v04 005 2008274233214 hdf 6 5 2012 10 07 PM_ HDF File 2 122 KB pM ATERM F45211 MCD43B4 A2008249 h28v04 005 2008274233214 hdf xml 6 5 2012 10 07 PM XML Document 18 KB pM EINS _ MCD43B4 A2008249 h28v05 005 2008275020156 hdf 6 5 201210 06 PM HDF File 6 843 KB jM GIS HP MCD43B4 A2008249 h28v05 005 2008275020156 hdf xml 6 5 2012 10 07 PM XML Document 18 KB pM SAKURA _
62. AD PY S O5GEO4W PATH apps Python27 Scripts modis download py Fig 3 2 1 An example of modis_setenv txt You may need to modify the highlighted lines You don t need to change environment variables in the modis_setenv txt except for the above seven settings When you finish editing the file you need to update and confirm the environment settings manually by running the following command This process is recommended even if you didn t change the modis_setenv txt file 33 gt cd c DATA GSI_MODIS gt source modis_setenv txt You can check whether your analysis environment is updated with the modis_printenv sh script This script returns the environment variables you set in the modis_setenv txt Once you confirm your variable settings you don t need to run the source command again so long as you keep working through this tutorial and keep GRASS open and active However 1f you close the GRASS and MSYS console you will need to run the source command again to load the variable settings Each script you will use in the following steps includes a function to load the environment settings if the variables are not set However this mechanism only works if a target script is in the same directory as the modis_setenv txt gt sh modis_printenv sh parameter values OSGEO4W_PATH c OSGeo4W R_BIN c Progra l R R 3 0 2 bin x64 R exe RSC_BIN c Progra l R R 3 0 2 bin x64 Rscript exe PRODUCT_NAME MCD4 3B4 OC_NA
63. B 1 2 GB VIIRS 1 tile 1 5 bands 2 GB 10 Japanese or another language s messages are unreadable in MSYS What should I do e Change to an English environment If you want to switch your settings to English in GRASS with MSYS you need to modify the msys bat file in your GRASS instal lation director msys and add the following sentences 119 set LANG en_US set LANGUAGE en_US set LC_MESSAGES en_US General Environment Settings and Data Download 1 I want to stop my analysis and restart it later What steps do I need to take to restart my analysis e After you close GRASS with MSYS you will lose your environment settings So you need to load your environment setting file when you restart your analysis Move to the directory where you store your environment setting file such as modis_setenv txt and run the source command to load settings 2 Icouldrun sh scripts without sh at the beginning of the command Why e If you use GRASS with MSYS in a Windows environment you don t need to add sh at the beginning of your command However in some shell command environments you don t have an sh execution privilege So to be on the safe side we added the sh onto each command 3 I could not download MODIS images e Make sure your options are correct It is a good idea to try downloading with sim pler options first to test whether the pyModis scripts works Then you can add more options later
64. Global Map Raster Devel opment GMRD Tool User s Manual Index l JARE OCC C1 E EAE acct E E E AO A A E E 1 T ASTAR ain cash OA E E E EEE E EAN 1 12s Reguire ments eoun E E a a a ay 1 Toe Operat e Enronin ennot a aE 2 e E O D AUC A E E ETE E AEAN E A T ETT 2 Tei COD WS i asa eiisteace eaters a sain ss cleans wd ab aps bp vn a eo ea eds esate ake 3 IR atois UND ob ater ei Weis Rio ee ere p er re amen A Te Ta Nee AD Ud TU nD E AEEA OR 4 2 1 Preparing to Install Required SoftWare cerasi aaien a Mirena EEE 4 DD Mistal GRASS earne En T EEEE ENT 4 Ore asta Mine OS GCO4 W eanan 11 DAs MVS adn Wy Mod S205 i055 as aan ates a aa tated ead na satin eased sae baa aenaare eee aes 15 270 metaline ta tistical PACK ASS R erorcen OEA TAA R 18 Pre processing Satellite Images neeseseneesesessesesesersesesersesesessesesessesesesessesesesseseseeseseseesess 25 3 1 Setting up the GRASS Environment essesesesseseseesesesereesesersesesessosesesseseseseeseseseesesenees 25 3 2 Setting the Environment Variables Used for Executing Scripts cccccceccesceeeeeeeeeees 32 373 Dowmloadine MODIS Data iicsisshtss snn aa aaa teased bers aaess 34 3 4 Reprojecting and Merging Mages cece ccccecceceececceccecceceeeceeceeceeseecsceeceeeeeesessesseeses 39 3 5 Importing GeoTIFF Images into GRASS eisereen adei aieiaa ia 40 36 Manace Intermedia lLe Data nicicum ei n a a a 44 Se LUNE Analysis Extent wih a MaS kareri EEEE E ATE 45
65. IC ADD Picasso perper a produc to search Click ona dalasal name to son the datasel details SP TaaATi oe 1 AUR crassnep Go Shopping Cart agg 104 0 0 Bries You will be notified at 7 Ordar Comment Advanced Options CommitEhanges _ Reset Remova All VIRS VIRS Results VIRS Search Page Cavhasoet Waren lachuh Ragital Signahace WITRS IEG VIIES opp dRoLaOR01 311405 eF1TS7S bd 127 _ aod a 286016 _soaa_ops h3 WIESSIEDR VIFEO opp dioi4ogol TEC ECE ELETI 2L27_cPOl40S01L001746 1570 _ ntaa ope bd E An image list in the shopping cart 65 After you click the Place Order button the site will take you to the Confirmation page of your order Fig 3 10 7 You will see your order number and some information about the time it takes for NOAA to prepare your data for download You will receive an email message once your order is ready to download this typically takes several hours or longer Shopping Cart Confirmation Thank you for placing your order with the Comprehensive Large Array data Stewardship System Your confirmation number is 1292300833 When data becomes available you will be notified at this address If you have placed a large order please allow more than 48 hours for delivery of your data If your order is not delivered within 5 days please contact the CLASS Help Desk You may check the status of your order at any time by clicking on the Or
66. IS data found between September and October 2012 around Japan However we originally designed this program to use images from one entire year to remove cloud cover areas and null values If you want to analyze images using a full year of data then the processes will require approximately 200 250 GB of disk space By properly deleting tem porary files you may be able to save some disk space It 1s important that you make sure suffi cient disk space is available before you start this tutorial If you want to use LANDSAT or VIIRIS images instead of MODIS images you need to have an even larger hard disk space 2 2 Installing GRASS Geographic Resources Analysis Support System GRASS is free GIS software used for geomet ric correction image processing data management spatial data analysis spatial modeling and data visualization The official GRASS site http grass osgeo org offers various information re garding GRASS software and its usage In this Manual you will use GRASS 6 4 3 You can download it at http grass osgeo org download From the MS Windows installer download page Fig 2 2 2 jump to the GRASS installer down load page Fig 2 2 3 by clicking the Free download of GRASS GIS for MS Windows link EUEN ae gt BB yrs 00ge0 0179 GRASS GIS The world s leading Free GIS software Home Download Documentation Galery Support Donations Development Get involved Home aan Celebrating 30 years GRASS
67. MCD43B4 A2008257 h25v05 005 2008278014245 hdf 6 5 2012 10 05PM HDF File 15 766 KB pM TS WXLBE1 MCD43B4 A2008257 h25v05 005 2008278014245 hdf xml 6 5 2012 10 06 PM XML Document 19 KB _ MCD43B4 A2008257 h28v04 005 2008278072809 hdf 6 5 2012 10 06 PM HDF File 2 143 KB MCD43B4 A2008257 h28v04 005 2008278072809 hdf xml 6 5 2012 10 06 PM XML Document 19 KB _ MCD43B4 A2008257 h28v05 005 2008278080128 hdf 6 5 2012 10 06 PM HDF File 6 236 KB MCD43B4 A2008257 h28v05 005 2008278080128 hdf xml 6 5 2012 10 05 PM XML Document 19 KB _ MCD43B4 A2008265 h25v05 005 2008287155755 hdf 6 5 2012 10 05PM_ HDF File 15 944 KB MCD43B4 A2008265 h25v05 005 2008287155755 hdf xml 6 5 2012 10 05 PM XML Document 19 KB _ MCD43B4 A2008265 h28v04 005 2008287204042 hdf 6 5 2012 10 05PM HDF File 2 141 KB MCD43B4 A2008265 h28v04 005 2008287204042 hdf xml 6 5 2012 10 05 PM XML Document 19 KB McCn432R4 47008765 h 8W15 NNS 2NNRIRR1 74713 hef 4 5 2017 10 05 BM HDF File ANN1 KR a bh 63 items Fig 3 3 2 Downloaded MODIS image files 3 4 Reprojecting and Merging Images Downloaded MODIS data adopt the Sinusoidal projection system and the HDF file format You will often use several image tiles to cover your areas of interest Therefore you need to merge and reproject your images for the image analysis Additionally you will need to separate bands into single band images for later processes We will use the modis_merge sh script for these processes To reproject m
68. ME MCD43B2 COLLECTION 005 PATH c OSGeo4W bin C Program Files x86 GRASS GIS 6 4 3 lib PYTHONHOME c OSGeo4W apps Python27 GDAL_ DATA c OSGeo4W share gdal MODIS_DOWNLOAD_PY c OSGeo4W apps Python27 Scripts modis_download PY 3 3 Downloading MODIS Data MODIS is a visible and infrared radiometer onboard NASA s TERRA and AQUA observation satellites MODIS s spatial resolutions are between 250 and 1000 m These spatial resolutions are lower than other medium high resolution sensors however MODIS can capture 36 spectral bands and record images at a high temporal frequency In fact MODIS acquires an image of the same area once or twice a day TERRA passes through the equator in the morning and AQUA passes 34 through the equator in the afternoon This technology thus allows you to obtain various types of data such as land cover vegetation forest fires land surface reflectance and ocean surface tem perature Land Products which is a MODIS product series is created distributed and stored by the Land Processes Distributed Archive Center LP DAAC Fig 3 3 1 For more information about MODIS please check following website https lpdaac usgs gov products modis_ overview fo SEH aC X LP DAAC s ASTER and MOm wunga D ZUSGS smence for a changing warid USGS Home Contact USGS Search USGS p i Foam L PARA T ope a f Re ee f Ti at ge ere p i F w 5 3 ea Fa ir ee S ae
69. O lt Network Link Located in Paris F Fig 4 1 2 Add folder menu Google Earth New Folder a Name Training reel s s V Allow this folder to be expanded Show contents as options radio button selection Description View Fig 4 1 3 Creating a new folder named Training_area Next create your first polygon Before you start creating a polygon you need to identify a train ing area After you zoom in on the area you are going to digitize select the Polygon under the Add menu Fig 4 1 4 File Edit View Tools Help Search Folder Ctrl Shift N Placemark Ctrl Shift P ex Restaurants Get Directions Ctrl Shift T Path w Places 4 as My Places 4 V amp Sightseeing Tour Make sure 3D Photo Buildings Start tour here The Eiffel Tower Ctrl Shift M Model Tour Image Overlay Ctrl Shift O v v Network Link Located in Paris Fr 69 Fig 4 1 4 Add polygon menu The New Polygon dialog box appears Fig 4 1 5 In the new polygon dialog box you need to input the land cover code you are interested in into the Name field Fig 4 1 5 We will use Table 4 1 1 as our LC code table for this exercise You don t need to add any other information in the dia log box Google Earth New Polygon Eal w Description Styl
70. RDSHIP SYSTEM CLASS NATIONAL OCEANIC AND ATMOSPHERIC ADMINISTRATION Search for Data Upload Search Search Results Shopping Cart Order Status Help User Account User Profile User Pref Download Keys Release Info Version 6 3 1 0 2 Ca EY O EN Haas View Shopping Details Cart VY 604888993 Inventory 1D Satellite March 30 2014 Other Links ED we ua 604889013 NPP Gl A oss wee Help gt AboutCLass GEES CLASSHelp AIl NOAA gt SEARCH NPP Visible Infrared Imager Radiometer Suite VIIRS v GO Data Product Search Results VIIRS click here for a printable listing Recently Searched Data Sets VIIRS GO Currently you have 48 hits out of 690381 entries There are 0 VIIRS items in your shopping cart The shopping cart limit is 100 Update DeselectAll Jump To Page v Page 1 Start Beginning Datatype End Date Time Dataset Name Orbit Date Time Number Imagery Band 01 VI1LBO_npp_d20140301_ Environmental Data 2014 03 01 2014 03 01 t0311495_e0317578_b1 12127 Records VIIRSLIEDR 03 11 49 579 03 17 57 888 2127_c20140301091746 286616_noaa_ops h5 Imagery Band 02 VI2BO_npp_d20140301_ Environmental Data 2014 03 01 2014 03 01 t0311495_e0317578_b1 12127 Records VIIRS2IEDR 03 11 49 579 03 17 57 888 2127_c20140301091746 286860_noaa_ops h5 Imagery Band 03 VI3BO_npp_d20140301_ Environmental Data 2014 03 01 2014 03 01 t0311495_e0317578_b1
71. S Surface Type EDR public 01 29 2013 VIIRS Suspended Matter EDR public 05 12 2012 E VIRS Vegetation Index EDR public 05 02 2012 Application Related Product UJ VIIRS Active Fires ARP public 04 03 2012 to place small order after reviewing inventory and granule metadata including browse images when available to place large order without reviewing inventory or granule file metadata Load Criteria Dataset Name Granule ID Beginning Orbit Number View Home Search for Data Upload Search Search Results Shopping Cart Order Status Help User Profile User Preferenc Download Keys CLASS Help Desk Suggestions Privacy Policy Disclaimer Fig 3 10 4 Click the Search button to start searching for images After the image search finishes a list of VIIRS images matching your criteria will show up Fig 3 10 5 You can check each image and decide which images you want to download You need to select the check boxes for each image Fig 3 10 5 and click the Update button to put the images into your Shopping Cart After you have selected all the images you want to download and up dated the list one last time you can click the Goto Cart button to move to the shopping cart page 64 CLASS Home Around CLASS Home NOAA Login Register NOAA HOME WEATHER OCEANS FISHERIES CHARTING SATELLITES CLIMATE RESEARCH COASTS CAREERS non A H COMPREHENSIVE LARGE ARRAY DATA STEWA
72. S programs OSGeo4W provides an effective way to manage your software and de velopment environment related to geospatial data analysis The official OSGeo4W website is http trac osgeo org osgeo4w T Cay G A TCC me rs MOE fmi O MR 2 ADP Tether Line 0 tits ores gt a OSGeo4W 1 ee zin a PRLI uu P Tapi I me T y T i aa rire Br rnii fee Phe Daler mirai Jis Akj ir net Sg O SGemiWw Tatie of Contents Gareth frat hie chien Leer Iii Freeh mm Pika Gutto CopSees i Liner baloira DaRi A Pace eigen Pag mi ep wih ee ma e mis e Oe i iP EET a ere ries CSc project CECA i a a sary denen of a Broad get of pen Harea tell Haaa for Wind arenas reddened BP ii Hij Cee cee UL CHA FAAS Muyo Ceres Wo OCHS oe wel at mre Wher packages ower 15 Thea promect i under tre umbels of the Open Source Geospatial Fourdation Rep wwe osged org Cay DUDHE e a ee or etl od et Gee id ee Bh wll Uae yi Oo Gay Lares peed oo lees Quick StartforOSGendiW Users _ i Gariad i a eet iiiki HA nee tenors msiba pra Set ny arate Fi Farm hi ngi 1 Hert Eeorece Marae and feat a PEE ofa Gr mere pak aoe E ie oe pi et no Tha ae ee Seed Gre Deer re gape al be Garand dtd ena alem e aly Fig 2 3 1 OSGeo4W project home page The section Quick Start for OSGeo4W Users on the OSGeo4W home page Fig 2 3 1 explains how to install OSGeo4W and you simply need to follow the directions provided
73. SSe REMOVE C Ond CON CP aoin aaan Ta E E T ET 52 O79 PLOCCSSING Landal Ma SCS earra E E E E ETE R 55 21O Processie VHRSO IMAC CS anao Seah a a a abies Naki aadeewieteds 62 Creatine aa Oy Ci NLA Peeri EAA dete ata REO EN 68 4 1 Acquiring Training Data for Your Image Classification ccccccccccceeceecescceeceeceeeeeeees 68 42 Importing Training Data into GRADS serrer r iner EAE AATE 72 AS GCalculatine Various Mdi CS n sprrp reene E Nene EE EENE AEN EEE E ca TTE 74 AzA Merny Tranne Dataene a iu neatostiwash ot uoeabecawiaereleranpansaciaeneteiszeraie denen 76 APs ASS Uy Ls Cl CO CT capes tiene visas oa ness ease atacand esa ae asda 77 4 5 1 Grouping Images for Supervised Classifications cccccccecceeceeseecceseeseeseesescesseesees 77 4 5 2 Classifying Images Using the Maximum Likelihood Classifier 78 4 5 3 Classifying Land Cover Using the Decision Tree Method 0 cccccecceecceeeeeeeeeeee 82 A 6 Checkme Classification Results usm aiscsierceniedusaictes aaea a a E E E i 84 AST Reclassi yina raster vValUC Srian a a a a N 85 Asos RecA moe MA OCS rr a T EEO 88 4 9 Generating random verification points eessssssesessescsesersrsessrresesersesersesesesesersesererseseeees 88 4 10 Evaluating a Classification Accuracy using Verification Data 93 Aoi Wexportine the land Cover Maps vecissaccmiscaitinuave secanaieaeusaases a isin nas 96 Estimating Percent Tree Cover Using the Land Cover Map
74. _resamp verify_area shp error_matrix txt verify kml Input output file name examples Input file verify_area shp independent test data you prepared Output file error_matrix txt error matrix verify kml verification areas 1 ACCURACY ASSESSMENT 2 LOCATION Japan LatLon Fri Mar 28 00 29 20 2014 3 MASE jpn mask MODIS in MODIS categories 1 4 MAPS MAPI Categories verify area in MODIS 5 MAP Reclass of LC Japan MmonIs in MODIS LC Japan reclass resamp in MODIS Error Matrix amp Panel 1 of 1 m z MAFI 10 cat 2 3 4 11 12 18 20 Row 5um 11 M 2 796 0 0 0 0 g 0 796 12 a 3 323 0 0 a 0 0 0 323 13 EF 4 0 0 0 0 0 g 0 0 14 2 11 1 0 0 0 3 g 0 4 15 12 0 0 0 0 171 0 0 171 16 18 568 0 12 O 97 843 11 1531 17 20 g 0 0 0 0 g 0 0 18 Col Sum 1688 0 12 Oo 271 843 11 2825 21 Cats Commission Ommission Estimated Kappa 22 2 0 000000 52 843602 1 000000 zi E HA HA HA 74 4 NA Na NHA bi Fig 4 10 3 Example of the error matrix created by the modis_check_classification sh 4 11 Exporting the Land Cover Map You can export the land cover map from GRASS and use it with other GIS software or share it with other people Select Common export formats r out gdal command under the File Export raster map menu Fig 4 11 1 96 Sy GRASS GIS Layer Manager o EE 43 GRASS GIS Map C Settings Raster Vector Imagery Volumes Database Help F i E 33 a ignis a oF Workspace Fal Map display Impor
75. a B wv l Query raster maps d Color tables stddew r colors stddew Display 1 Map type conversions i Color rules r colors Buffer rasters r buffer Concentric circles r circle Closest points r distance Mask r mask Export color table r colors out Blend 2 color rasters r blend Create RGE rcomposite RGE to HIS r his Fig 3 5 1 Using the r colors command in GRASS to change a map s color setting 41 n o Y Creates modifies the color table associated with a raster map layer Creates modifies the color table associated with a raster map layer Required Colors Optional Command output Manual Required Colors Optional Command output Manual Name of input raster map E Invert colors MCD43B4 A42012281_band3 MODIS F Logarithmic scaling E Logarithmic absolute scaling ee of color table Path to rules file to read rules from stdin or enter values interactively C Ge Go Ge oS Gee Gon Ged r colors map MCD43B4 A2012281_band3 MODIS r colors e map MCD43B4 A2012281_band3 MODIS color grey255 Fig 3 5 2 Choose a target map in the Required tab select gray255 from the Type of color table dropdown list in the Colors tab and check the Histogram equalization option After you set up a color map for each layer you can click the Add various raster map layers button Fig 3 5 3 and create a RGB composite image PEON Fig
76. aces vi fe Our ald apartment a 2275 S272nd St Federal Way WA 98032 v Our house 315 7th St S Apt 7 Fargo ND 58103 v e Our old house 36417 54th Ave S m Auburn WA 98001 Tile Indices men Horizontal 28 vertical 5 4 V SJ Temporary Places yr aa rt I2 i y o gt an 4 VI MODIS Sinusoidal Grid P Tile Spatial Extent degree gt MVE Features 4 Longitude Min 115 4789 MIE Feature Labels la n Latitude Min 30 Longitude Max 143 5921 Latitude Max 40 r g E j v Layers Earth Gallery gt gt Og Primary Database PE P Borders and Labels E Places Photos ES Roads a 3D Buildings E Ocean 3 Weather w Gallery Y Global Awareness Image Landsat B More Data SIO NOAA US Navy NGA GEBCO Image IBCAO Google earth Tour Guide Fig 3 2 2 The MODIS tile system viewed with Google Earth You can use a KML file freely available for download from Oak Ridge National Laboratory Dis tributed Active Archive Center ORNL DAAC to check MODIS tile numbers You can find the KML file download link at http daac ornl gov MODIS Fig 3 2 3 36 e gt de Earth Data Sat DAA daac ornl gov MODIS Biogeochemical Dynamics home signin MODIS Land Product Subsets Overview The goal of the MODIS Land Product Subsets project is to provide s
77. ar s data gt previous next 96 day s data 2 previous next 96 day s data gt previous next year s data 19 L ANA 1 oi Select image data of the same year to use for interpolation 1 use previous 48 days only 2 use next 48 days only 3 use both 48 days 146 Your answer Target year 2012 Interpolation order previous next year s data gt previous next 48 day s data Image data to use use both 48 days Now it s ready to process Execute y n y Error message If you input the wrong year as a target year the script won t run and will return an error message In that case you ll need to restart the process ERROR ERROR no image layers of target year 1999 was found If you input the wrong interpolation option you simply need to rerun the script Invalid input 147 modis_fillnulls sh Description Removes any null cells that remain after executing the modis_remove_cloud sh script This script overwrites output data from modis_remove_cloud sh and creates backup data using the prefix old Syntax modis_fillnulls sh _ year 2008 Example gt sh modis_fillnulls sh 2008 Error message If you enter the wrong year youll need to rerun the script using the correct year ERROR ERROR no image layers of target year 1999 was found 148 e landsat_interpolate sh Description Interpolates cloud covered areas using the quality assessment
78. ation models and then integrate predicted results to achieve higher estimation accuracy 1 Creating sub regions First you need to set up multiple sub regions within your target area You will use these sub regions to define Seed groups You should choose sub regions that have similar NDVI values and locate them near but not touching each other Fig A 1 1 If you prepare your sub region polygons as shapefiles you need to prepare the group numbers as integers 1n the attribute table First you need to import the shapefiles into GRASS and create a raster map based from the imported group layer In the following statement we assume that the sub region shapefile was imported as group map and it has a column id to store group ids gt v to rast input group output group_rast use attr column id Notes You can t use the supervised classification results to set up these sub regions be cause you will use the classification data as input parameters for Cubist s simulation training data 127 Fig A 1 1 Creating sub regions within an area with defined tree cover raster data 2 Executing the modis_extract_dn sh by masking the sub regions You are going to execute the modis_extract_dn sh by masking one sub region from the areas you created in the last step You need to repeat the same process by changing a masked sub region un til you mask all sub regions r mask o input group_rast maskcats 1 sh modis ext
79. band and other images you downloaded An algorithm used in this script is same as the modis_remove_cloud sh script Syntax landsat_interpolate sh Example gt sh landsat_interpolate sh 149 3 Creating land cover maps 3 1 Calculating indexes by pixel e modis calc _index sh Description Calculates NDVI NDSI and SI values for the chosen scene in the specified year Syntax modis_calc_index sh_ year 2008 Output ndvi NDVI image _ndsi NDSI image _ si SI image Example gt sh modis calc _index sh 2008 Error message If you enter the wrong year as the target year youll need to restart the script using the correct year ERROR ERROR no images of 1999 was found 150 e modis_expand sh Description Expands raster values between 0 and 10 000 to match input values to MOIDS band value ranges Syntax modis_expand_index sh Outputs ndvi NDVI image ndsi NDSI image si Slimage expand_interp_ MCD43B4 A2012249_ndsi expand_interp_MCD43B4 A2012249_ndvi expand_interp_MCD43B4 A2012249 si Example gt sh modis_expand_index sh 151 3 2 Verifying training areas e modis_import_kml sh Description Imports training data created using Google Earth as a GRASS vector layer Syntax modis_import_kml sh_ training area KML _ GRASS vector name Example gt sh modis_import_kml sh training_area kml training_area E
80. bining the Prediction Images and Creating a Tree Cover Image Since the modis_import_result sh creates a tree cover prediction raster for each model we need to combine these results to create a final product Execute the modis_integrate_result sh as fol lows Syntax modis_integrate_result sh Example gt sh modis_integrate_result sh Output raster result_tree_cover_dep This command creates a raster layer called result_tree_cover_dep This raster shows percent of tree cover as integer values ranging from 0 to 100 that you can display in the GRASS Map Display 103 window If you don t see an image in the display window after you add the results change its color table r h GRASS GIS Map Display 1 Location Japan_LatLon freon a a ae ae ae Fe Amaia Ee BE O N S50 iB Hc la Dm x See e r w 139 38 09 03E 37 15 46 03N Coordinates v MASK V Render Fig 5 5 1 Combined percent of tree cover images If you are not satisfied with your results you can try a different prediction algorithm called Seed We summarized the steps to use Seed in Appendix A 1 You also can to visit the Seed C5 0 website http www rulequest com see5 info html for more details about the Seed processes 5 6 Matching Spatial Resolution to Fit the Global Map Standard The standard special resolution used in the Global Map project is 30 seconds So we next need to resample the result_tree_cover_dep raster
81. cannot open file Junk for reading No such file or directory If you mistype the tree file name you ll need to rerun the script using the correct name 169 4 5 Integrating results e modis_integrate_result sh Description Integrates the results leaf node from modis_import_result sh Syntax modis_integrate_result sh Output result_tree_cover_dep Example gt sh modis_integrate_result sh 170 4 6 Evaluating verification point accuracy e modis_check_accuracy sh Description Exports calculated percent tree cover and training data verification points as a CSV formatted files Syntax modis_ check _accuracy sh _ true value raster _ output file csv _ the number of points Example gt sh modis_check_accuracy sh treecover2000 check_accuracy 200 Error message Error message ERROR Raster map lt treecover20 gt not found WARNING The combination of types is not supported by all formats WARNING No lines found but requested to be exported Will skip this geometry type WARNING No areas found but requested to be exported Will skip this geometry type Exported table lt check_acc csv gt If you input the wrong true value raster youll need to rerun the script using the correct raster name 171
82. cccceccecceeeceuseucescescesseeseeseeseeseuss 118 INGIVICUE PYOCCSSCS sunan eaen ar a ENE UE A i ia 120 SONAE EEEO a E O ETE NTO OEO 125 APPONI sine T a O eet 127 A 1 Developing a Tree Cover Map with See5 Cubist cc ccccccceccecsesceseesesceeseeseeseeesenees 127 1s Creatine SUD Tec ons raceri a a ed engines ae TE E ata eae E T wade acai 127 2 Executing the modis_extract_dn sh by masking the sub regions cccceceeceeeeeee es 128 DOL CALINIG Tandon PON US aisssaasciss calou te scaescne tesserae ntacadies intaets teontoaeaiaostue lau ebceascesaoaeenS 128 4 Adding attribute fields to the random point Map ccccecc ccc eeccscceceesceseeceeceseeseeseeesuees 129 D EAPO INSE CNS CAD l Oo seca teaacg sartd veh na seo idee rose Aleta E S A A 130 6 Editing the data and names files 0 snseneesesensesesesessesesessesesesseseseeseseseeseseseseesesesseseses 131 l BRCCUlINe SECO and CUDISE sacetionaumsawdanthateaeieiouetademsacadoisia ANET O 182 Sn portine Calctilaled result Serran a E E eaten ams 132 9 Importing calculated results from Cubist eesesessesesessesesesesseseseesesensesesessesesesesseseses 183 10 Tnitesratine results yr OU Dvsiuncssesdevessvsewponddevodnsaeddoansad EEEE E EE 135 ACD Pronran TEITE CES oain sank N E aT a a a ae Nee 136 Kinroduc oere a NAE EAT TOO NE EE EAO OAOA 136 Dy de Re VOC OSS NO enaa a a A N 137 Ds Cretinos land cover 1a 0S arara E E oivewune T aces ie 150 A Calcu
83. d covered areas we will evaluate weighted average raster values using images taken either 48 days before and after the date image was taken total 96 days or images taken on the same date during the previous and subsequent years This process is little bit complicated so we will explain this process using an example Let s say you want to run the modis_remove_cloud sh script for the year 2012 Once you run the modis_remove_cloud sh type 2012 to specify your target year and hit return This command is interactive and so the program will next ask you in what order it should choose images for filling the cloud covered areas search order option You can choose from two methods The first method will use images from the previous and subsequent years to fill cloud covered areas first and use the images taken in the previous and subsequent ninety six days 1f there are still cloud covered areas On the other hand the second method uses images taken in the previous and subsequent ninety six days first and then uses the previous and subsequent years images next After you choose the first option select the next option to choose the data you are going to use data option You can chose 1 use only images from the previous forty eight days 2 use only images from the 52 subsequent forty eight days or 3 use images from both previous and subsequent forty eight days to fill cloud covered areas Before you start processing data you will
84. der Status link Data Usage Survey We are collecting information on data usage This is a voluntary survey What will be the primary use of the produch service Education Scientific research Business Personal Legal Other Submit Fig 3 10 7 Order confirmation page Once you obtain a series of VIIRS images you can automate image processing just like we did with Landsat images Again you will need to store all the downloaded images in the same folder to automate the data import process For this exercise we are going to create a viirs folder under the DATA GSI_MODIS directory You will use the viirs_import sh script to import VIIRS images First you need to copy the vlirs_import sh script to the directory where you stored the VIIRS images Then you can run the script from the same directory You can automatically import all images you stored in the folder with this script Syntax vlirs_import sh Example cd c DATA GSI_ MODIS cp viirs_import sh viirs cd viirs sh viirs_import sh 66 You can only import the radiance data from the downloaded hdf5 data file The viirs_import sh will not convert the original digital numbers DN during the importing process Once you have imported all VIIRS images into GRASS you can run the viirs_merge sh to merge images for each band This script merges images that were taken on same date but in dif ferent paths and rows You need to include both band 1 and band 2 ima
85. download sh accepts the following arguments Syntax modis_download sh t tile number s r xmin ymin xmax ymax e mail address tile product name year start date end date save path Notes e You cannot use the t and r options at the same time e You can download multiple tiles in one process by specifying tile numbers us ing acomma as a separator e You can specify the spatial extent of images you download by the r option with the 4 boundary coordination You need to specify latitude and longitude as decimal degrees 3O7 The following statement downloads MCD43B4 005 products that cover all of Japan tile codes of h28v04 h28v05 and h29v05 between September 1 and October 31 2012 Example 1 tile option gt sh modis_download sh t h28v04 h28v05 h29v05 sample orkney co jp MCD43B4 005 2012 09 01 10 31 c DATA GSI_MODIS MCD43B4 Download file name examples e MCD438B4 A2011249 h28v04 005 2011266182944 hdf e MCD438B4 A2011249 h28v05 005 2011266184219 hdf e MCD48B4 A2011249 h29v05 005 2011266184810 hdf Example 2 range option gt sh modis_download sh r 138 5 35 2 140 5 36 7 sample orkney co jp MCD43B4 005 2012 09 01 10 31 C DATA GSI MODIS MCD43B4 After running the above command the image download process will start and specified MODIS products will be stored in the directory you originally identified Fig 3 3 2 You may encounter a python error during the download
86. e Color View Altitude Add link Add image Fig 4 1 5 A new Polygon dialog box in Google Earth Table 4 1 1 Land cover code Global Map Specifications version 1 8 http www iscgm org cgi bin fswiki wiki cgi page Documentation 3 Needleleaf Evergreen Forest 4 Needleleaf Deciduous Forest 8 Herbaceous single layer 9 Herbaceous with Sparse and Tree Shrub 70 10 Sparse Vegetation 20 Water Bodies Now you can draw a polygon that represents a pure land cover You should encompass large areas if possible If the polygon areas are too small they are sometimes ignored when you import those polygons into GRASS After you finish drawing click OK and continue the same process for different land cover types or areas Fig 4 1 6 You should obtain several polygons for each LC type Pe all 7 m Seay 8 Groop ot 5 zo BPs 2F TEFIE SET Fig 4 1 6 Drawing training polygons using Google Earth Once you finish creating training polygons for the image classification in Google Earth you need to save the polygons as KML files To create a KML file right click on the training_area fold er and select the Save Places As option You can choose any name for the KML file but for purposes of this exercise we will name the file training_area km1 In the following section we will import the training data you created into GRASS 71 iia Sitar Gu di Computer F
87. e Maximum Likelihood Classifier 1 You can narrow your map search criteria by using g mlist If you want to learn more about setting search patterns visit http grass osgeo org grass64 manuals g mlist html 78 For the maximum likelihood method you need to create a signature file that summarizes rela tionships between each land cover type and each band value in the grouped images Select Image ry gt Classify image gt Input for supervised MLC in the GRASS Layer Manager to create a signature file Fig 4 5 1 face fal a GRASS GB Map Disptay 1 Location Japan_Latlen_GM ctor Eragery Volumes Ostabase Help n F SSS ee a ee a Eee se erence pom Sart ice a evelop image and groups b Klanage miig colon b Dho phete rechheahen meo em verthe shes E Est Rectity image or raster irectify Hatogram Spectral reponse Lapectral Bepa tharpereng fuer breve Classdy image j Chustenng input for unsupervised classification ichuster Filter image b T 3 pitas SA himmen likelihood classe aan MLC i k omelise anigi tooi A Pteractre miput for pupersded clape pien egne Stern ieia Satelite knagts products input for aapenised SAAP i qencegset Report snd statistics b Sequential medmam s posteron classification MAF imap Fig 4 5 1 1 gensig menu Then the following i gensig dialog box will be displayed Fig 4 5 2 Ground truth training map training_area Mopbis
88. e files at some point There is no automated file management function in this program so you must manually manage your map data in GRASS The most efficient way to delete multiple files is to use the g mremove command This command allows you to filter maps using a wild card or a regular expression and delete them at once For example if you want to delete all maps that have old_ at the beginning of the map names you can type old_ in the rast file s to be removed column in the g mremove command window Fig 3 6 1 You can find the g mremove command in the File menu Manage maps and volumes Delete filtered g mremove You need to check the Force removal required for actual deletion of files option for the actual file removal Without this option this command only returns map names that match the condition you specified The g remove command 1s also the best tool to delete single or multiple maps that are difficult to select by a wild card or regular expression 44 g mremove general map management v Removes data base element files from the user s current mapset Optional Command output Manual Use basic regular expressions instead of wildcards Use extended regular expressions instead of wildcards Remove base maps Verbose module output Quiet module output multiple rast file s to be removed multiple rast3d file s to be removed multiple vect file s to be removed multiple oldvect
89. e to My Places WC 3 Q m saaal Se Plat A a Past to Google Earth Community Forum v Layers Eads 4 Og Primary D aa P Borders Snapshot View J El Places Sort A Z Photos l EE Roads Properties d 3D Buildings Fig 4 9 4 Overwrite the all_class kml file by selecting the Save Place As command In addition to the process we just described you can prepare your verification data from various data sources If you want to prepare your verification data as polygon data you can use Google Earth and create a series of polygons encompassing pure land cover areas This is the same pro cess described in the training data preparation process 1n 4 1 You can also prepare the verification data as points instead of polygons However you cannot store polygons and points in a same KML file 4 10 Evaluating a Classification Accuracy using Verification Data The modis_check_classificaton sh uses verification data to create an error matrix as well asa KML point file to examine locations of your verification points You need to prepare a true land cover polygon or point layer that represents actual land cover types for this process You already created independent test data to evaluate classification accuracy in section 4 9 Since the modis_check_classification sh takes shapefiles as test data you need to convert your KML test data into shapefile format If you prepared your test data as shapefiles you can skip this step 93 You can
90. elow and install the missing DLLS http grasswiki osgeo org wiki WinGRASS errors e You also can install the Runtime DLLS through the GRASS installation process So another option is to remove the GRASS program you already installed and reinstall GRASS Don t forget to check the option Important Microsoft Runtime DLLO to install the required DLLS 7 Icould not use a Python command to install pyModis e You may not have set your Python path correctly You can use the OSGeo4W shell for the pyModis installation since this shell environment is ready to use the instal lation command 8 What are some convenient shell commands I can use to process data e Confirming environment settings All parameters gt env A specific parameter gt echo variable name e Confirming your current directory pwd e Moving your current directory e g move to the GSI_MODIS ed ce DATA GSI_MODIS e Copying a file e g move modis_merge sh to the GSI_MODIS MCD43B4 assuming your current directory is ce DATA GSI_ MODIS cp modis_merge sh MCD438B4 e Creating a directory e g create the directory MCD43B4 assuming you are in c DATA GSI_MODIS mkdir ce DATA GSI_MODIS MCD43B4 9 I want to know about the data size of satellite images e Data sizes vary depending of the number of bands and area coverage These de scriptions are of file sizes before extracting compressed files MODIS 1 tile 300 900 KB Landsat 1 tile 800 M
91. erge and separate images you need to first copy the modis_merge sh script to your working directory MCD438B4 Since modis_merge sh removes all directories under the cur rent directory you need to make sure that you run this script only in a working directory such as MCD43B4 We also recommend checking if the product settings in the modis_setenv txt match the downloaded files in this case MCD43B4 and MCD43B2 files in the directory In the data directory you should only have data you specified in the modis_setenv txt As this software may have an unexpected behavior with regard to the extent of merging the im age we recommend you to enter xmin ymin xmax and ymax Syntax modis_merge sh optional xmin_ ymin _ xmax _ ymax 39 Example gt cp modis_merge sh MCD43B4 gt cd MCD43B4 gt sh modis_merge sh Output filename examples MCD438B4 A2012249 band1_prj tif MCD438B4 A2012249 band2_prj tif e MCD43B4 A2012249 band3 _prj tif After the process is completed you will have a series of GeoTIFF files that hold reprojected merged and band separated image data for the series of dates you originally specified 3 5 Importing GeoTIFF Images into GRASS In the following step you will import the GeoTIFF files you created in the last process into GRASS GIS You will use modis_import sh to do this modis_import sh should be executed in the directory where you previously downloaded the MODIS data Type the f
92. eric training_area MODIS Class Name for output raster map output name Name of color definition column with RRR GGG BBB entries training_areal i Source of raster values use string Name of column used as raster category labels attr Y en Run Add created map s into layer tree Add created map s into layer tree E Close dialog on finish E Close dialog on finish v to rast input training_area MODIS output training_area use attr v to rast input t_area MODIS output t_area use attr column Class 73 Fig 4 2 2 v to rast dialog box left Required tab and right Attributes tab Parameter settings for v to rast Required tab input vector name training_area MODIS output raster name tralning_area raster value souce attr Attributes tab column name for the land cover attributes Class 4 3 Calculating Various Indices In this section we are going to calculate the NDVI Normalized Difference Vegetation Index NDSI Normalized Difference Soil Index and SI Shadow Index of the MODIS images these are index images you may wish to use in the classification processes we will work on later The formu la for each index is shown below BAND BAND BAND BAND BAND BAND BAND BAND NDVivepis NDS Iwon 1 0 0 0001 x BAND x 1 0 0 0001 x BAND x 1 0 0 0001 x BAND Stuapis You can calculate NDVI NDSI and SI using only one command You can execute
93. file s to be removed multiple ascivect file s to be removed Fig 3 6 1 g mremove command for a multiple map deletion It is often convenient if you can overwrite existing maps during your data analysis GRASS pro vides the Allow output files to overwrite existing files option for many commands If a command 44 has this option you can reduce intermediate maps when you want to repeat the same analysis with different parameter settings If a command or script does not allow you to overwrite existing maps you need to be sure to change output map names to avoid runtime errors 3 7 Limiting Analysis Extent with a Mask You can limit your analysis extent using a mask layer A masking technique not only makes your process more efficient but 1t also makes your process faster You can easily create your own mask from existing GIS data from the Global Map project We will download the political boundary area data vector data and create a mask to include only the land portion of Japan Fig 3 7 1 GRASS GIS Map Display 1 Location Japan Lation l AGE GRASS GIS Map Dispine 1 Location lapen LatLon Se es aes i a ee iA st a a 2 5 da sd oe LE z epr Bp PP Sete E So lo Dre Fig 3 7 1 Before left and after right applying a mask You can download the political boundary area data for various countries from the International Steering Committee for Global Mapping s ISCGM website http www iscgm org
94. format CSV 6 Editing the data and names files NULL values cause errors in the later analysis so you need to make sure that you don t have any NULL values in the CSV file you exported If you include the ocean in your analysis extent you may have NULL values After removing all NULL values create a names file You need to use the raster map names you included in the CSV file in the names file After removing the first line column header in the CSV file save it as a text file with data as the extension Seed data sample 1 2 183 200882 2962 58374 1646 613037 426 199829 2764 363525 2046 282837 1201 314819 0 207815 0 216763 0 216763 2 3 477 666656 3210 333252 340 666656 683 2881 333252 1911 333374 961 0 283693 0 352062 0 352062 3 3 458 333344 2870 333252 430 333344 605 333313 2638 333252 1886 333374 1161 666626 0 251976 0 320031 0 320031 4 2 710 666687 3500 666748 587 666687 930 666687 3100 666748 2112 666748 952 333313 0 259044 0 26753 0 26753 5 2 094 3350 666748 548 839 333313 2808 2041 666626 1032 333374 0 246914 0 273202 0 273202 6 2 588 3177 847 763 333313 2598 2044 333374 1067 0 237923 0 216487 0 216487 Seed names sample eroup cat label group 1 2 3 agg _band1 continuous agg _band2 continuous agg_band3 continuous agg _band4 continuous agg_band5 continuous agg_band6 continuous agg _band7 continuous agg ndsimin continuous agg ndviave continuous
95. ges in the imported data since this script uses those bands to calculate NDVI to select the better quality pixels from images that overlap each other Syntax vlirs_merge sh Example gt sh viirs_merge sh 67 4 Creating a Land Cover Map In this chapter we will develop a land cover LC map using a supervised classification either a maximum likelihood or a decision tree method with the MOIDS images you imported in the last chapter 4 1 Acquiring Training Data for Your Image Classification If you don t already have your own training data for use in creating a LC map you can generate training data using software such as Google Earth First start Google Earth and zoom to an area you are interested in Laver ZF tes 1D he ER feos we BO 0w D rer Gate vue D Me Fig 4 4 1 Google Earth startup screen Next make a new folder to store all your training area polygons To make a new folder you need to select Folder under the Add menu as shown in Fig 4 1 2 You may name the folder training_area Fig 4 1 3 68 Google Earth File Edit View Tools Help Y Search Placemark Ctrl Shift P ex Restaurants Path Ctrl Shift T Get Directions i Polygon Ctrl Shift G v Places Model Ctrl Shift M 4 V amp My Places Tour 4 VI Sightseeing Tour Make sure 3D Photo Buildings VE Start tour here The Eiffel Tower Image Overlay Ctrl Shift
96. greptocs t compiles and nms on a wide veety of LUNIN plaiforms The F Jounal Windows and MacQS To download K please choose your preferred CRAN minor Wiki jf veo have questions about R ike how to download and install the software or what the Gcense terms we please read our answers fo Books frequently asked quesicos before you send am emal Certicanon 3 R version 3 0 2 Frvhee Sabng has been relented on 2013 03 25 a Se eee ee ee ee ee ee Fig 2 5 1 R project home page To download the R installer click CRAN on the left frame Fig 2 5 1 In the next download page Fig 2 5 2 you will see a list of mirror sites you can download Choose a mirror site close to where you are physically located and proceed with the installation process highlighted links in Fig 2 5 2 show mirror sites located in Japan 18 L The R Project for Statistical Comput F e maroto cjS r l _ ne hap cran repo bpp go kt Agency for The Application and Assessment of Technology hetp cran um ac Ferdowsi University of Mashhad Ireland z hirre HEAnet Dublin neat E Italy What is R Screenshots http cram stat mpd it University of Padua What s new hip sea it Unrversita degi Stock di Palamo Download Packages R Project Foundation Members amp Donors Mailing Liste NexR Corporation Seoul Bug Tracking Chung Ang University Seoul Developer Page z Conferences Hows Lebanese American University Byblos
97. gt Jan 18 2014 ERMA Peart Condor Crem racine Martin Landa CTU in Prague onina fed Unstable end experimental but very provewsing GRASS GIS 7 Addens Mantas mv See New Features it usuali works Direct na wiy bases CITIDMCRITY WR BETEL Version fs POE atirantned Oo led with automated conversion fools affects T star rovided by Martin Landa CTU in ug Troubleshooting If the program exits immediately after you start it or it complains about a missing MSVECRTI dU MSCVPIOD dli or similar on startup you may meed founrstall Microsoft s MET Cromewok See also WuGRasS errors and their solution OSGeo4W Installer with pkg grass package Detais For Windows XP through Windows amp both 32 and 64 bit This installer offers many more choices smor if includes the ability fo install many other Free GIS software packages and libraries such as Quant GIS GOAL foals MapServer OpenEw wang and mara Fig 2 2 2 GRASS download page 5 You can then download the GRASS installer for Windows by clicking the WinGRASS 6 4 3 1 Setup exe link in the download menu Fig 2 2 3 ee merar Sf Index of grass64 binary mswindow mm gt grass osgeo org grass64 binary mswindows native yy B Google P D Index of grass64 binary mswindows native Name Last modified Size Description o Parent Directory WinGRASS 6 4 3 1 Setup exe md5sum 29 Jul 2013 22 38 61 WinGRASS 6 4 2 2 Setup exe md5sum 0
98. he import vector data dialog is displayed Select training_area shp as the File field and click Import Fig 3 Settings gg Source type File Directory Database Protocol Source File C DATA training_area shp Format List of OGR layers Layerid Layer name Name for GRASS map editable 1 training_area shp training_area Do not dean polygons not recommended region extents based on new dataset Override dataset projection use location s projection Limit import to the current region Do not create attribute table Change column names to lowercase characters Create 3D output F Allow output files to overwrite existing files V Add imported layers into layer tree Fig 3 Import vector data dialog Supervised classification with GRASS requires the training area data be in raster format To convert vector training data to raster format select File gt Map type conversion gt vector to raster v to rast on the GRASS Layer Manager Fig 4 123 File Settings Raster Vector Imagery Volumes Workspace Map display Import raster data Import vector data Import 3D raster data Import database table Export raster map Export vector map Export 3D raster maps Export database table Link external formats Manage maps and volumes Map type conversions boba a GRASS GIS Map Display patentee lw R kar Ea b e lo e gt Raster to vect
99. he r random command Export the vector point map you just created as a KML file You can use the v out ogr command for the exporting task 110 Y v out ogr vector export F E lt v out ogr vector export o 0 Fx Y Y Converts GRASS vector map to one of the supported OGR vector formats Input Creation Optional Command output Creation Optional Command output Required Name of input vector map OGR layer name If not specified input name is used olayer string randomS0v MODIS For example ESRI Shapefile shape OGR output datasource name dsn string OGR format Oriat stina c data asi_modis random50v kml KML v multiple OGR dataset creation option format specific NAME VALUE dsco string multiple OGR layer creation option format specific NAME VALUE Ico string cose run coy J Hep cose rn J cov J tee v out ogr input random50v MODIS type point dsn c data gsi_modis random50v kml f v out ogr input random50v MODIS type point dsn c data gsi_modis random50v kml f Fig 5 8 3 Using the v out ogr command to export random vector points as a KML file Example Required tab Name of input vector map random50v MODIS OGR output datasource name c data gsi_modis random50v kml Input tab Point check only point option and deselect others Creation tab OGR format KML Start Google Earth and load the KML file you just created You can examine you
100. ication How I can use these data as training data e First we assume your ground truth shapefile are structured as training_area shp and include a column that stores LC codes The LC codes should be stored as an in teger in a column called landcover After opening training_area shp on QGIS right click on the layer name and select Open attribute table from the menu Fig 1 to see if you data are formatted correctly T Gaited Pohon L J Untitled Pedpgen 12 Fig 1 Attribute table e Importing training area Next import the training data shapefile into GRASS On the GRASS Layer Manager select File gt Import Vector data gt Common import formats v in ogr Fig 2 122 5RASS GIS Layer Manager s GRASS GIS Map Display 1 Location Japa Settings Raster Vector Imagery Volumes E Cw Ce aR SS ety D a imi a Workspace Map display Import raster data gt Import vector data gt Common import ae v in ogr Se ASCI points GRASS ASCII vector import v in ascii cee aa ae 4 ASCI points as a vector lines v in lines Export raster map gt Historical GRASS vector import v convert Export vector map b Historical GRASS vector import all maps v convert all PORA E O DXF import v in dxf Export database table gt WFS v in wfs Link external formats gt ESRI e00 import v in e00 Manane mans and volumes gt Fig 2 Selecting v in ogr from the menu T
101. inish Fig 5 7 2 Import raster data dialog Input parameters Layer name Landcover_EA tif Name for GRASS map Landcover_EA To create the mask raster with GRASS you need to assign a null value to the code that repre sents open water in the GLCNMO data According to the metadata water areas have a code value of 20 You can use the Map Calculator in GRASS to assign null to all values of 20 and leave other values as they are You will find the Map Calculator under Raster gt Raster map calculator r mapcalc in the GRASS layer manager Fig 5 7 3 106 a a e D il d i GRASS BIS yet C Aaa D x File Settings Raster Vector Imagery Volumes Database Help ji Develop raster map el g Manage colors b J ES E Query raster maps oo Display 1 Map type conversions ie Buffer rasters r butter Concentric circles rocirche Closest points rdistance Mask rma Neighborhood anabyses Overlay rasters t Fig 5 7 3 Raster map calculator menu Once the Map Calculator opens Fig 5 7 4 type the following formula in the Expression field if Landcover_EA 20 null Landcover_EA You also need to specify an output file name in the Name for new raster map to create field Operands water_areal m Insert mapcalc function EEE eee cee I gt e Pain aa Expression if Landcover_EA 20 null Landcover_EA Add created raster map int
102. ion tree model based on names and data files created by the modis_classify_dtree sh script Syntax c5 0 exe f file base name Output LC_JP_DT model Example Sub OUa eX Ff LC 2JP DT 155 e modis_import_Seed sh Description Analyzes Seed output and creates tree cover raster data Syntax modis import _See5 sh _ input file tree _ output layer Output LC JP_DT Example gt sh modis_import_See5 sh LC_JP_DT tree LC_JP_DT Error message awk parsetree awk 4 fatal cannot open file Junk for reading No such file or directory If you mistype the tree file name you ll need to rerun the script using the correct name 156 3 4 Creating random verification points e modis_verify_points sh Description Creates random points used to evaluate the accuracy of classification results The total number of points equals the number of classification classes number specified in the 2nd argument Syntax modis_verify_points sh _ classified image name _ number of points Output verify_points_class_ classnumber Vector point by each class Example gt sh modis_verify_points sh LC_Japan_reclass 1000 157 3 5 Evaluating the verification point accuracy e modis_export_kml sh Description Exports verification points created from modis_verify_points sh as rectangle KML poly gons The rectangle size depends on your region setting in GRASS
103. ironmental set tings using the source command in MYSIS your environmental settings will be updated If you want to analyze MODIS data again you need to load modis_setenv txt again 3 edit the following variables 5 export OSGEO4W_ PATH c O0SGeo4W You ma yn eed 6 export R BIN c Progra 1 R R 3 0 2 bin x64 R exe 7 export RSC BIN c Progra 1 R R 3 0 2 bin x64 Rscript exe to C h an g th ese 53 export QC NAME MCD43B2 M T Landsat 10 export COLLECTION 005 product name 13 There is nothing to edit below this line normally 15 export PATH 05GEO4W PATH bin PATH 16 export PYTHONHOME O5GEO04W_ PATH apps Python27 17 export GDAL DATA OSGEO04W_ PATH share gdal 16 export MODIS DOWNLOAD PY O05GE04W_PATH apps Python27 Scripts modis download py Fig 3 9 6 Landsat_setenv txt and its contents A command to load the environment settings cd AOU ADY W ACE MODIS cp landsat_setenv txt landsat cd landsat source landsat_setenv txt You will use the landsat_import sh script to import Landsat images First you need to copy the landsat_import sh script to the directory where you stored the Landsat images Then you can run the script from that same directory You can automatically import all images you stored in the folder with this script Syntax Landsat_import sh Example cd c DATA GSI_ MODIS cp landsat_import sh landsat ore mary tandsat sh landsat_import
104. irst to create index layers 162 If you mistype the data analysis year youll need to rerun the script and correctly indicate the year of the data you want to analyze 163 4 2 Creating simulation training data e modis extract_dn sh Description This script generates random points in the current region and assigns values from each band NDVI NDSI and SI images Syntax modis_extract_dn sh _ training area _ classification result _ output file _ number of points Output example cat ptc c1 c2 c3 c4 c5 c6 c 7 c8 c9 8 60 372 1817 229 389 1888 1151 603 0 494805 0 2589 9 0 574 1786 432 588 1994 1414 883 0 412587 0 152941 Example gt sh modis_extract_dn sh Veg_percent GM_Japan veg_training 100 Error message ERROR ERROR veg_training output filename must have csv extension If you forget to add the CSV extension to your output file name you ll need to add the ex tension and rerun the script 164 ERROR Raster map lt Veg_percent gt not found ERROR ERROR error occured in r random exit If you mistype the raster name as classified data you ll need to input the correct raster name and rerun the script 165 e modis_gen_simulation sh Description Creates Cubist format simulation training data with output from the modis_aggregate_dn sh script Syntax modis_ gen_simulation sh_ input file _ output file _ TREE category
105. isplays GRASS data The MSYS screen bottom allows users to write out commands We will mainly use the MSYS window to type commands throughout this exercise l GRASS GIS Layer Manager Fig 3 1 11 GRASS start up windows 3 2 Setting the Environment Variables Used for Executing Scripts The script execution environment should be set up by installing the Global Map Raster Devel opment Tool Create a C DATA GSI_ MODIS directory if you use USB connected HDD create a directory such as F DATA GSI MODIS instead then copy all packaged files in the scripts to the created directory Please note that not the scripts directory but only files in the directory should be copied The installation of the programs is all completed After that you need to set the environment variables before executing image analysis com mands The following steps will explain how to set parameters such as the R directory and MODIS product names First you need to open the modis_setenv txt file with the text editor and modify each line to reflect your computer environment For example if you installed R version 3 0 3 in stead of version 3 0 2 you need to reflect the version difference in the R_BIN and RSC_BIN set tings You also need to specify the MODIS product information you are going to use For the 1 km resolution MODIS images use MCD48B4 as the PRODUCT_NAME and MCD48B2 as the QC_NAME settings For the 500 m resolution images
106. k in HTML administrator a Ohloh statistics ie E if you need to update your oymedis version you have to run Welcome to pyhodis pip install upgrade podis pyModis Scripts WIth pip itis also really simple to remove the library pip uninstall pytadis Quick search Go Compile from source Compile prod is is very simple First you need to download podis source code fi Enter search tens of a module class or tumcthon mame Download the documentation git clone hetpei spithub con lucadelu pyModis git in pat format You can wee gil to download the latest code with the whole history and so it contain versions from the last to the first or download the lates stable wersion fram the repository and decompress iL How enter the sysedic folder and launch as administrator of your computer Pythen setup py install if the installation doesn t return any errors you should be able to use pyModis library from a Python console Fig 2 4 2 The red circle shows the hyperlink to the pyModis repository 16 If you have already installed git client you can access the pyModis source code using the git clone command Otherwise click the Download ZIP button Fig 2 4 3 and download the source code as a zip file Sess J lucadelu pyModis GitHub gt GitHub Inc US https github com lucadelu pyModis EJ pymodis P A Br GitHub This repository Explore Features Enterprise Blog
107. lating Percent tree covet sicse5 scowieahaensnes 0a ia a a A E T E Wola 162 1 Introduction 1 1 Abstract This Manual is designed to assist you in developing land cover and percent tree cover layers us ing satellite images It includes detailed explanations that will allow you to create Global Map products using satellite images collected by the Moderate Resolution Imaging Spectroradiometer MODIS mounted on the Terra and Aqua satellites Landsat8 and the Visible Infrared Imaging Radiometer Suite VIIRS mounted on the Suomi National Polar orbiting Partnership Suomi NPP satellite The following chapters include instructions on how to e Obtain and install open source desktop GIS software Chapter 2 e Download and preprocess data for image analysis Chapter 3 e Develop land cover data using satellite images Chapter 4 e Develop percent tree cover layers using the land cover data and satellite images Chapter 5 e Find reference documents and analysis tips Chapter 6 You will run various shell scripts for the above processes You can find all the scripts you will use 1n the script folder of the CD ROM provided with this Manual We assume users of this Manual are already familiar with basic satellite image analysis as well as data handling with geo graphic information system GIS software 1 2 Requirements This Manual is designed for people who have basic knowledge and skills in the following fields e Geographic coordinate
108. luding manually specifying spatial reference parame ters borrowing a reference definition from existing georeferenced data and other methods For purposes of this exercise we will define our spatial reference system by selecting an EPSG code Select the option titled Select EPSG code of spatial reference system and press the Next button In the next dialog box we are going to select an EPSG code from a list Fig 3 1 5 Define new GRASS Location i L Choose EPSG Code Path to the EPSG codes file Files x86 GRASS 6 4 2 proj epsg EPSG code Q 4326 Parameters proj longlat ellps WGS84 Fig 3 1 5 Location wizard to specify EPSG code Since we will use WGS84 as our spatial reference system for data analysis you need to specify 4326 which is the EPSG code for WGS84 As shown in Figure 3 1 5 you can type the code number in the search box and then select the row listing 4326 in the selection box After you highlight the 4326 row click the Next button to continue the setup process You may encounter the Select datum transformation dialog box Fig 3 1 6 Accept the default setting option 1 and click OK to finish the installation process Select datum transformation Select from list of datum transformations Do not apply any datum transformations 1 Used in whole wqs84 region towgs84 0 000 0 000 0 000 Default 3 Parameter Transformation May not be optimum for older datums use
109. m itself in this Manual If you want to learn about Cubist visit http www rulequest com cubist win html Syntax cubist exe f model file name without extension Example gt cubist exe f rep2 Notes This execute file requires data and names files Output file name example rep2 model The above command creates a model file in our case rep2 model that we will use next to es timate tree coverage Fig 5 3 1 uf C DATA GSI_MODIS rep2 model Notepad File Edit Search View Encoding Language Settings Macro Run Plugins Window X TE Del DD dd el Bal 1 ale Dz avay SSS E modis integrate _resultsh rep2 model id Cubist 2 07 GPL Edition 2012 06 18 2 prec 0 globalmean 9 975437 extrap 0 1 insts 0 ceiling 21 9 floor 0 att tree cover dep mean 9 9 sd 3 842288 min 1 max 20 att agg ndviave mean 0 42387 sd 0 08868209 min 0 1504 max 0 7858 att agg bandi mean 773 219 sd 266 9767 min 1113 33 max 5362 87 att agg band2 mean 1673 658 sd 233 5826 min 446 67 max 3178 33 att agg band3 mean 421 901 sd 129 8443 min 2477 67 max 1551 67 att agg band4 mean 675 457 sd 204 9917 min 643 67 max 3668 43 att agg bandS mean 1998 533 sd 215 813 min 518 07 max 2949 att agg band6 mean 1736 162 sd 216 8434 min 587 67 max 2375 67 11 att agg_band7 mean 1238 245 sd 223 1898 min 389 max 1847 67 12 at
110. map names gt LIST g mlist e pattern interp A2012249 exclude old expand separator In the above example you will have an image list for one day e g day 249 2012 If you want to analyze the entire data set you download you need to change the pattern setting to pat tern interp A2012 If the LIST variable contains unnecessary data e g temporary data such as old_ it may di minish subsequent land cover classification accuracy Therefore it is always a good habit to dou ble check what images are in the LIST variable with the following command gt echo SLIST Once you make sure your raster list is accurate and up to date you can go ahead and run the 1 group command to create a band group In the following command example the 1 group command receives the name list you created as an input and creates a target image group and a sub sub group GRASS groups imported multiband images as a group and then manages them using subgroup as the actual inputs for the following image classifications You can delete groups cre ated using the 1 group command with the g remove command gt i group group target subgroup sub input SLIST Notes With l or g option you can check which images are included in a subgroup For more details please refer to the official online manual http grass osgeo org grass64 manuals i group html 4 5 2 Classifying Images Using th
111. modis_calc_index sh for a series of images within a specific year in this example the year of 2012 Syntax modis_calc_index sh target year Example T4 gt sh modis_calc_index sh 2012 For each index output raster files will have a suffix as shown below ndvi NDVI image _ndsi NDSI image _si SI image Examples of output layer names e interp MCD43B4 A2012249 ndvi e interp MCD43B4 A2012249 ndsi e interp MCD43B4 A2012249 si You can expand the range of index values NDVI and NDSI range between 1 and 1 and SI ranges 0 and 1 to match the value ranges of other band images 0 10 000 using the modis_expand_index sh command Syntax modis_expand_index sh Example gt sh modis_expand_index sh Output raster names e expand_interp_MCD438B4 A2012249 _ ndsi e expand_interp_ MCD43B4 A2012249 ndvi e expand_interp_MCD48B4 A2012249 si After you execute this command you will have new raster layers that have expand_ as a pre fix We recommend using these expanded index raster data for the maximum likelihood land cover classification You can use either the original values or the expanded values for a decision tree classification We will use the original values for a decision tree classification in this exercise 79 4 4 Verifying Training Data At this point you may want to check to make sure your training data represents well the endmembers of the LC classes You can generate a series of histog
112. mported multiple Landsat images Syntax landsat_apply_qc sh Example gt sh landsat_apply_gqc sh 143 e vurs_import sh Description Imports a VIIRS image h5 file into GRASS The GRASS layer name is the same as the imported h5 file name without its extension Each file name has a band number at the end of the map name in GRASS Syntax viirs_import sh Example gt sh viirs_import sh 144 e vurs_merge sh Description Merges imported VIIRS images Syntax viirs_merge sh Example gt sh viirs_merge sh 145 2 5 Cloud removal modis remove _cloud sh Description Interpolates cloud covered areas using the quality assessment data of MCD43B2 or MCD43A2 for the 500 m resolution and other band images You can choose the order of image use for the interpolation process You can either use images taken on the same date as your image during the previous and subsequent years or images taken ninety six days before and after the day your image was taken Then you need to choose whether you want to use images from only the forty eight days before the date your image was take on ly forty eight days after your image was taken or images from both forty eight days before and after total ninety six days your image was taken Syntax modis_remove_cloud sh Example gt sh modis_remove_cloud sh Specify target year VA0n i2 2012 Choose interpolation order 1 previous next ye
113. name field you need to save the KML file You can use the Save Place As command Fig 4 9 4 and overwrite the all_class kml file Get Directions History Y Places all_class kml a R rtermmp_randam_cell i Save Place As Ep Past ta Google Earth Community Farum Email Adel NODOSA Cut P Copy Delete RRI P P Rename me lh Save ta My Places lea jo F Layers Earth Og Primary Databa Snapshat View p P Boreders arnel i Places F Phatas rc Search oO j gt oot lO Se IDX Gb i as Search ex 15213 Get Directiqns Histo v Places Google Earth Edit Polygon y 4 vie all_class kml Type your LC B 411 rtemp ran Name s t oa ssification call TA w GH peson ie coer vow T astuce 2x se 12 E s O 2 iD F PA 3 32 AO 3 Cun iE v Layers Eart He Primary Datab gt oP Borders and C Places gt E Photos OE Roads p ay 3D Buildings l Ocean x Weather Fig 4 9 3 Inputting a land cover code to verify the classification 92 amp Google Earth File Edit View Tools Add Help z Seach D asle ea a LE Search ex 15213 Get Directions History v Places 4 V all_class kmi Wis rtemy v u V 11 Cut v O il Copy AA ME R Delete ae E Delete Content WO 2 elete Contents wl i 2 Rename WO 1 on Sore Revert WIC 3 ay A v CY 2 Sav
114. nloaded executables Fig 2 5 4 R project download page On the next page you will see a Download R 3 0 2 for Windows hyperlink click the Download R 3 0 2 for Windows link and start downloading the R installer R 3 0 2 win exe Gia aika R Archive Netw e gt gaan aboot A R Homepage The E Journal Sof Tare B Sources R Bina Packages Othes Dace tat Loe Manuals FAQs Contributed nol Aah Geen eran irre i id b e B Ps D R 3 0 2 for Windows 32 64 bit If you want to dowble check that the package you have downloaded exacti matches the package distributed by R yon can compare the midcom ofthe exe to the tme fingerprint Yon wil need a version of mdSsum for windows both graphical and command ine versions ane available Frequently asked questions a How do l install R when using Windows Vista a How do update packages m my previews verson of R a Shoald run 32 bit or 64 bit EF Please see the R EAQ for general information about and the E Windows FAQ for Windews speciie mdleemation other builds a Patebes to this release me incorporated in the r patched snapshot bald A buld of the development verson whech wil eventually become the next major release of Ry is avadable m the devel soapshot buld Previous releases Mote ba to webmasters A stable ink which will redirect to the current Windows binary release is N MIRROR hn amdows bara release Last change 2
115. nreclass raster statistics reclass Creates a new map layer whose category values are based upon a redassification Ww of the categories in an existing raster map layer Command output b overwrite E Allow output files to overwrite existing files verbose E Verbose module output Quiet module output quiet File containing reclass rules rules name C GIS_DATA YGRASS Japan_LatLon MODIS tmp 5388 33 or enter values interactively 1 2 Broadleaf Deciduous Forest 2 3 Needleleaf Evergreen Forest 3 11 Cropland 4 12 Paddy field 5 16 Bare area consolidated gravel rock 6 18 Urban 7 16 Bare area consolidated gravel rock 8 20 Water Bodies Tite for the resulting raster map title string Add created mapie into layer tee E Close dialog on finish nreclass input lt required gt output lt required gt Fig 4 7 3 Example of a reclassification rule 87 Once you set up a reclassification rule in the Optional tab you can run the r reclass command Check the reclassified image before you proceed to the next step 4 8 Resampling Images Before moving to the next step let s change the resulting raster resolution for LC_Japan_reclass to 30 seconds from the original 1 km resolution setting This additional process will allow us to match the spatial resolution of the classified image to the Global Map standard Type the following command on MSYS console to complete this task
116. nstall If you use a 64 bit OS you should use 64 bit software If you don t know what kind of OS you will use it is safer to use 32 bit software Our script runs on both 32 and 64 bit OS environments 3 I know these scripts are for Windows OS but can I use them in Linux or Mac environ ments Possibly We developed our script for a Windows environment so many environmen tal settings are different from Linux and Mac OS The most difficult part would be environment setting for Python If you can make pyModis works on your machine you may be able to make our scripts work You will also need to modify modis_setenv txt to reflect your software environment We know that our scripts don t work when you set a PYTHONPATH variable in a certain Linux distribution 4 J already installed a version of Python different from what you used in this tutorial Will there be conflicts between those Python versions We use various setting files such as modis_setenv txt to specify paths to each pro gram we use So you shouldn t have any version conflicts 5 Can I use a Japanese or another language s user interface in GRASS We recommend using English as a locale It is well known that there are some is sues with the multi lingual environment in GRASS So it is safest to use GRASS in English 6 I could install GRASS but it won t start 118 e You may not have Microsoft Runtime DLLS in your system You can follow the link b
117. o 1 Table polbnda_jpn Attribute data right click to edit manage records cat ff f nam laa pop 2 1 FA001 Hokkai Do Shibetoro Mura 99999999 0 2 FA001 Hokkai Do Wakkanai Shi 41592 2005 3 FA001 Hokkai Do Rebun Cho 3410 2005 4 FA001 Hokkai Do Shana Mura 99999999 0 5 FA001 Hokkai Do Sarufutsu Mura 2940 2005 x 6 FA001 Hokkai Do Toyotomi Cho 4850 2005 2 7 FA001 Hokkai Do Rishirifuji Cho 3239 2005 x x 8 FA001 Hokkai Do Rishiri Cho 2951 2005 a x x 9 FA001 Hokkai Do Hamatonbetsu Cho 4582 2005 10 FA001 Hokkai Do Rubetsu Mura 99999999 0 ai 11 FA001 Hokkai Do Horonobe Cho 2784 2005 12 FA001 Hokkai Do Esashi Cho 9815 2005 t ER 4 m r Coordinates a V Render R b SQL Query x64 3 Simple SELECT FROM polbnda_jpn WHERE cat Apply m Advanced SELECT FROM polbnda_jpn SOL Builder Raq Browse data Manage tables Manage layers Refresh J Quit X Number of loaded records 2924 t name targ Fig 3 7 5 Political boundary polygons and their attribute table the yellow highlighted coc field holds a common attribute across all polygons To dissolve the boundaries use the v dissolve command and a field that contains a common at tribute across the all polygons in this case use the coc field in the boundary data You can find the v dissolve command under the vector menu Fig 3 7 6 IS Layer Manager P o mean G GRASS GIS Map Display 1 Location Japan_LatLon gs Raster Vector Image
118. o layer tree rmapcale waterarea if Landcover_EA 20 nullQ Landcover_EA Fig 5 7 4 Map Calculator After you fill in both the Expression and Name for new raster map to create fields click Run to start the process If no mask was set previously GRASS automatically uses the resulting raster data as a mask however it 1s always a good idea to make sure the mask is set with your raster results using the following steps First select Raster gt Mask r mask Fig 5 7 5 107 Vector Imagery Volumes Datebase Help File Settings i waa Devalap rester map Manage color Query raster maps Map type convernans r r T T Buffer rasters r bufer Conmoentnc circles e corcle Closest points distance O Mak e Raster map calculator nrmapcalt Neighborhood anakis b Overlay rasters a Solar radiance and shadows F Terrain anaha b TriariAra Fahim i Fig 5 7 5 Mask menu Next specify the calculated raster in the Raster map to use as MASK field Fig 5 7 6 You can leave the Category values to use for MASK field at its default value Finally click Run and apply the mask to exclude water areas from your analysis Fig 5 7 6 E Create inverse MASK from specified maskcats list Raster map to use as MASK input string water area MODIS 5 Category values to use for
119. ocated points Required i Optional Command output T Generate points also for NULL category Report information about input raster and exit i T Generate vector points as 3D points d F Allow output files to overwrite existing files overwrite T Verbose module output verbose T Quiet module output quiet Name of cover raster map cover name Name for output raster map raster_output name random50r A Name for output vector map vector_output name random50v 5 Add created map s into layer tree E Close dialog on finish r random input result_tree_cover_dep MODIS n 50 raster_output random50r ve 109 r random input result_tree_cover_dep MODIS n 50 raster_output random50r ve Fig 5 8 1 The r random command generates random points in raster and vector formats Example Required tab Name of input raster name result_tree_cover_dep MODIS The number of points to allocate 50 Optional tab Name for output raster map randomd0r Name for output vector map random50v 4 GRASS GIS Map Display 1 Location Japan_LatLon lt ere C aaa PLA hs he ee AT iy Seo eet agg A RE al te k erg P u n a Z os a T E B r O ee el 3 Et A i pe al gt ak 3 ee rs s z r j f g hi b y 4 gt J gt 7 F s p a y f 138 40 45 05E 35 34 00 37N Render Fig 5 8 2 Generated random points red dots using t
120. olbnda_jpn shp List of OGR layers Layer id Layer name Name for GRASS map editable 1 polbnda_jpn polbnda_jpn Options Do not dean polygons not recommended Extend region extents based on new dataset Override dataset projection use location s projection Limit import to the current region Do not create attribute table Change column names to lowercase characters Create 3D output E Allow output files to overwrite existing files Add imported layers into layer tree E Close dialog on finish Fig 3 7 4 v in ogr dialog box to import vector data settings are described below e Format Shapefile e File source shapefile e Layer name polbnda_jpn e Name for GRASS map polbnda_jpn Al The imported political boundary data are composed of prefecture boundary polygons Fig 3 7 5 Therefore you need to dissolve the polygons to create a unified Japanese political boundary GRASS GIS Layer Manager Eg fo e fs GE GRASS GIS Map Display 1 Location Japan_LatLon 3 f E File Settings Raster Vector Imagery Volumes Database Help IR IZ anaa a aaan EE RUBS YP jadadda LE a Ud avew zi Ed B i e o A D TAr EET A SO MATT E viirs_d20130308_t1543148_e1549231_b07055_band4 MODIS 4 ET virs_d20130308_t1543148_e1549231_b07055_band5 MODIS viirs_d20130308_t1543148_e1549231_b07055_band3 MODIS we GRASS GIS Attribute Table Manager lt polbnda_jpn MODIS gt
121. ollowing commands to start importing images Syntax modis_import sh Example gt cd c DATA GSI_MODIS gt cp modis_import sh MCD43B4 gt cd MCD43B4 gt sh modis_import sh Examples of imported layer names e MCD43B4 A2012249_band1 40 e MCD43B4 A2012249_ band2 e MCD43B4 A2012249 band3 By executing modis_import sh MODIS data is automatically imported into GRASS Layer names of those imported images are assigned based on the original TIFF file names GRASS au tomatically sets its region setting based on the range of images you will import and determines its spatial resolution setting based on the first imported image You can display imported single band images by clicking the Add raster map layer menu in the GRASS toolbar You are also able to display a RGB composite image with three band images by clicking Add various raster map layers in the GRASS toolbar and choosing the Add RGB map layer command However maps you wanted to see may not have suitable color settings In that case you need to assign a different color map to each layer by using the r colors command Fig 3 5 1 We recommend you choose the gray255 color map with the Histogram equalization option Fig 3 5 2 lt p GRASS GIS Layer Manager aE lt Q GRASS GIS Map File Settings Raster Vector Imagery Volumes Database Help Flee F i a 5 Develop raster map for i Alors EA mi d
122. on t need to install them again but if not GRASS will fail to start and you will see errors like Missing MSVCR 1 dll or MSVCP100 dIl The archive is about 12 MB and may take several minutes to download The Microsoft Visual C Redistributable Packages will be copied to C Users ximakihi AppData Local Temp Press OK to continue and install the runtimes or Cancel te skip the download and complete the GRASS installation without the Microsoft Visual C Redistributable Packages Fig 2 2 7 Description of the Microsoft Runtime DLLs installation C GRASS GIS 6 4 3 1 Setup Completing the GRASS GIS 6 4 3 1 Setup Wizard GRASS GIS 6 4 3 1 has been installed on your computer Click Finish to dose this wizard E Launch GRASS GIS F View the reference manual Cancel Fig 2 2 8 GRASS setup wizard at the end of the installation If your installation is successful the GRASS GIS 6 4 3 icon Fig 2 2 9 will appear on your desktop as shown below Fig 2 2 9 GRASS startup icon In addition to the desktop icon you will see several GRASS short cut icons under the GRASS folder accessible from the Windows Start menu Fig 2 2 10 Each short cut enables you to start GRASS in a different mode such as a text mode or graphical user interface GUD mode Later we 8 will discuss how to use GRASS GIS 6 4 3 GUI with MSYS for data processing so please remem ber how to find the short cut icons To ve
123. onversions Buffer rasters r buffer Concentric circles r circle Closest points r distance Mask r mask Raster map calculator r mapcalc Neighborhood analysis Overlay rasters Solar radiance and shadows Terrain analysis Transform features Hydrologic modeling Landscape structure modeling Landscape patch analysis Wildfire modeling Change category values and labels b Interactively edit category values d rast edit Generate random cells gt Reclassify by size r reclass area 7 a Generate surfaces gt Reclassify r reclass N Map layers Internolate curfacer b Fig 4 7 1 r reclass command After the dialog box opens Fig 4 7 2 input values in text boxes in the Required tab as fol lows e Raster map to be reclassified LC_Japan e Name for output raster map LC_Japan_reclass C Pa i nreclass raster statistics reclass Add created map s into layer tree Close dialog on finish rreclass input LC Japan output LC_Japan_reclass Fig 4 7 2 R reclass dialog box Next you will specify a series of relationships between the original raster values and new val ues you want to assign in the Optional tab Fig 4 7 3 You also can add a category name to the values you assign Syntax Original Code New Code New Category Namel Example 1 1 Broadleaf Deciduous Forest 2 3 Needleleaf Evergreen Forest 3 11 Cropland lt 2
124. or r to vect Georectify Graphical modeler Run model NVIZ requires Tcl Tk nviz Raster series to volume r to rast3 Raster 2 5D to volume r to rast3elev Vector to raster v to rast Vector to volume TEPEN IN vector tn IN vertar v ta 3d Fig 4 Selecting v to rast menu With the v to rast dialog open specify training_area in the Name of input vector map field again training_area in the Name of output raster map field and attr as the Source of raster values in Required tab Further in the Attributes tab input landcover in the Name of column for attr parameter field kadhadha RS i bi Aaii i J Converts rasterize a vector map into a raster map Required Selection Attributes Optional Name of input vector map training_area training_area Name for output raster map training_areal Source of raster values attr cose ren cov re V Add created map s into layer tree E Close dialog on finish v to rast input training_area training_area output training_area use attr i v Converts rasterize a vector map into a raster map Required Selection Attributes Optional Name of column for attr parameter data must be numeric landcover v Name of color definition column with RRR GGG BBB entries bl Name of column used as raster category labels cose run cov J He
125. ou can download from the University of Maryland s website http earthenginepartners appspot com science 2013 global forest download html We have also briefly described a way to use pre existing vegetation or land cover vector data as training data in the FAQ section at the end of this Manual You will need to decide what kind of data best fits your study goals however for our purposes we are going to use one of the Global Forest Change 2000 2012 products Han sen_GFC2013_ treecover2000_40N_130E tif for our exercise The modis_extract_dn sh script will create training data based on the land cover map you creat ed in Chapter 4 and the training raster in our case a tree cover raster based on the map we just imported Hansen_GFC20138_treecover2000_40N_130E tif You need to specify your training data the LC raster name of the output CSV file and the number of points you want to generate for the modis_ extract_dn sh command 99 Syntax modis_extract_dn sh training area classification result output file csv number of points Example gt sh modis_extract_dn sh treecover2000 LC_Japan_reclass_resamp veg_training csv 100 Output file name example veg_training csv The above command creates a veg_training csv file like the one shown in Fig 5 2 1 E x A veg_training csv Microsoft Excel o B 52 Home Insert Page Layout Formulas Data Review View A o ep amp B i Calibri Ju Jy r
126. ount of memory Thus scripts may stop working in the middle of the process because of the lack of free memory space In that case you may need to close other running software on your PC or narrow your analysis extent 1 4 Creation Date We wrote this Manual in March 2014 All tools and websites in this document were accessible and effective as of the creation date If you need updated information please refer to the websites of the respective tools or software 1 5 Copyright Copyright 2014 by the Geospatial Information Authority of Japan All rights reserved This document or any portion thereof may not be reproduced or used in any manner whatsoever without the express permission of the publisher 2 Installing Software 2 1 Preparing to Install Required Software Each software program discussed in this Manual has its own disk space requirements see Ta ble 2 1 1 Please make sure your computer has sufficient disk space prior to installation Table 2 1 1 Software and required disk space software Required Disk Space GRASS 360 MB OSGeo4W 900 MB pyModis 370 KB R 100 MB In addition you will need free disk space for data storage and processing Specifically you will need to download MODIS image data convert that data into a different file format and generate intermediate and final data You will need an approximately 100 GB free disk space to finish this tutorial This tutorial only analyzes MOD
127. providers such as the United States Geo logical Survey USGS We recommend using the Earth Explorer http earthexplorer usgs gov to search for and download images You can use various search criteria to narrow down the images you want to download For ex ample you can specify the number of paths and rows or use a place name to narrow your search area You can also upload a shapefile or KML file for data searching After you specify your area of interest you need to choose a start and end date for image searching Fig 3 9 1 55 USGS Home Contact USGS Search USGS Z w System Messages 1 Enter Search Criteria conan men To narrow your search area type in an address or place name enter coordinates or click the map to define your Search area for advanced map tools view the help documentation and or choose a date range Address Place PathRow Feature show caver C Precesnes res Deora 1 Lat 35 41 22 N Lon 130 41 30 E 7 co Date Range Result Options Search from 0101 1920 to ou07 2014 Search montns 3 x Datasets Fig 3 9 1 USGS s Earth Explorer home page Next you need to specify a data set to search In our case select L8 OLI TIRS in the Land sat Archive list Fig 3 9 2 After you choose the data set option search results will appear in the Result tab You can check the metadata of those images or their thumbnails to decide which im ages
128. ption Splits MODIS data by channel merges by date and converts from MODIS Sinusoidal to WGS84 Syntax modis_merge sh_ options output min X output min Y _ output max X output max Y Example gt sh modis_merge sh 138 5 35 2 140 5 36 7 139 2 4 Importing data into GRASS e modis_import sh Description Imports GeoTIFF files into GRASS The GRASS layer name is the same as the imported TIFF file name without _pr tif Region is automatically set based on the extent and reso lution of the first imported raster data Syntax modis_import sh Example gt sh modis_import sh 140 e landsat_import sh Description Imports a Landsat8 image tar gz file into GRASS The GRASS layer name is the same as the imported tar gz file name without its extension Each file name has a band number at the end of the map name in GRASS Syntax landsat_import sh _ downloaded data Example gt sh landsat_import sh 141 e landsat_import_and_correct sh Description Imports a Landsat8 image tar gz file into GRASS while applying a topographic correction on the images You need to prepare a digital elevation model DEM to topographically cor rect reflectance Syntax landsat_import_and_correct sh_ downloaded data _ DEM Example gt sh landsat_import_and_correct sh LC81080352013283LGNO0 tar gz dem _ 4326 142 e landsat_apply_qc sh Description Merges i
129. ptions including c and the use of a costs file to tune your classification With the c option you can loosen up your pruning criterion You also can use the costs file to weigh specific misclassification between LC classes For example you can avoid a misclassification between urban areas and forests by weighing the misclassification between them While explaining all the available options is beyond the scope of this tutorial you can learn about the C5 0 exe options at http www rulequest com seed win html 4 6 Checking Classification Results Before you start checking your classification results it is a good idea to match the values in the classified image with the LC code we decided to use Table 4 1 1 Usually category numbers in the classified image and the LC code do not correspond To query a raster value at a given location you can use GRASS s Query raster vector map s function First you need to click the LC_Japan on the GRASS Layer Manager and click the Query raster vector map s icon located on the toolbar of the GRASS Map Display panel Fig 4 6 1 Fig 4 6 1 Query raster vector map s icon You can obtain a raster value at a given location by clicking an arbitrary point on the raster layer shown in GRASS s Map window Then the raster value of the point you clicked will be re tuned with its location coordinates in the Layer Manager window Here is an example of returned information 139 4064
130. r layer is missing youl need to rerun the script and using the correct vec tor name ERROR Raster map lt tes gt not found Exporting 24 geometries 100 v out ogr complete 24 features written to lt truth_temp gt KML Removing vector lt truth_temp gt WARNING Unable to delete file 160 C GIS_DATA GRASS Japan_LatLon MODIS vector truth_temp coor WARNING couldn t be removed WARNING lt truth_temp gt nothing removed If the land cover map 1s missing you need to rerun the script and using the correct raster name 161 4 Calculating Percent tree cover 4 1 Aggregating indexes within a training area e modis_aggregate_index sh Description For each point aggregates indexes created by modis_calc_index sh and arranges them in descending order Then extracts the three highest pixels and calculates the NDVI average the value for each band 1 7 and SI and the NDSI minimum and then creates raster data for each bands and indices Syntax modis aggregate _index sh _ target year Output Raster data generated from the script agg ndviave average NDVI at three highest NDVI agg band01 07 average NDVI at three highest NDVI by each band1 7 agg ndsimin minimum NDSI at three highest NDVI age Siave average SI at three highest NDVI Example gt sh modis_aggregate_index sh 2008 Error message ERROR ERROR There is no index layers ERROR Please execute modis calc_index sh f
131. r tree cover es timation by viewing the tree cover percent listed in the pop up dialog box that appears when you click on a point Fig 5 8 4 Each point represents one cell unit in the spatial resolution you set in GRASS In our case points are located in the center of 30 second x 30 second cells If you summa rize your visual inspection against estimated tree cover in a spreadsheet program you can calcu late estimation accuracy too 111 fie Google Earth la eee F Seach i wal P EA 7 i _ Fig 5 8 4 A visual inspection of a tree cover estimation using Google Earth tree cover percent is shown in the dialog box Next we are going to learn how to compare our resulting tree cover estimation against existing data sources The modis_verify_point2 sh command selects random points within your region and compares the calculated percent of tree cover against test data true value raster This command exports the percent of tree cover from both the calculated and training data as a CSV file We are going to use the tree cover data used as the model training data treecover2000 If you want to use your origi nal tree cover data you need to load you data in GRASS before executing the following command Syntax modis_check_accuracy sh true value raster output file csv the number of ran dom points Example gt sh modis_check_accuracy sh treecover2000 check_accuracy 200 Output file name check_accurac
132. ract _dn sh treecover2000 LC_Japan_reclass_resamp veg_training_see5_1 csv 50 r mask o input group_rast maskcats 2 sh modis_ extract _dn sh treecover2000 LC_Japan_reclass_resamp veg_training_see5_2 csv 50 gt r mask o input group_rast maskcats 3 gt sh modis_ extract _dn sh treecover2000 LC_Japan_reclass_resamp veg_training_see5_3 csv 50 3 Creating random points Generate random points within the sub regions using the r random command You need to as sign the sub region numbers group number to the random points you just generated By masking 128 NODATA areas using the r mask command the random points can have the group number as their attribute gt r mask o input group_rast gt r random input group_rast vector_output random_see5 n 100 4 Adding attribute fields to the random point map Next you need to add various attributes from image and indices data to the random points You will use those attributes as explanatory variables for See5 When you add new fields to an attrib ute table you need to name fields so you can easily identify the attribute type A default DBF da tabase file can have only limited characters 10 bytes so you may need to be creative to effectively name the fields gt v db addcol map random_see5 columns agg_ndviav DOUBLE PRECISION Next add raster values which will be used as explanatory variables in the following analysis gt v what rast vector random_see5 ra
133. rams for each LC class The modis_disphist sh command creates a histogram of each band for a given LC class You will need to specify the name of the training area raster file the date of your target image and the LC class integer as follows Syntax modis_disphist sh training area raster data target date land cover class Example gt sh modis_disphist sh training_area 2012289 3 The statistical software R is used to draw a histogram as shown below mami k 3 om 5 me yg oll i Fig 4 4 1 Displaying a series of histograms for evergreen needleleaf left and urban right clas ses 76 For the maximum likelihood classification ideally these histograms should be normally distributed If the histogram seems to be far from the normal distribution you may need to recon sider your training area data 4 5 Classifying Land Cover This section explains how to classify images into LC classes using the maximum likelihood and the decision tree methods We are going to use GRASS s default function for the maximum likeli hood method but the C5 0 algorithm for the decision tree method Scripts for both methods accept input images as a group of individual raster data To create a group of raster first you need to run the 1 group command in GRASS 4 5 1 Grouping Images for Supervised Classifications You need to create a classification target group using the 1 group command for the supervised classification Yo
134. rectory text box or select the target directory using a file chooser selected through the browse button Fig 3 1 3 Next enter a location name in the Project Location text box We will use Ja pan_LatLon as a location name for this exercise Fig 3 1 3 26 r paoia tea Jefir GRASS Locatio newG Define GRASS Database and Location Name GIS Data Directory C GIS_DATA GRASS Project Location Japan_LatLon Location Title Fig 3 1 3 Location wizard GIS Data Directory c GIS_DATA GRASS Project Location Japan_LatLong Location Title leave blank Figure 3 1 3 shows how the location named Japan_LatLon will be created under the C GIS_DATA GRASS directory You can leave the Location Title box blank Once you enter all the information press the Next button In the next dialog box Fig 3 1 4 you will select a method for setting the location s spatial ref erence system Define new GRASS Location M Choose method for creating a new location Select coordinate system parameters from a list Read projection and datum terms from a georeferenced data file Read projection and datum terms from a WKT or PRJ file Specify projection and datum terms using custom PROJ 4 parameters Create an arbitrary non earth coordinate system XY Fig 3 1 4 Location wizard screen to choose a spatial reference system 27 There are several methods available inc
135. required to download MODIS data and import those da ta into GRASS This is the first step to create land cover type and tree cover maps This chapter also explains how to download and pre process LANDSAT and VIIRS images Once you have downloaded MODIS images you will learn how to create a land cover type map and a tree cover map in chapters 4 and 5 respectively To begin however you will execute a series of image pro cessing commands provided as shell scripts But even before you start processing images you need to set up your analysis environment and download MODIS images 3 1 Setting up the GRASS Environment Before starting GRASS first create a C GIS_DATA GRASS directory to store all your GRASS data A default storage directory for example grass_data may have been created during the installation We will use the C GIS_DATA GRASS directory throughout this exercise You will execute all scripts through the MSYS console that starts automatically when you start GRASS GIS 6 4 3 GUI with MSYS So if you haven t started GRASS GIS 6 4 3 GUI with MSYS launch it now Fig 3 1 1 d GRASS GIS 6 4 3 B GRASS GIS 6 4 3 Command Line W GRASS GIS 6 4 3 GUI r GRASS GIS 6 4 3 Old TclTk GUI b y GRASS GIS 6 4 3 Release Notes 4 GRASS Web Site GY MEYS UNIX Console z Uninstall GRASS GIS 6 4 3 J HDF5189 dJi HDF518 11 F 4 Back Fig 8 1 1 GRASS GIS 6 4 3 GUI with MSYS After GRASS starts normally
136. rify GRASS installed successfully you may want to try starting GRASS in the GRASS GIS 6 4 3 GUI with MSYS mode as shown in Fig 2 2 10 i erRassaises3s F B GRASS GIS 6 4 3 Command Line IRASS GIS 6 4 3 GU W GRASS GIS 6 4 3 GUI be F GRASS GIS 6 4 3 Old TelTk GUI w GRASS GIS 6 4 3 Release Notes 4 GRASS Web Site BI MsyS UNIX Console gt Uninstall GRASS GIS 6 4 3 HDF518 9 J HDF51811 d Back Fig 2 2 10 Various GRASS start modes in the program menu After you select the GRASS GIS 6 4 3 GUI with MSYS start mode option you will see a com mand window asking you to continue the GRASS startup process Fig 2 2 11 r E1 MSYS 1 0 E o B 52 WELCOME TO GRASS Version 6 4 3 2613 1 gt Have at your side all available GRASS tutorials 2 gt When working on your location the following materials are extremely useful A topo map of your area Current catalog of available computer maps 3 gt Check the GRASS webpages for feedback mailinglists and more http wuw grass gis org http grass osgeo org Hit RETURN to continue Fig 2 2 11 A command line window appears after you start GRASS GIS 6 4 3 in the MSYS mode Before GRASS starts you may see a warning message Fig 2 2 12 however ignore it and hit the ok button This warning message shows up when you start for the GRASS first time because you haven t assigned your default GRASS database yet Af
137. ript s file format will depend on the GDAL specification You ll need to make sure your DEM is based on metric units but you can use either integer or float data type DEMs Once you prepared the DEM you need to copy the landsat_import_and_correct sh to the Land sat directory and execute the script for each downloaded data 60 Syntax landsat_import sh input file tar gz DEM layer Example gt sh landsat_import_and_correct sh LC81080352013283LGNO0 tar gz dem 4326 Output files e LC81080352013283LGN00_B1 e LC81080352013283LGN00_B2 e LC81080352013283LGN00_B3 Once you import images into GRASS you can merge images that were taken on the same date but different paths and rows Syntax landsat_apply_qc sh Example gt sh landsat_apply_qc sh Finally you can fill the cloud covered pixels with images from another time period using the same process we explained in Section 3 8 Before you run the landsat_intepolate sh script you need to download Landsat images either from forty eight days before and after the date the image was taken total ninety six days or from images taken on the same date during the previous and subsequent years The landsat_interpolate sh script allows you to choose which of these methods you prefer to fill in cloud covered areas In the landsat_interpolate sh script you need to first spec ify a target year and then identify your preferred filling method Refer to Section 3 8 for more
138. rror message ERROR ERROR file not found test kml If you mistype the KML file name you ll need to restart the script and using the correct file name 152 e modis_disphist sh Description Draws a histogram for the training area Syntax modis_disphist sh_ training area raster data _ target date 2008081 _ class Example gt sh modis_disphist sh training_points 2008249 1 Error message ERROR ERROR No layers of target date was not found 2013249 If you mistype a land cover code or a date you ll need to restart this script and using the correct land cover code and date 153 3 3 Decision Tree e modis_classify_dtree sh Description Creates an input file for the c5 0 exe to build a decision tree model You ll need to prepare your training data to build the model This script outputs names and data files which are the input files for c5 0 exe You ll also need to prepare an image group using the 1 group command in GRASS Syntax modis_classify_dtree sh _ training vector _ image group _ output file name without an ex tension Output LC_JP_DI name LC_JP_DT data Example gt sh modis_classify_dtree training_area target LC_JP_DT Error message ERROR ERROR Vector map t_area not found If you input the wrong vector name youll need to rerun the script using the correct vector name 154 e co 0 exe Description Builds a decis
139. ry Volumes Database Help i 2 k Maes CF 4 d 4b Develop vector map b Create new vector map Topology maintenance gt Digitize vector map using Tcl Tk digitizer v digit k Manage colors b Edit vector map non interactively v edit yi ETL een yee Convert object types v type_wrapper sh Feature selection viirs_d20130 Parallel lines v parallel Map type conversions gt viirs_d20130 Buffer vectors v buffer Dissolve boundaries v dissolve _ i i b vrs _d20130 Lidar analysis Create 3D vector over raster v drape Linear referencin b virs _d20130 g Extrude 3D vector map v extrude Nearest features v distance Create labels v label Network analysis gt Create optimally placed labels v label sa Overlay vector maps b i Reposition vector map v transform Change attributes b i Reproject vector map v proj Update attributes b i Support file maintenance v support Generate area for current region v in region ror a 48 Fig 3 7 6 v dissolve command under the Vector menu Once the v dissolve command dialog box appears you can specify parameters as follows Fig 3 7 7 Required tab Name of input vector map polbnda_jpn MODIS Name for output vector map jpn_msk Optional tab e Name of column used to dissolve common boundaries coc a v dissolve vector area dissolve 1 i E gal v dissolve vector area dissolve Dissolve
140. s boundaries between adjacent areas sharing a common category number or attribute ee Dissolves boundaries between adjacent areas sharing a common category number or attribute Required Optional Command output Manual j Manual Optional E Allow output files to overwrite existing files E Verbose module output E Quiet module output Layer number If 1 all layers are extracted 1 ka Required Command output Name of input vector map polbnda _jpn MoDIsS input name overwrite verbose quiet layer integer Name for output vector map output name jpn_mask Name of column used to dissolve common boundaries coc column string Add created map s into layer tee E Close dialog on finish wdissolve input polbnda_jpn MODIS output jpn_mask Add created map s into layer tree E Close dialog on finish wdissolve input polbnda_jpn MODIs output jpn_msk colurnn coc Fig 3 7 7 v dissolve dialog box After you conduct the v dissolve command you will have one polygon that represents the land part of Japan In the next step convert the dissolved polygon into the GRASS raster format using v to rast command Fig 3 7 8 You will use this rasterized polygon to create a mask 49 lt GRASS GIS Layer Manager k bobas SQ GRASS GIS Map Display Settings Raster Vector Imagery Volurnes Database Help oa re P T r
141. select the Python GDAL and wxPython packages Amend ment on February 1 2015 Due to a change of the content of the OSGeo4 package in addition to these packages you will need to also install gdal python and python numpy under Libs First at the Select Packages wizard expand the Commandline_Utilities list by clicking the plus mark next to the Commandline_Utilities Fig 2 3 4 This will reveal the list of various com mand line programs as shown in Fig 2 3 5 12 ja OSGeo4W Setup Select Packages Select Select packages to install Search f Keep O Prev Cur Bp Category Curent New kais Package SE Desktop amp Default Libs 4 Default Web 4 Default Hide obsolete packages Fig 2 3 4 A package selection wizard during OSGeo4W installation Once you expand the Commandline_Utilities list click gdal and python core from the list Fig 2 3 5 You may see different versions of gdal and Python compared with Fig 2 3 5 since OSGeo4W may have updated the available version after this Manual was published Once you chose gdal and python core then click the Libs list to select wxpython Fig 2 3 6 13 83 OSGeo4W Setup Select Packages Select Packages Select packages to install Search Keep Prev Cur Ep Category Package E Al 4 Default E Commandiine_Utilties 4Y Default 4 Skip na nja Wik avce i The AVCEO0 commandline utilities for ArcInfo E00 convers 4
142. sh Once you import the Landsat images you can load images in an RGB composite format using the Add RGB map layer command If you want to see the image in its natural color you need to specify band 4 as red band 3 as green and band 2 as blue Fig 3 9 7 59 ht GRA 55 GIS gt Map Disp ay l GT Fig 3 9 7 Example of an RGB composite image Instead of importing Landsat images directly to GRASS you can also correct the topographic effect and calculate reflectance using a topographic correction algorithm during the data import process In that case you will need to use the landsat_import_and_correct sh script Before you run that script you need to prepare a digital elevation model DEM in your analysis area and import it into GRASS You can download a DEM from various websites but the Shuttle Rader Topogra phy Mission SRTM data are convenient for this purpose since SRTM data cover the entire world with a 90 m resolution The Consortium for Spatial Information http www cgiar csi org data srtm 90m digital elevation database v4 1 and the Global Land Cover Facility http www landcover org data srtm are two examples of organizations that offer the data down load service You can use various DEM resolutions for the landsat_import_and_correct sh however you will need to reproject the DEM you want to use to the spatial reference system the GRASS re gion adopted The script uses GDAL to read DEM Therefore the sc
143. ster agg_ndviave col umn agg_ndviav Repeat the above two commands until you add all the variables you want to include in your analysis v db addcol map random_see5 columns agg_ndsim DOUBLE PRECI SION v what rast vector random_see5 raster agg_ndsimin col umn agg_ndsim v db addcol map random_see5 columns agg_Ssiave DOUBLE PRECI SION 129 what rast vector random_see5 raster agg_Siave col umn agg_Siave dbo addcol map random_see5 columns agg_bandl DOUBLE SION what rast vector random_see5 raster agg_bandl col umn agg_bandl dbo addcol map random_see5 columns agg_band2 DOUBLE SION what rast vector random_see5 raster agg_band2 col umn agg_bandz2 db addcol map random_see5 columns agg_band3 DOUBLE SION what rast vector random_see5 raster agg_band3 col umn agg_band3 db addcol map random_seeS columns agg_band4 DOUBLE SION what rast vector random_see5 raster agg_band4 col umn agg_band4 db addcol map random_seeS columns agg_band5S DOUBLE SION what rast vector random_see5 raster agg_band5 col umn agg_band5 db addcol map random_see5 columns agg_band6o DOUBLE SION what rast vector random_see5 raster agg_band6o col umn agg_bando6 5 Exporting the table After all the explanatory variables have been added to the attribute table export the table as a CSV text file 130 gt db out ogr input random_see5 dsn c DATA GSI_MODIS category csv
144. systems and map projection e Image formatting and processing e Remote sensing technology e Windows operating system This Manual does not give detailed explanations about the above mentioned items Please refer to other documents if needed 1 3 Operating Environment We developed and tested all scripts in a Microsoft Windows 7 64 bit environment The pro grams discussed in this Manual do not require your personal computer PC to have any particular specifications 1n order to run them properly However you will want to ensure that the various re quired software work normally on your PC If you purchased your PC recently 2012 or later you shouldn t have a problem running the scripts we provided You will however need sufficient hard disk space to store satellite images about three times the size of your original satellite images as well as intermediate and final products Below are the specifications of the lower end PC we used to test all scripts Processor AMD Athlon IT X2 250 Processor 3 00 GHz Memory 4 GB Hard disk space 256 GB Graphic card no requirement ATI Radeon HD 4200 Operating System Windows 7 SP1 We also tested our scripts under a Windows 32 bit environment Processor Intel Xeon E5420 2 50 GHz 2 Processor Memory 4GB Hard disk space 256GB Graphic card no requirement VGABIOS Cirrus extension Operating System Windows 7 Enterprise Some of the programs in this Manual require a large am
145. t agg_ndsimin mean 0 02121 sd 0 1157855 min 3 0849 max 0 1616 att agg_siave mean 0 93737 sd 0 01969605 min 0 5343 max 1 1363 I entries 1 rules 100 16 conds 4 cover 407 mean 3 6 loval 1 hival 12 esterr 0 8 type 2 att agg band2 cut 2264 8999 result gt type 2 att agg band3 cut 405 63 result gt 19 type 2 att agg band7 cut 1031 result lt 20 type 2 att agg ndviave cut 0 50230002 result gt 21 coeff 1733 att agg ndviave coeff 17 1 att agg bandi coeff 0 0621 att agg band2 coeff 0 0044 att agg k 2 conds 4 cover 1824 mean 4 3 loval 1 hival 9 esterr 0 8 23 type 2 att agg band4 cut 526 63 result lt 24 type 2 att agg bandsS cut 1883 77 result gt mW Normal text file length 65107 lines 746 Ln 1 Col 1 Sel 0 UNIX ANSI INS Fig 5 3 1 Model file 102 5 4 Estimating Percent Tree Cover You are now going to estimate percent of tree cover with the model file you created in 5 3 Exe cute modis_import_result sh with the model file as the first argument Syntax modis_import_resutl sh cubist model file Example gt sh modis_import_result sh rep2 model Output examples res_O res_l res_10 With this command you will create a series of tree cover raster files named res_ The number of res_ raster layers depends on the number of training points you specified in 5 2 5 5 Com
146. t Files All the scripts used in this Manual will run on both a 32 bit and a 64 bit R environment Select the Message translations option in the Select Components dialog box too Fig 2 5 8 21 Select Components Which components should be installed Select the components you want to install dear the components you do not want to install Click Next when you are ready to continue 610 MB 13 0 MB 15 0 MB Message translations 6 8 MB Current selection requires at least 81 8 MB of disk space Fig 2 5 8 Dialog for selecting components After completing the installation the R i386 3 0 2 icon Gif you installed the 32 bit version will be added to your desktop Fig 2 5 9 Fig 2 5 9 R shortcut icon 32 bit R version shown If you use proxy for Internet connection you will need to set up the following to install an R package after this Select the property by right clicking the R icon Fig 2 5 9 then your screen is shown as C Program Files R R 3 0 2 bin x64 Rgui exe as the link destination in the short cut tab Add internet2 like C Program Files R R 3 0 2 bin x64 Regul exe internet2 If you do not use proxy for Internet connection you will not need this setting To make sure your installation was successful and to install R packages right click the R icon to run as an administrator start If you see a similar window as shown in Fig 2 5 10 you success fully installed R 22 E Fie b
147. t have properly set NULL values instead Os are set In this case the resulting raster data will look empty If that happens try running the modis_integrate_result2 sh script instead of the modis_integrate_result sh script we prepared this alternate script to set NULL values before integrating the result images You should also remove the existing imported data before importing the results gt g mremove f rast res_ Imported data can be seen in Figure A 1 3 Fig A 1 3 Image after importing one group Repeat above processes for each group gt r mask o input group_rast maskcats 2 sh modis_import_result sh cat2 model category 2 modis_integrate_result sh g rename rast result_tree_cover_dep tcd2 g mremove f rast res_ r mask o input group_rast maskcats 3 134 sh modis_import_result sh cat3 model category 3 modis_integrate_result sh g rename rast result_tree_cover_dep tcd3 g mremove f rast res_ 10 Integrating results by group Integrate the results from each group Run the below command gt r patch input tcdl tcd2 tcd3 output tcd_integrated Results Fig A 1 4 Image after integrating results by group 135 A 2 Program references 1 Introduction In the Global Map Raster Development GMRD Tool User s Manual some processing is per formed with scripts This reference section explains those scripts by describing their process giv ing script s Syntax
148. t raster data Import vector data Import 3D raster data Import database table Export raster map l ect F Ppor enorma ASCI grid export r out ascii ort 3D raste ap F E ASCI x y z points export r out xyz Cee nid datakhsrce takhle Fig 4 11 1 r out gdal command Set up the r out gdal command window to export the LC map as a GeoTIFF file and click the RUN button to execute the command Fig 4 11 2 ya rout gdal raster export ce t Es Yy Exports GRASS raster maps into GDAL supported formats Required Print Optional Command output Manual Name of raster map or group to export input name LC Japan_reclass resamp MoOpDIs Name for output raster file output name C DATA GSI_MODIS c_jpn tif fo Gao routgdal input LC_Japan_reclass_resamp MODIS output C DATA GSL_MODIS Fig 4 11 2 Export the land cover map using the r out gdal command in GRASS e Name of raster map or group to export LC_Japan_reclass_resamp e Name for output raster file c DATA GSI MODIS NIc_jpn tif 97 5 Estimating Percent Tree Cover Using the Land Cover Map In this last chapter we will conduct a supervised classification to estimate the percent of tree cover using Cubist Cubist is a tool for generating rule based predictive models from data and predicting numeric values instead of categorical values http www rulequest com cubist win htm We are going to build a prediction model with various band images
149. ter you start GRASS you will see the Welcome to GRASS GIS window Fig 2 2 13 that allows you to choose a location and mapset to start GRASS with The purpose of starting GRASS is just to see if your installation completed without any problems So close the GRASS application by clicking the x button on the top right corner of the MSYS window If you have problems starting GRASS please refer to the FAQ section at the end of this Manual kar Welcome to GRASS GIS 6 4 3 The world s leading open source GIS Select an existing project location and mapset or define a new location GIS Data Directory C grassdata Choose project location and mapset Manage Project location Accessible mapsets Define new location jection dinate system directories of GIS fil projection coor system directories o es Create new mapset in selected location Create mapset Rename delete selected mapset or location Rename mapset Fig 2 2 13 Startup dialog box for GRASS with MSYS 10 2 3 Installing OSGeo4W OSGeo4W enables you to collectively install the latest open source GIS software and develop ment libraries You can avoid installing multiple copies of same libraries such as GDAL and Py thon on your machine if you use the OSGeo4W installation mechanism Without this software it is common to have several software versions of for example Python if you use standalone installers to download GI
150. the instructions in 4 1 to create your own training data The modis_classify_dtree sh script creates name and data files to run c5 0 exe that builds a decision tree model for this image classification Syntax modis_classify_dtree training vector image group output filename without extension Example gt sh modis_classify_dtree sh training_area target LC_JP_DT The modis_classify_dtree sh script creates name and data files and the C5 0 exe accepts those files as its inputs 82 Syntax C5 0 exe f base name of your name file e focus on errors ignore costs file g do not use global tree pruning confidence level CF for pruning Example gt C5 0 exe Sf LC JP DI The c5 0 exe will create a tree file that you can use as an input file for the modis_import_Seed sh The modis_import_Seed sh script is then used to generate a final LC map It may take long time to finish this process so you need to be patient Syntax modis_import_See5 sh input tree file output namel Example gt sh modis_import_See5 sh LC_JP_DT tree LC_JP_DT GRASS GS Map Display 1 Locator Japan Latlon lt gt foc f fae CR rT ALLANA fie Ge E ni 139 34 41 19E 35 39 09 78N Fig 4 5 3 1 Example of an LC map created using a decision tree algorithm 83 If you cannot satisfy your classification results you need to go back and refine your training da ta C5 0 exe also offers various other o
151. to match the Global Map standard Type the follow ing command on the MSYS console and you will create a 30 second resolution raster called re sult_tree_cover_dep_resamp gt g region nsres 00 00 30 ewres 00 00 30 gt r resample input result_tree_cover_dep out put result_tree_cover_dep_resamp 104 Input raster result_tree_cover_dep Output raster result_raster_cover_dep_resamp 5 7 Excluding Open Water Areas from the Analysis Since we are interested in forest cover you can exclude open water areas from your analysis by making an analysis mask We are going to use the Global Land Cover by National Mapping Organ ization s GLCNMO data to create the water mask The GLCNMO s products describe land cover across the world with a 30 second resolution You are going to import the GLCNMO data into GRASS and create a mask to exclude open wa ter areas We will use Landcover_EA tif ftp geoinfo cr chiba u jp pub geoinfo globalproducts GG 56789 GG 6 GLCNMO Landcover_EA tif from the Center for Environmental Remote Sensing at Chiba University http www cr chiba u jp databaseGGLhtm First download the data and im port the Landcover_EA tif file into GRASS by selecting File gt Import raster data gt Common import formats r in gdal from the GRASS layer manager Fig 5 7 1 a fog GRASS GIS Layer Manager csl meted 53 GRASS GIS Map Display 1 Lo Fete Settmgs Raster Vector Imager
152. tu Welcome to the GRASS GIS 6 4 3 1 Setup Wizard This wizard will guide you through the installation of GRASS GIS 6 4 3 1 It is recommended that you close all other applications before starting Setup This will make it possible to update relevant system files without having to reboot your computer Click Next to continue Que GRASS GIS 6 4 3 1 Setup Choose Components Choose which features of GRASS GIS 6 4 3 1 you want to install Check the components you want to install and uncheck the components you don t want to install Click Install to start the installation Select components to install GRASS Aiea Important Microsoft Runt North Carolina Wake Cot C South Dakota Spearfish Space required 305 6MB Nullsoft Install System v2 46 Description Some software included in this installer e g GDAL Python may need Microsoft s Visual C redistributable system libraries Download and install the Redistributable Package 12 MB Fig 2 2 6 Choose the components you want to install check Important Microsoft Runtime DLLs ye GRASS GIS 6 4 3 1 Setup The installer will download the Microsoft Visual C Redistributable Packages These system libraries from Microsoft are needed for programs built with Microsoft s Visual C compiler such as Python and GDAL which ship with GRASS since MS does not include them by default You might already have them installed by other software if so you d
153. u can choose which bands of images are subsequently included at this step For the first step you can use GRASS s g mlist function and store the result as a variable You will store a list of image names into the LIST variable in the following example This sentence combines both a shell script command and the GRASS command by using a backtick character A name list created by GRASS s g mlist command will be passed to the LIST variable Within the g mlist command you can use a wild card a regular expression or an expanded regular expression to filter map names In the following example we use the e option the expanded regular ex pression with a matching pattern of interp A2012249 We will also use the exclude option and the separator option to refine and format the name list The g mlist command can take vari ous options See the following online manual for more information http grass osgeo org grass64 manuals g mlist html Example 1 Generating a list for the maximum likelihood classification This command only selects cloud removed band images and the expanded indices maps that both have A2012249 in their map names gt LIST g mlist e pattern interp A2012249 exclude old i iS separator TI Example 2 Generating a list for the decision tree classification This command selects cloud removed band images and original indices maps that have A2012249 in their
154. ummaries of selected MODIS Land Products for the community to use for validation of models and remote sensing products and to characterize field sites Output files contain pixel values of MODIS land products in text format and in GeoTIFF format In addition data Data Access LP DAAC NASA Land x EE MODIS Land Product Subsets Distributed Active Archive Center for Search ORNL DAAC Metadata a Get MODIS Subsets Collection 5 Field Site and Flux tower Obtain MODIS subsets for areas centered on more than 1 000 field sites and flux towers from around the world e Data for Selected Field Sites m visualizations time series plots and grids showing single composite periods are available Global Tool Order MODIS subsets for any site area from 1 pixel up to 201 x 201 km MODIS Land Product Subsets Resources and time period globally The following MODIS Land Product Subsets resources are maintained by the ORNL DAAC e Create Subset Web Service e MODIS Land Products Offered e Background e Citation Policy MODIS Sinusoidal Grid Google Earth KMZ e Web Service Info Related MODIS Links e Learn More A MODIS Website e Land Processes DAAC e MODIS Land Validation Strategy Programmatically obtain MODIS subsets for any land location time period and area from 1 pixel up to 201 x 201 km using a SOAP Web Service Fig 3 3 3 The MODIS sinusoidal GRID KML download link at the ORNL DAAC home page modis_
155. un Copy Help r null map jpn_mask MODIS null 2 r null map jpn_mask MODIS null 2 Fig 5 9 1 Assigning values using r null command Youll use the Raster map calculator r mapcalc for the rest of the process You can set a condi tional statement in the calculator to assign values in specified areas Use the land cover layer you created in Chapter 4 to assign 254 to the water areas and the tree cover percent to the rest of areas within the target area that were assigned as 1 Then assign 255 254 if the outside of your target 113 area is water body to the area outside of your target area Below is the if statement you can use in the map calculator if jpn_mask 1 if LC_Japan_reclass_resamp 20 result_tree_cover_dep_resamp 254 Select Raster map calculator r mapcalc from the raster menu and type the above statement in the Expression column Fig 5 9 2 GRASS GIS Raster Map Calculator lame Operators Operands iii yi RR T Name for new raster map to create ve_jpn j m jpn Insert mapcalc function gt gt RAR 1 ss z2 Insert existing raster map A a anus a b c e C o Jaso Expression if jpn_mask 1 if LC_Japan_reclass_resamp 20 254 result_tree_cover_dep_resamp 254 toad et S awe H Run BAUS C v Add created raster map into layer tree rmapcalc
156. velopment versions are avaiable here Please read about new features and bug fixes before filing corresponding feature requests or bug reports Source code of older versions of R is available here o Contributed extension packages sstions About R If you have questions about R ike how to download and install the software or what the Fig 2 5 3 Choose an R installer based on your operating system On the next page Fig 2 5 4 click the base hyperlink to continue the download process 19 gt Busta Packages Other Documentation anihgov eran miro ece B r R for Windows Subdirectones Binesies for base distribution managed by Duncan Murdoch This is what you want to install R for the first time Binaries of contributed packages managed by Uwe Ligges There is also information on contrib thd party software available for CRAN Windows services and corresponding enviroment and make variables Took to build R and R packages managed by Duncan Murdoch This is what you want to Riots build your own packages on Windows or to budd R itself Please do not submit binaries to CRAN Package developers might want to contact Duncan Murdoch or Uwe Ligges directly in case of questions suggestions related to Window s binaries You may also want to read the R FAQ and R for Windows FAQ Note CRAN docs some checks on these binaries for viruses but cannot give guarantees Use the normal precautions with dow
157. y Volumes Database Help iw n Fi r Workpact F ws _ Baap display i impot raster data import vector data ASCO x y 2 poant import and gndding rinya import 3D ratter data d ASCH grd import rinasci d i import dalitie table ASCH polygons and lees mgo rin paty Export rast 5 port raster map Binary file import r in bin Export vector ms Ea port vedor map ESAI ASCH grid import r in arc Export 3D raster maps j GRIDATE FOR import ran gndath Fig 5 7 1 Common import formats menu Click the Browse button on the Import raster data dialog to find the downloaded GLCNMO data Fig 5 7 2 Then choose GeoTIFF as source format and click Import to start importing the data If you don t specify a new layer name for the imported data the new raster layer will be named Landcover_EA 105 Import raster data Settings Source type File Directory Database Protocol Source settings File C _DATA GSI_MODIS Landcover_EA tif List of GDAL layers Layer id Layer name Name for GRASS map editable 1 Landcover_EA tif Landcover_EA Options Keep band numbers instead of using band color names Extend region extents based on new dataset Force Lat Lon maps to fit into geographic coordinates 90N 5 180E W Override projection use location s projection El Allow output files to overwrite existing files Add imported layers into layer tree E Close dialog on f
158. y csv error matrix You can evaluate estimation accuracy by visualizing data in the output csv file using a spread sheet program such as Microsoft Excel Fig 5 8 1 112 100 7 ce t B0 ae 7 pr ri 8 60 w a Gal T 5 bin gt E g 20 D Lu Z 0 oO 20 ao 6d 80 100 Tree covers 9 from the test raster Fig 5 8 5 Comparison of training data with calculated result 5 9 Exporting the Tree Cover Map You can modify the tree cover map to follow the Global Map project specification by assigning the integer 254 to the water areas and 255 to the areas you want to ignore Use the analysis mask you created in section 3 7 Gpn_mask and the land cover map for this process First assign 1 to the target area in our case Japanese administrative boundaries in the jpn_mask and 2 to the other area using r null command under the raster menu lt 2 r null raster null data o E e lt r null raster null data baba y Manages NULL values of given raster map Manages NULL values of given raster map y Required Modify Check Remove Optional Required Modify Check Remove Optional Name of raster map for which to edit null file map name multiple List of cell values to be set to NULL setnull val val jpn_mask MODIS The value to replace the null value by null fioat 2 Close Run Copy Help Close R

Download Pdf Manuals

image

Related Search

Related Contents

76102_anl.triple kick.qxp  APC Sliding Shelf    Metra 99-7427B mounting kit  VSDX6000GPS User Manual  Skytex Skypad Alpha 2 User's Manual  Gateway 820GM User's Manual  Transcend MMCplus 1GB  Network Camera  

Copyright © All rights reserved.
Failed to retrieve file