NASA ARSET Visualizing Land Cover Change P 2
The Story
Welcome to Part 2 of our specialized series on environmental monitoring and geospatial analysis: "NASA ARSET: Visualizing Land Cover Change P2."In this episode of the NASA Live Video Podcast, we advance from our foundational concepts into the practical and powerful workflows used to visualize and interpret changes on the Earth's surface over time. Rapid urbanization, deforestation, and agricultural expansion are continuously reshaping our planet, making the ability to accurately track and visualize these transitions essential for modern environmental conservation.
Through the framework of NASA’s Applied Remote Sensing Training (ARSET) program, we dive deep into the specific tools, platforms, and open-access datasets that allow scientists to map land cover dynamics across different time scales. We discuss effective visualization techniques, how to generate change detection matrices, and how to utilize satellite archives—such as Landsat and Sentinel—to turn raw geospatial data into compelling visual stories that drive policy and planning.
Whether you are an urban planner, an ecologist, a GIS analyst, or someone deeply fascinated by how remote sensing reveals the shifting footprint of humanity on Earth, this episode offers vital, hands-on insights. Subscribe to the NASA Live Video Podcast to catch up on Part 1 and stay connected with the frontier of space exploration, satellite imagery, and cutting-edge earth science!
Speaker 1: Hello everyone, and welcome back for Part two of the r SET training on visualizing land cover and land use change with NASA Satellite Imagery. My name is Justin Faine and I'm part of the r SET Ecological Conservation Team based out of the NASA AMES Research Center at the South end of the San Francisco Bay. As before, I'd like to take a moment to go over some details of the r SET program. Our SET is the Applied Remote Sensing Training program. We provide free trainings on a variety of topics which are divided into thematic areas, which is what you see listed here on the right.
Speaker 1: We do our best to listen to feedback from our audience to make sure we're doing trainings on the topics you are most interested in. We cover remote sensing satellites, sensors, methods, and tools at various levels of complexity, from the fundamentals of remote sensing to advanced trainings. Our SET trainings come in a few different formats. They can be online or in person, live an instructor led or asynchronis and self pace, but they are always provided.
Speaker 2: Free of charge.
Speaker 1: Many of our trainings are available with bilingual or multi lingual options. We only use open source software and data, and the trainings are targeted at a variety of levels of expertise. This training is called visualizing land cover and land use change with NASA Satellite Imagery. These are the learning objectives for the entire two part training, of which this is part two. By the end of this training, you should be able to access NASA Earth observation data relevant to land cover and land use change mapping, convert NASA Earth observation data into distinct land cover land use classes using supervised and unsupervised machine learning classification methods in the R programming language.
Speaker 1: Recognize the role of classification methods as one part of a change monitoring strategy. Computer change matrix representing the change in land covered land use between two dates, and create a map in our studio.
Speaker 2: Visualizing the differences in land cover and land use between two dates. The prerequisites to get.
Speaker 1: The most out of this training are the fundamentals of remote sensing course and some experience working with our in our studio. Note that I'm not asking you to have downloaded any of the code or data for this training. I'm going to be jumping back and forth between slides and code. Later in a way that will probably be hard to follow, and I've also gone ahead and prepared some of the parts which take a while to run, so that we can keep training moving along. I suggest that you follow along with this presentation and then explore the code afterwards.
Speaker 1: The code and data I'll be using in both sessions of this training will be available on the our set GitHub, which you can find on the training web page, along with these slides, a recording of this presentation and all of the other materials. If you're not familiar with cloning data from GitHub repository, we've got you covered on that topic as well. There's a short video linked on the training web page which covers the cloning operation. This is the second part of a two part training. The homework for this training will open following this session and will be due on March twelfth, which is two weeks from now.
Speaker 1: You can find the homework on the training web page, and we'll send out a certificate of completion to all who attend both parts of this training and complete the homework on time. With the logistics covered, we can begin Part two visualizing land cover change. Once again, I'm just in fame and I remain your sole instructor for this training. I'm a research scientist with NASA AMES and the Bay Area Environmental Research Institute in Mountain View, California. Here are the objectives specific to the second part of this training.
Speaker 2: By the end of.
Speaker 1: Part two, you'll be able to apply a random forest model to NASA mmetry to create land cover and land use maps for two different time periods and analyze both numerically and usually the change in land cover and land use over time. Please put any questions into the Q and A box in this training. There are a bunch of our set people watching the Q and A who are working to answer your questions while I'm presenting. Well, try to answer any questions you submit at the end of this training, but any questions we don't get to because of time or because they require some extra time on our end answer fully, We'll be answered in that Q and A document and uploaded to the training website in a week or so.
Speaker 1: The questions you ask and the responses we get from you and the post training surveys help us to sign on topics for future our set training, So your contributions are appreciated. Now we can get started. Just to review, here's some important concepts which we went over in the first part of this training and the image on the right is where we're headed today as we learn how to implement a random forest classifier and R and use it to show land covered land use change over time. In the previous session, we looked at one unsupervised classification method K means in detail.
Speaker 1: Today we're going to focus on supervised classification and ultimately build that random forest classifier for land cover. Recall this table from part one. With supervised classification were limited by the quality and specificity of the training data. Classes are targets which we establish ahead of time when we collect and label the training data. We'll focus primarily on random forest today since it's a great introduction to some other important concepts. However, since we discussed K means and detail in part one, let's briefly discuss the related K nearest neighbor.
Speaker 1: K Nearest neighbor uses the class labels of the training data to decide how to classify new data. K means being unsupervised, has no predetermined classes and only relies on similarities and brief this is how CA nearest neighbor works. Give it a new sample. Check the K nearest points or neighbors, and assign the new point the class which is most frequent among those neighbors. K can be any integer greater than one, but it's usually good to choose an odd number to help avoid ties. The points on the right are examples of known samples of different classes, where each class is represented by a different color.
Speaker 1: We can go through an example step by step step to see how this works in practice. Watch how K nearest neighbor classifies a new point. We'll set K equal to three, find the closest neighboring points, tally the votes, and the class that's most frequent in the list of neighbors is the class of the new point. Will now shift our focus and explore random forest models and lay the ground work for making our own random forest model. In R
Speaker 1: random forest is a tree based model, which means that it works by creating decision trees. The decision trees explain possible ways to divide the data based on binary true false filters. New data is classified by applying the decision trees, which work to split the training data most accurately. To see how this works, let's assume we have a training data set which consists of aliens and acorns. Random Forest knows that they are different classes because the training data is labeled with class information.
Speaker 2: There are some.
Speaker 1: Features which separate the aliens and acorns and our training data. Aliens can be blue or green, and acorns are smaller than aliens. Each split in the tree represents a binary discision.
Speaker 1: The first decision the first question might ask is it larger than some size? The next might ask is the object green? And finally it might ask.
Speaker 2: Is the object blue.
Speaker 1: Note that we didn't tell the model to make these splits. The random forest model actually makes hundreds of decision trees, each of which is the result of leaving out a random set of variables and observations. But for demonstration purposes, we're only going to consider the single tree where we're using all of the variables and all of the observations.
Speaker 1: So we've built a decision tree that describes a series of questions which we can answer to sort objects. Any object sorted into the left hand side is more likely to be an alien, and any objects sorted into the right hand side are more likely to be acorns. Now we can apply this to some data that the model hasn't seen before and observe what happens. The decision tree correctly sorted all of the objects, but notice that there's an unused path. This would represent acorns, which are bigger than aliens, but neither blue nor green.
Speaker 1: In this case, we got lucky and the big acorns still being correctly classified.
Speaker 1: But we might also ask what about small aliens, And now we see that we have a problem. There were no small aliens in the training data, so our model couldn't classify it correctly. This highlights the importance of having high quality training data that's representative of variations in the real world. In Part one, I mentioned that it was a good idea to have multiple samples for each class in your training data. As you can see in the false color image of our study area, the water has a high degree of variation due to suspended sediments.
Speaker 1: If we only took one or two measurements for training data, the model might not correctly classify clear and turbid water as both belonging to the water class. Taking many training data measurements ensures that we're providing the model with a full picture of the variability of spectral reflectants within a single landcover class. In this example, I've pulled the data for two of our water training points. I've indicated the actual points these correspond to in the map on the right, where you can see that one sample is very turbid and the other is relatively clear.
Speaker 1: Providing both samples to the model helps it learn that water can have a wide range of characteristics so that it can correctly classify picksel of water that lie between these extremes. To return to our previous analogy, we're accounting for both big acorns and small aliens. Here, I've laid out a high level overview of the workflow. We'll be covering an r as we build a random forest model for classification, So let's head to our studio to see how it's done. Just as a reminder, you'll have access to the code, data, slides, and training materials via the training page and the rset GitHub.
Speaker 1: I highly recommend that you watch the demonstration and then explore the code after the training is concluded. I've also precomputed some of the results for the sake of time, so if you try to follow along, you'll probably fall behind.
Speaker 2: With that, let's build.
Speaker 1: Our own random forest model. We'll be building a random forest model for supervised classification, and we'll begin by loading all of the live libraries we're using this training. This is the same set we used in the code for part one, and I'm also setting the same random seed so that your outputs will look like mine. Just as in part one, we need to load the raster data for twenty seventeen and twenty twenty four. I'm also going to go ahead and make the same RGB plots for both years as we did in part one, so we have them ready if we need to use them as base maps later.
Speaker 1: I won't go over this since you've seen the process before, but you can refer to the comments and the code block for a quick refresher. Now we can also load the training data points that I prepared for this training. The points are associated with the image from twenty seventeen, since we are going to build our model on the twenty seventeen data before applying it to the twenty twenty four data. Notice that I also apply the naomit function to remove any points that are missing a class label. The training sets small enough that we could do a manual check for missing gas labels, but this is just good practice.
Speaker 2: For cleaning any training data. Set.
Speaker 1: It's also useful to take a look at the training points in the context of the imagery, so let's plot them on top of the RGB plot for twenty seventeen we stored earlier. The points should be colored according to their class. We can confirm that they're representing the land cover types we expect. Here, I'm using a variant of the okapia ETO colors for the points and setting the philosthetic to match the LC class variable. We find ourselves in a situation where the training points and the underlying raster are spatially associated, but the training points don't have any information about the reflectance values stored in the raster.
Speaker 1: We can extract the reflectance values of the raster at each of the training points using the extract function with the bind options set to true, so that the results include the reflectance values as well as the land cover class labels. We also need to ensure that the LC class variable is stored as a factor, which is the art data type for categorical values or random. Forest will assume we're trying to do regression and throw an error because regression on character.
Speaker 2: Vectors is undefined.
Speaker 1: Here's a quick check of our combined training data to make sure everything worked as we expected, and we can see here that we have the land cover class and the reflectance values for each of the bands and our raster.
Speaker 1: We can also see that lank cover class LC class variable is listed as factor, which indicates that it's been converted to the r factor data type, just like we want it. The reflectance values are still listed as double, which is double precision floating point data. That's a numeric data type. And with that sort of we're free to move on. There are a few important elements to the random forest function call. We'll go ahead and run the function here and then explain what each part's doing. This is a breakdown of the arguments to the random forest function call.
Speaker 1: These aren't all of the possible arguments, but they're the ones that I think are core to understanding random forest or just practical to know. The formula is a formula describing the relationship between the objective and the predictors. When we type ELS class tilda period, the variable is predicted by all of the variables in data. ELC class is excluded since it's the target of the predictors for classification. This always takes the form class tilda predictors, where the period just stands in for everything that's not.
Speaker 2: The class.
Speaker 1: Data is the data from which to draw all of the class and value information. This must contain labels as factors as that factor data type for classification to take place.
Speaker 1: Proximity equals T. Proximity equals true gives you an output where the values are closer to one when the pairer of observations are more similar. Well, look at how to visualize these later. You can set this to f to false to turn it off if it's not.
Speaker 2: Important to you.
Speaker 1: Speaking of importance, importance equals T returns information about how much each of the predictors contributed to the final model. In tree equals one hundred, adjust how many random trees to build. This defaults to five hundred, but we're only using one hundred. Our example is very limited, so in my testing, building more trees didn't really seem to improve the results, and it just takes longer to run. Do trace false. If you set this to one or twue, then it returns verbose information for each tree built.
Speaker 1: For any number greater than one, it will give the verbose information for every n trees. So if you're doing five hundred trees and you set into fifty or set do trace to fifty, it will give you ten trees every fifty trees, it will give you an output. But now we have a trained random forest model which describes the classification process to return to the example and the slides.
Speaker 2: You can think of this as being.
Speaker 1: Equivalent to the decision tree with all of the yes no questions filled out. Importantly, the model object is not a raster we can plot. In order to get from the model object to a raster output, we have to apply the trained model using the predict function. Since the model's already trained, we can apply it to both the twenty seventeen and twenty twenty four imagery. So now let's jump back to the slides to look at how we can quantify the land cover change. Here I've laid out another high level overview of the workflow we'll be covering in r As we look at how to quantify land cover change with a change matrix.
Speaker 1: We'll apply the model which you just saw at the end of the last segment, compare the model results for two dates, compute the change matrix, and then talk about how to interpret changes overall. So now that we have the two maps of land cover change in twenty seventeen and twenty four, we can create a change matrix which shows how many pixels of each class in twenty seventeen became pixels of the same or a different class in twenty twenty four. To do this, we'll join the single band rasters for each year into a multiband raster and use the crosstab function.
Speaker 1: I'm actually going to do this in two slightly different ways. The first will return a matrix style table, whereas the second will return the same information in a long format, which is conducive to sorting and a bit easier to read, in my opinion. First, let's look at the change matrix in the typical form. In this case, the rows correspond to the predicted landcover class in twenty seventeen, and the columns correspond to the predicted landcover class in twenty twenty four. It may look a bit complicated at first, but let's just consider the changes in pixels that were classified as water in twenty seventeen.
Speaker 1: Here we see that of the pixels classified as water in twenty seventeen, about one and a half million were classified as barren ninety thousand were classified as forests, one hundred and sixty eight thousand were classified as vegetation, and one point two million remained classified as water. Notice that when something's classified as a change from water to water, we can instead say that those pixels did not change, and all of these A to A pairs lie along the diagonal of our matrix. Since the diagonal of the matrix represents the number of pixels which didn't change or rather were a change from the class to the same class, and the sum across the rows represents the total number of pixels for that class in twenty seventeen, we can very easily calculate the percentage of each class that remains unchanged.
Speaker 1: As I've done here,
Speaker 1: we immediately see that the barren class changed the least, at ninety two point twenty five percent of the pixels classified as baron in twenty seventeen still being classified as baron in.
Speaker 2: Twenty twenty four.
Speaker 1: Vegetation saw the most change, as only thirteen point four to four percent of the pixels which were classified as vegetation in twenty seventeen were still classified as vegetation in twenty twenty four. Referring back to our change matrix. You may also notice that the twenty seventeen vegetation pixels most commonly changed to baron in twenty twenty four, and with only a bit more math, we can calculate that sixty six point three five percent of the vegetation pixels became barren pixels in twenty twenty four.
Speaker 1: Notice that this matrix format gives us a handy from class to class syntax for isolating specific changes between any pairs of classes. The long version I mentioned earlier simply takes all of the information and the change matrix and stretches it out so that each of the possible from class and two class pairs are listed individually. This is particularly useful if you want to filter and sort your data to get the magnitude of change. You could summarize the data further, such as when you're looking for the total loss gain of a particular LC class.
Speaker 2: In this case, I'm doing vegetation.
Speaker 1: Now you can see that we've isolated the overall changes in vegetation measured by the magnitude of both gain and loss, and determine that the vegetation class only lost sixty seven point one percent of the pixels it gained To put that another way, even though vegetation experienced the greatest overall change, it still had a gain of about one and a half pixels for each pixel at lost. We can therefore say that the vegetation class expanded between twenty seventeen and twenty twenty four overall, but areas which were previously vegetation didn't tend to remain vegetation.
Speaker 1: Change matrices give us a really good quantitative insight into the magnitude and direction of change over time, but it's also important to understand where these changes occur in space. We'll return to the slides while I will lay out the process for turning all of this information into a map of land cover and land use change. So we've applied classification to the imagery for both of our dates, and the change matrix gave us some information about the direction and magnitude of land cover change.
Speaker 1: But now that we've answered the question of how land cover is changing over time, we want to map the changes to figure out where the changes occur. Instead of an overview as I provided for the last two sections, let's look at a simplified example. We use simple mathematical and logical operations to compare land cover maps and create maps of land cover change. A simple approach to finding which cells have changed is to use not equal operation. Going cell by cell, the operation checks to see if the earlier and later land cover classes are different.
Speaker 1: Where there has been a change, the output returns true or one. Where there's not been a change, the output returns false or zero. The result is a binary map with the same dimensions as the input, which answers the question where change has occurred. You might want to apply this binary map as a mask over the land cover maps to figure out what types of change occurred in the areas we identified with binary mask. In practice, this is really as simple as multiplying the mask by the land cover map.
Speaker 2: The result is a.
Speaker 1: Change map which shows only the pixels where we detected land cover change and shows what the land cover class changed.
Speaker 2: Two.
Speaker 1: This is very simple to do programmatically, so let's go back to our to see how it's done. Just as we did in part one of this training, I'm gonna use a plotting helper function so that all of our plots use a consistent layout and legend. This is very similar to the plotting helper function in part one, so I won't go over it in detail. Now I can use the plotting helper function to create plots of each of the classified rasters and arrange them side by side, which is what you see here. In the twenty seventeen image, the one on the left, we see a large extent of flooded areas outside of the main course of the river, which are replaced by the barren class.
Speaker 1: In the twenty twenty four image on the right, we also see some significant expansion of vegetation in parts of the forested area to the south.
Speaker 2: Of the river.
Speaker 1: This is giving us visual clues about the strange metrics regarding vegetation we were seeing in the change matrix. Although very few pixels which were vegetation in twenty seventeen remained vegetation in twenty twenty four, the expansion of vegetation in the forested areas explains why there was still an overall gain in the vegetation class. In the slides, I mentioned that all we need to do in order to create a binary change mask is to use the not equal logical inequality operator. So let's do that now and then plot the results, and here we have our binary change mask.
Speaker 1: That's exactly what he demonstrated in the slides with the small toy model follows exactly the same procedure, and following on from the slides, we might be interested in applying that mask back to one or both of the previously classified link cover maps, which is as symbol as multiplying the original map with this new change mask.
Speaker 2: However, the TEA package in our gives a.
Speaker 1: Much cleaner way of achieving the same result, using the mask function, which is much easier to remember, and specifying that we want our mask value to be zero or false.
Speaker 1: Now we can plot both maps using the same helper function we used earlier. By only highlighting the pixels that experience change between twenty seventeen and twenty twenty four, we can get a better idea of the locations where certain changes took place.
Speaker 2: If we think of.
Speaker 1: These maps in terms of the change major, we've essentially visualized everything except for the diagonal of the matrix, which is now ana. We can see in stark contrast, the loss of forest to vegetation and the loss of water to barren, as well as where in the scene these changes are occurring. That map on the right is the same one I had promised to show you how to make at the beginning of this presentation. So for one final time, we're going to return to the slides for a summarine conclusion, and then we'll open up the Q and A session.
Speaker 1: I will say at the end of this document, which will be on the training web page, I've provided some additional details which I don't have time to get into now, about other ways that you can visualize the results and assess the appropriateness of your remote sensing random forest model. So let's review what we've learned today. In part two, today learned how to recognize the importance of training data for supervised classification. Compare K meines and K and N methods for clustering and classification.
Speaker 1: Construct decision trees as used in random forest models. Apply a random forest model to NASA imagery to create land cover land use maps at two different time periods, and analyze both numerically and visually the change in land cover and land use over time. So now let's review what we've seen in both parts of this training. Over the course of this two part training, we've hopefully learned how to access NASA Earth observation data relevant to land cover and land use change mapping, convert NASA Earth observation data into distinct land cover land use classes using supervised and unsupervised machine learning classification methods in the our programming language.
Speaker 1: Recognize the role of classification methods as one part of a change model. During strategy computer a change matrix representing the change in land covern land use between two dates. And finally, create a map in our studio visualizing the differences in lank cavern land use between two dates. A reminder about the homework it will open today following this training and what will be due in two weeks on March twelfth. You can find the homework on the training web page and will submit your answers.
Speaker 2: Via Google Forms.
Speaker 1: You will qualify for the Certificate of Completion if you've attended both live webinars and complete the homework assignment by the deadline. Of course, I've been your trainer, but I want to thank the rest of the r SET team as well. You've been hearing me talk for a long time, but there are many other people who putting countless hours to bring these trainings to you. They're the ones who handle the logistics, the review of the materials, and all the other behind the scenes work to make our set trainings possible.
Speaker 1: You can contact me via email or direct any questions and comments to our set to the r st Gmail address. You can sign up for the rset newsletter to stay up to date on future trainings following these instructions, and here are a couple of links to other resources I personally recommend Geeks for Geeks has a good selection of articles about data science and the random forest algorithm, which covers some of the other details I had to skip over for the sake of time. IBM has a fantastic guide to machine learning which has subsections for supervised and unsupervised models, but also some other types of machine learning that I didn't cover in this training.
Speaker 1: The r Terra package we've been using is an incredibly powerful set of tools for spatial data analysis and has.
Speaker 2: A really good set of tutorials.
Speaker 1: And finally, I want to give a shout out to Josh Starmer's stack quest videos, which are fun and easy to understand videos on statistic machine learning. Whenever somebody contacts me with a question about stats or mL, I checked to see if there's already a stat quest playlist on.
Speaker 2: The subject and send that to them.
Speaker 1: First, and for one last time, I want to thank you all for attending the SARSET training. In just a moment, we'll jump over to the Q and A document and address some of the questions you've submitted. Okay, let's get into the Q and A for part two. So question one was actually a question that we had in the earlier session Session A this morning, but I wanted to bring it up again here just in case anybody else ran into the same.
Speaker 2: The same issue.
Speaker 1: I was storing the multi band HLS data with the get large file storage. It seems that we had so many people wanting to take this training and trying to download the data at once that we had a rate limit, So I went ahead and put the data up on Google Drive. You're welcome to download it from there instead if we continue to run into issues with the get LFS. Question two, what's the difference between this method and Google Earth Engine GEE? Also, is land cover and land use data for Iraq available only for the year twenty seventeen, so this should be equivalent to the ge.
Speaker 2: Implementation of random forest.
Speaker 1: And there may be an already existing land cover and land use data set for Iraq, or you can make your own using hyperspectral or multi spectral imagery using the same process we should today in our or find an example in Google Earth Engine. I know there are some examples out there, one of which I reference in question. For question three with regard to forrest, what classification method should I use in addition to reflectance values if I want to add elevation, aspect, slope, or any other values such as tree type, evergreen, deciduous, Will there be too many variables to consider?
Speaker 1: That doesn't seem like an unreasonable number of variables to consider if you think that those might be important for the landcover type in your study area. For example, if one of the target classes that you're interested in is a plant that only grows on a south facing slope, adding the slope and aspect, or if you have like a highly varied topographic area, I could see elevation coming into play there. You simply would need to stack all of that extra data with your multi spectral bands the RAST and SPRC functions, just like we did in the first part of both sections to bring our data in before you extract the band information for your training data point locations.
Speaker 1: As to which classification method you should use, that's going to be highly dependent on the constraints and the particulars of the study you're looking to do. Could be done with random forest, but there might be better options out there, just depending on exactly what it is you're trying to answer. As I mentioned in the answer to question two. Question four, can we do random forest classification in Google Earth Engine? Yes, and there is an example like linked here from the folks at NASA Goddard who have made a Google Earth Engine app for random forest methods to detect mangrove maps to detect mangroves.
Speaker 1: So it's a very cool tool. You can also find other implementations of random forest and Google Earth Engine for examples.
Speaker 2: Question five.
Speaker 1: How were the locations for the training data set generated?
Speaker 2: Was it done in points on qgis?
Speaker 1: Yes. I used the twenty seventeen imagery as a base map and drop the points on the base map using qgis so that I could see what label I needed to add. That makes it very easy and quick, and then I could zoom in and out as I needed to make sure that my training data points were accurate and that I was capturing a good range of.
Speaker 2: The variability within each land cover.
Speaker 1: Class, which is when I took points for both the clear and turbid water to include in my water class. Question six, what is the most efficient way to obtain a training data set for a random forest model? The gold standard is going to be getting data on the ground through field work and having that tied to a date for which there is a cloud free satellite image. For practical reasons, sometimes that's harder to do than others, so it's perfectly perfectly acceptable to do what I've done here and use high resolution imagery and drop your points on the imagery, just as I described.
Speaker 1: As far as the efficiency of using points versus lines or polygons for homogeneous areas, it's more efficient to use polygons because you're sampling many pixels all of the pixels that are covered by your polygon at once, rather than taking individual samples of individual pixels at a point.
Speaker 2: Question seven. The label classes used in the.
Speaker 1: Training They use the twenty seventeen imagery, but note that the twenty seventeen and twenty twenty four imatry were taken roughly the same time of year, so we can assume that the spectral profiles for each land cover class are similar between the years. That is to say that the vegetation in twenty seventeen should be analogous to the vegetation spectral profile in twenty twenty four, which is why we're able to get away with training the model on data from one year and applying it to two different years.
Speaker 1: What about metrics, How can we evaluate weight classification performance? Again, this is fantastic. I wanted to get into this, but really wanted this training to focus on giving you an intuitive sense of the how and why of classification. There is an additional information section at the end of the part two document where I cover some of the topics and explore some of the available functions in the random Forest explainer package, which I very cleverly had added to the package. Imports at the top of both of the sections, so you should already have it download if you're running the code.
Speaker 1: Question nine, when using the r random forest tool, does our randomly create the training and validation data from the entire day set or is this.
Speaker 2: A manual process? There are evaluation.
Speaker 1: Metrics that are inherent to the way that the random forest model builds many trees using subsets of the training data points and subsets of the variables for each of those training data points.
Speaker 2: However, if you wanted.
Speaker 1: To do a post classification assessment, you could make say a seventy thirty split on your training data, but you would have.
Speaker 2: To do that manually.
Speaker 1: Some of the evaluation metrics that are already available to us are things like the out of bag error if that makes sense. If not, there is more information in the Random Forest Explainer package help and.
Speaker 2: In the additional information section Question ten.
Speaker 1: What would be the best way to do a multi year analysis of land cover in the same area in several different times months or years. As I mentioned briefly, when doing direct comparison, it's important to make sure that the images you're comparing are in the same part of the phenological cycle. As you can imagine, green vegetation has a significantly different.
Speaker 2: Spectral profile than vegetation that.
Speaker 1: Is sinescent or you know, in the autumn as it were.
Speaker 1: But you can train a model for each each pair of months if there is significant difference throughout the year, throughout the phenological cycle. Otherwise, what you've seen today works year to year as long as as long as you're keeping track of the time of year and the part of.
Speaker 2: The phenological cycle. You're looking at.
Speaker 1: Reading question eleven. I'm not sure if this is within the scope of this webinar, but can you talk about the relationship between study scale and resolution of images? For example, if one wants to examine the changes in vegetation in the home range of an animal species that lives in a forest in the DRC in the last twenty five years, pared with changes in the vegetation and the African continent during the same period, require different resolutions.
Speaker 2: Yeah.
Speaker 1: So the issue you're going to run into here is that as you move to lower resolution lower spatial resolution satellite imagery to deal with larger study areas, such as a continent scale, you're going to get more mixed pixel effects, which is to say that a single pixel might contain multiple target land cover classes.
Speaker 2: There are some.
Speaker 1: Spectral unmixing techniques that can help get around this, but in general you would prefer to be able to use the same resolution at both scales, and even better if they're on a commonly aligned grid. Is it possible to have the R script used for the demo? Yes, the R script, the R markdown files and the rendered HTML versions, which are just a little nicer to look at. All of those for parts one and two are available in the GitHub which is linked there and also on the training web page. Okay, and it seems that questions are already slowing down.
Speaker 1: I'm actually going to scroll back to the questions from part one and see if there's anything that I think might be important to.
Speaker 2: Bring up.
Speaker 1: All of these questions will be posted, so don't worry. Don't worry if I bring something up that you haven't seen yet. Oh yes, the other thing that I would like to bring up, which was question thirty eight in the first session, which satellite data set is best for land use land cover assessment from nineteen eighty to twenty fifteen. What do you recommend and why? This is going to be dependent on your study area. But I do want to point out that it is best practice to ensure that you're using the same sensor for both your previous and current or each of the time steps in between, for your land cover and land used analysis.
Speaker 1: Random forest will only work if the bands are exactly as they were in the training data. So if you were to say, train your model on landsat and then try to apply it to Tanager data, which has a different set of bands, the random forest model would fail, So that is a consideration when working with these longer term projects. Given the working that spatial data in r can be computationally intensive, what you recommend for this type of analysis, specifically, what spatial resolution and approximate raster size and number of pixels would be reasonable to handle on a standard personal computer.
Speaker 1: This is something that has been greatly improved in just the past few years with the Terra package which we used in the demonstration today and on Tuesday. There is the capability of doing on disc processing, which means that you're less limited by the RAM that your personal computer has. I have done all of this on a standard consumer grade laptop and these images are roughly on the order of half a gigabyte, but you could reasonably do images up to say five gigabytes. It's really just depending on what makes sense for your study area, and there are always ways that you can go about letting the process take longer or spreading it across multiple cores to conserve your computational resources.
Speaker 2: Question fourteen.
Speaker 1: My supervisors suggested to use the landsat and dem is it possible to lay them out together for LULC analysis. Yes, I don't recall which question that was, but the process would just be to stack your rasters before.
Speaker 2: You do the training data extraction.
Speaker 1: So you would take your multi band raster and combine it with the DEM data before you do the extraction, so that you're labeled. Extracted training data points contain all of the bands as well as the DEM value. Question fifteen, how does the spatial and temporal resolution of NASA satellite imagery affect the accuracy of land use change detection? I will take this in two parts because the answer for spatial and temporal resolution are slightly different. The spatial resolution, particularly when dealing with legacy products that have lower spatial resolution, you do run into the issues of mixed pixels, where a single pixel might actually represent a portion of one land cover class and some some portion of another.
Speaker 1: So it's always best to understand the scale at which your your landscape is self organized. That is, the minimum pixel size you need to be able to distinguish one land cover from another.
Speaker 2: In terms of the temporal.
Speaker 1: Resolution, You're not only dealing with the temporal resolution in terms of revisit time, which, depending on factors like cloud cover, might limit your ability to get accurate imagery at exactly one year or two years on, which is necessary for addressing the seasonality of things like vegetation, but also the period of record. So if you're looking to go back a very long time, your or limited by what products have been available for that long And the further back you go in time, the lower the spatial resolution tends to be, so there's sort of a trade off there.
Speaker 1: And just a reminder, all of these questions will be up on the training web page within a week after I've had time to go through and clean up and answer everything more thoroughly.
Speaker 2: And yes, thank you.
Speaker 1: I see in the chat Elizabeth, the link on slide thirty nine does appear to be incorrect, and that is the correct link. We'll have that fixed on the upload to the training web page. But yes, thank you for catching that. It seems I copied the same link twice.
Speaker 2: And since it.
Speaker 1: Looks like there are no more questions coming in, I think we can go ahead and call it a bit early. I do want to say one more time, I really appreciate everybody attending both these sessions. Don't forget to do the homework, and we'll send out that certificate of completion.
Speaker 2: Thanks again, everyone,
Podbean