Download GIS Shapefile Road Network for Any Country using Python Package OSMnx

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome to my GS Learning Channel in this video I'm gonna show you how to install osm NX that is a python pack list and that can be used to download openstreet Road network data and building data if you watched my previous video I showed you how to install mini conda and how to create a folder within that folder how to install Jupiter lab now I will use that folder to install open python package so let's start first open Anaconda prompt and this is the folder I'm going to activate so in order to activate I just type here activate osm data this is the folder name then enter now in order to install Voice mnx python package you have to just type here install then hyphen C all the hyphen codes then o is M and X after typing this press enter so these are the all file going to be installed total size of these package is 456 megabyte in order to start the process you have to just type y then press enter okay our python package osm NX is installed now we can use it to download openstreetmap data in order to do that first you have to open Jupiter layer so type here Jupiter lab then enter here is the Jupiter left and now I will create a file new notebook in my desktop select the kernel Python 3 select it and you can also rename this file let's say osm data now first you have to import that package in order to import that just type here import or SM NX you can short this as ox y sorry then shift enter we can download openstreetmap data in several ways here I will show you three method first one is um download the data using the location name program then you have to type this code Ox Dot craft from place you can provide any place name here let's say Kuna Bangladesh you can now plot this road in order to plot that you have to just type Ox Dot plot underscore then you have to provide this variable root one then press shift enter so here is the road network of cool now Bangladesh now I will show you how we can use latitude longitude to download this type of Road Network so for that let's create a new variable row 2. then you can type this code webs graph from point and now we can get the golden information from this one dot IO here name now you can simply put a point here and get the code in with information we need this coordinate copy this and paste it here and copy the second one and paste it here now we have to provide that this parameter dist is equal to let's say four kilometer and now we have to provide another parameter that is Network network type is equal to drive you can also use this one as a network type for example Drive service work bike all all private if you want to download all the road including the private road that you have to use this all traffic now we can easily plot this root 2 in order to plot that simply type oh Dot plot underscore graph and here type row 2. this one then shift enter it will be network type now shift enter so what it will do it actually download the root Network Within uh four kilometer or four thousand meter distance from this point so here is the root Network now I will show you another method where you can download this road network using your polygon okay so let's type new variable Row three then you can provide this code Ox Dot graph from polygon before that I have to save that polygon you can easily download the polygon from here let's say you want to download the road Network you want to download the root Network within this polygon so you can use this polygon to download that first create this type of polygon then save it as shift file here it is let me paste it here now unzip it delete this one I do not need this point I only need the polygon click this but now we can use this polygon to download root Network first you have to import geopinder so I am going to import that import jio expanders as GPT okay and then shift enter now let's create another cell let's read that polygon click let's name the variable as poly polygon is equal to you have to type GPD that means you open the DOT read underscore file now add quotation and you have to provide the file location here copy the location and paste it here and then copy the file name here it is copy this and paste it here okay now shift enter okay let's create another cell above you can now plot this polygon so let's plot this polygon Dot plot then shift enter so here is our study area let's check the column information of that polygon in order to do that type polygon Dot columns then shift enter we need these geometry information now I have to create another cell let's say and create a new variable let's say study area study area is let's copy this one polygon then within the quotation we use this column dot eye Dot and 0. now let's plot this study area copy this and paste it here so here it is now we can use this study area polygon copy this and paste it here graph from polygon and then I have to provide a uh the network type parameter actually this one this is the network type I'm just copying that and paste it here so here is our study area polygon here is our needle type that is Drive now we can easily plot the root 3 in order to plot that simply type here Ox Dot graph Ox Dot plot underscore graph and provide that variable Row 3 then shift enter so here is our road Network that is within this study area polygon now you can easily save this in order to save this type this code Ox Dot save underscore graph underscore shift file then you have to provide this road variable and as I want to save this as shift file so I am providing this here and then I have to provide the file path so I am typing here the file path is equal to then our double quotation and now I have to provide the file path data let's create a new folder here it's a new wrote copy this path and paste it here paste it here and then provide the root name let's say Row 3 dot SSP you have to provide this shift file extension and after that provide this file path here and then press shift enter you can also use this one save draft jio package in order to download this as geopatisfied now our file is downloaded as shift file here it is you can easily use this in arcgis or qgis and do further analysis the RTA is just drag and drop this shape file this is the edges that means the root line and this is the note so here is our road Network so this is how you can use osm NX python package to download openstreet Road me plot data using polygon in my next video I will show you how you can use that package to download billing data thanks for watching this tutorial please subscribe for more tutorial like this
Info
Channel: Explore RS & GIS Tutorials
Views: 4,620
Rating: undefined out of 5
Keywords: Explores RS & GIS, Explore RS and GIS, gis, online class, arcgis, osm to shapefile, osm to argcis, .osm to shapefile, openstreetmap (software), download osm, download osm data to shapefile qgis, qgis, osm data, osm to shapefile qgis, openstreetmap download shapefile, download shapefiles from google maps, osm download, arcgis desktop, Download GIS Shapefile Road network for Any Country using Python Package OSMnx, osmnx python install, osmnx
Id: jpxk3J70zSA
Channel Id: undefined
Length: 13min 51sec (831 seconds)
Published: Sun Mar 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.