Image Classification Map Tutorial - ArcGIS Pro

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
that's Kevin with Matt practical so tonight we're gonna be working in arcgis pro doing an image classification so here's the setup we've got an ape image here and it's been clipped to just an area of the golf course in east Missoula and the golf course is called and said what's the acreage of all these greens all this grass so we can order some fertilizer well you could hand digitize around all of the fairways and greens and and then calculate the geometry or we could use the image classification tools to get us there so I've set up an art Pro project I send you out to the State Library and if you just type in Napier for the National Agricultural image program and hit Search it'll take you to another screen and on the historic tab here we're gonna go down to the 2015 nape ortho photos you could go for the newer stuff the 2017 has some holes in it because of clouds and such and the 2019 still hasn't all been processed so the 2015 is the the most complete dataset so you're gonna click on that and then download data and eventually it'll bring up this map that shows you all the different tiles these are one degree by one degree tiles for the whole state of Montana you can zoom in and down here is our humble little home of Missoula actually we can go all the way in until we see campus so there's the University of Montana right there and just east of the university is the Country Club golf course right there so this is tile number 14 21 if you actually click on the name it'll give you the download image and you just download that it's a mr. Sid format it's kind of an older image format but arc can open it right up okay so I've already done that and close these out now and I've already put it into a raw data folder that I created so I'm just gonna add the data go into my folders image classification in my raw data there's that 1421 dot SID we'll open that guy up maybe oh it's thinking about it it's pretty big tile right so it covers a huge area which is why we're gonna clip because otherwise it's just too big we wouldn't want to do image classification on the whole thing because it would take forever and would slow this demonstration tutorial way down like it is right now huh wonder what the problem is I'll try and add it again no no it's working it's thinking maybe if i zoom out come in there we go okay so there it is right now the whole thing I think is in this auxilary web Mercator so I'm gonna go to my map properties and yep go to my coordinates and actually I've already done this before so one of my favorites I should have montana state plane so we'll go ahead and hit that there we go great and then zoom in down to the golf course where we're gonna work we can do a couple things to our image so if you click on the actual image in the table of contents and then go to appearance you can resample type go to bilinear that'll smooth it out a little bit stretch type I usually leave it in the percent clip and that'll give us a decent look and it's a little bit whited out but once we clip it out it'll be a little bit better so and then I'm gonna turn off the background streaming basemap alright next thing I'm gonna do is go over to my catalog view and inside my geo database for this lab I'm gonna go ahead and make a new feature class and over here I'm just gonna call it my clip and it's a polygon that's great if I go to next and eventually I can go ahead and set it so I'm gonna set it to my favorite that I have up here which is that Montana state plane there we go and then we'll just finish it and it's just gonna make a blank polygon layer but then I'm gonna use the editing tools to to create a circle to clip out the the golf course by so did it work let's see here yep there it is right there okay back to my map okay this looks bad what if I change my stretch type to stand dev that look any better yeah it's all a little bit whited out let's see about Ezra Ezra give us a nice look not too bad well that's gonna change soon as we clip it so I'm going to add my blank clip polygon it's inside of my database say okay and I'm gonna change its symbology by double-clicking on it's a little symbol here go over to properties and make this thing have no color and we'll go with the line color something red maybe yeah there we go and apply and you won't see anything because it doesn't have any features yet but now so here's what we're gonna do it so I'm gonna highlight clip over in the contents I'm gonna go to the Edit tab up here in the menu and then I'm gonna hit create and it's gonna bring this up and then if I select clip over here I should get some tools that show up and I'm just gonna grab this circle tool right here so the circle tool is it starts from the middle so I'm gonna try and kind of estimate the center and pull it out till it goes for the whole golf course covers the river a little bit and then let go and double click and it'll give me my circle and it's selected right now so I cut off a little bit of this fairway in green right here so there's another tool up in editor it's called move and I can just move this guy down a hair got a click on it maybe twice there we go and try and get everything go over a little bit a little bit down so you just need a little bit of the river but you want to get all of the greens and then click off when you're done so that looks pretty good super and then you're gonna save it so up here on the editing toolbar and hit save yes I want to save these edits great alright so now we're done with this create features I'm gonna go back to map over here in geoprocessing now I'm gonna find the extract by mask tool that's how you clip raster's since I've already used it it's kind of showing up but you could search for it so I'm just going to open that guy up and we're gonna clip the original Syd image by the circle that we just created all right so the input raster is the 1421 mr. Syd the feature mask is our clip we're gonna stick it into the geo database and I'm just gonna call this thing the golf image and it probably be better if I could underscore in between there we go super and then under the environments I'm gonna make sure that this thing goes out as the current map net 83 state plane so back to parameters and we'll run that should be pretty quick this is just going to make it a lot easy for us to run the classification tools all right there we go now I could turn off the original one and I'm just working with my new golf image and if i zoom in so there we go so what we need to do is create training fields that look at the spectral signature of all the different veg and water and dry grass in this image so if you have the image selected over the table of contents and then go to the imagery tab up here it brings up a whole bunch of tools I played around with the classification wizard I wasn't super satisfied with the results it give me a lot of intermediate steps and I think we can just do it easier with just going directly to the tools so under classification tools there's a number of options segmentation is one way to classify the image the training samples manager is really what we're after that's the first step and then we'll come back and use this classify tool here so we'll open up the training samples manager and I'll go ahead and put that out there permanently and stick the geoprocessing back in okay so it comes in with a schema which is kind of like a template of your different land cover classes and the default is the national land cover data set we're going to make a new one so I'm going to go to create new schema there you go and then if I right-click on it and go to edit properties I can name it so this can be you know our training schema and I'll hit save great and then from there I can right click on it again and say add new class and my first class is going to be the grass some people call it greens whatever and then value one and then the color that it's going to show up on screen which would be a bright green and hit OK all right and then you're gonna make classes for a number of different things so I'm gonna also do one for the dry grass so I'm gonna right click and add another one this is gonna be dry and its value would be two so the values don't matter much they just need to be individual for each one right and I'll go with like a nice brown okay and so you'd build this out by creating classes I'll make one more just for for the heck of it cold water and actually I ended up making one for trees and also impervious surfaces like roads and so forth and the water would be like a bright blue and there we go okay so then you select the class that you're interested in and then choose which one of these tools you want to use to start sketching so I'll just go with the standard polygon tool and what you want to do is zoom in on your image and take your time and actually whatever reason that's not actually drawing it let's try one of the other tools how about this freehand tool oh there we go so the freehand tool lets you draw you just have to be really careful you double click to stop it but that you don't grab any pixels of things that aren't in the class you want so I'm working in my grass class but I don't want to grab any of these sand trap pixels right so I can go ahead and draw one here and you need at least five of them but I would say in an image like this it'd be a good idea to go ahead and put one on each one of the greens alright so that one I might have gone down into the dry grass a little bit and that's the last one I created so I can just select it and delete it if I think that I made a mistake and even though it has a kind of a ghost image it's gone so I'll zoom in do a few more of these guys right and then once you have a number of them so I would maybe have 10 or 15 you would select all of your grasses and hold down shift and then this little tool right here is gonna collapse them all into one group so there you go and then maybe you would choose your dry grass and start digitizing those right so what you're doing is creating training samples so that the computer can look underneath at the pixel values and say everything with this signature represents dry grass everything with this signature represents the the green grass right so it's good to just move around on the image and grab a few of these things right and then of course put them together once you once you have a number of them okay zoom out so in order to use them though then you would have to say so you're gonna have to save the schema alright and the schema is gonna get saved to an output location which is not the geo database so it's just gonna go in the folder and hit save and then the actual the training samples those will get saved as a feature class that you can put inside so these are just gonna be my trained samples okay now I'm not gonna go through the whole process of doing them all I'm just gonna use an existing one that I have so if I go over here and turn on these training samples you can see that I made samples that covered a lot of different water sources all of the greens and green grass impervious areas over the roadways in some of these parking lots all right the dry grass so on and so forth so we're going to use those to help us identify the the classification schemes okay all right so once you're done with all that and go back to map get my regular tool and now I'm going to select golf so whatever image you have selected over here when you go to imagery classification tools classify that's the one it's going to work with so image classification it's going to work on the golf image under the classifier you have multiple different options support vector machine is the one at the bottom then you've got random trees those tend to work better if you were to run like segmentation or something or maybe an NDVI but I found that maximum likelihood works the best at least for this this run you just have to experiment and then there's this ISO cluster which is totally unsupervised you don't even need to do training samples for that one you just let it run and let the computer try and classify every pixel that's in the image and put them into classes you tend to have a lot of different classes if you run that one so we're gonna go with maximum likelihood we're going to choose our training samples all right we're not going to use the segmentation and then we're gonna go ahead and put it into our indoor geo database as a class image it's gonna create a raster right and then it's gonna also output a definition file for how it looked at the different spectral signatures underneath our training samples and you could use that to run on another image that's of a larger extent okay then we're gonna hit run and see what we get so it's training right now it's looking at all those pixels underneath each one of the classes and there we go okay I'm gonna turn off my classified my training samples and that's the classed image so we've got water we've got the trees they were down on the other side of the freeway the freeway itself the dry grass and then all of these greens they represent all of our areas that we want to spread fertilizer inside the golf course okay so this image that it creates actually has an attribute table unlike some rosters so if we open it up we can actually select just the greens I'll close it and you'll see those are selected on screen and then I'm gonna go back to my geoprocessing environments here and I want to use this raster to polygon so I'm going to convert this raster image to a vector polygon so that I can create a field and then measure the geometry and because I have just the green selected it's only going to export those so I'll get that tool going the import raster is going to be this class image the field that I want anyways is going to be the class name I'm gonna let it simplify polygons but then I'm just gonna name it and this is gonna be my my greens all right the simplified polygons doesn't do too much this create multi-part features this can really confuse people if you check it it creates a single feature for each class if you leave it unchecked it actually creates multiple parts so and we'll run that great so it's finished I'm gonna go back to map clear all my selections I don't even need my class image on anymore so there we go and then let me change the symbology on these greens and I'm gonna go with no color and I'm gonna go with an outline color it's something different like yellow bump it up you'd apply okay so there we go it pulled them pretty good there's a little bit of noise but we can kind of fix that so if we grab my selection tool and I'm just gonna hold down shift and go around and click on the greens and select just the ones that I know I want to measure so we'll just go real quick through this image oops I don't want to do that what's going on there interesting there we go and then there's a couple little like putting greens and so forth and driving ranges you're gonna grab those and you can see it's a little bit messy you could start an edit session and go in and fix this up and get maybe even a cleaner vector but this is just a rough estimate we're just trying to avoid having to hand digitize every one of these things and if you're ordering something like fertilizer you're always going to be doing some overage anyways probably about 10% so these little areas where the grass goes in between the houses and the Country Club and stuff that's okay but you could clean it up if you wanted to so maybe you got a couple down here the whole reason I'm doing this is so we can delete all those extra little pixels that definitely aren't part of the greens so I think I've got just about everything I wanted yeah oh there's another little couple of putting greens right there grab those okay great and then I'm going to open up the attribute table maybe there we go and then in the attribute table there's this nice switch so it'll switch the selection so I'm going to hit that so that just switched the entire selection to all the things I don't want and then I'm going to hit delete and they're gone and close that I'll have to go to the Edit tab and save my edits yes super and so now I've got a pretty decent set of Greens right so there's still a little bit extra grass in between the houses and so forth but like I said it's okay to have a little bit over if you're making a big order for fertilizer now of course because we're dealing with a golf course that's right next to the Clark Fork River they're gonna have to use some organic fertilizer we don't want the runoff to be highly toxic for all the nice trout in that river okay and we're gonna open up the attribute table one more time and you've probably been here before but we'll just go through it had a field and its name is gonna be acres and we're gonna go with a double as far as the data type the reason I do that is so I don't lose too much to rounding hair and then over a numeric instead of none I'm going to choose numeric and then change the decimals to to say okay great and then you got to save that one and then we're done with this field editor yes and back here now we have an acres filled and we right-click on that guy and go to calculate geometry it'll bring up that tool so target field property is going to be area the area unit is going to be acres and the coordinate system is going to be the state plane which is the current map there we go and we're going to hit run and there we have it so we right-click on that field now for acres and go to statistics and it's gonna make a little chart for us which I don't necessarily need but what I'm really after is the properties which show up over here and the sum of all of those greens is about 92 point eight two so we call it 93 acres and if I was making this order for fertilizer I'd just round that up to a hundred all right we have a little bit of extra from some of the messy vectors in there but a hundred acres worth of fertilizer would more than cover the project and there's nothing worse than running out when you're almost done with the job right so close that out and close this guy out so there we have it so really quickly we've managed to use the imagery tools to classify this image and and pull a measurement for these for these greens on the golf course pretty simple and not too painful all right if this helped you in any way and you enjoyed the video please like it down below and subscribe to the channel that'll help me out and that's all for tonight take care and we'll see you next time
Info
Channel: MapPractical
Views: 13,987
Rating: undefined out of 5
Keywords:
Id: 6rWKle3DrDU
Channel Id: undefined
Length: 20min 48sec (1248 seconds)
Published: Wed Apr 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.