Analyzing OpenStreetMap data
Intro
Geographic data is not free to most of the world, so generally these mapping companies are tasked to map for government agencies who will then sell the data back to the companies or elsewhere. This is terrible because taxes are used to pay for the mapping service, but then the user will have to pay again to get a copy of the data.
The reason behind the project is to find and use more open geographic source programs and software so that people do not have to spend money to conduct geospatial analysis. The project will focus on analyzing OpenStreetMap (OSM) data using raster-based algorithms to find the least cost path from point A and point B using GRASS GIS. |
Approach
The approach can be broken into three categories OSM, QGIS, and GRASS.
The first step of the project was to verify and possibly map data in OSM. the type of data that would be needed for analysis consisted of polylines such as residential roads, undivided roads, divided roads, urban freeways, and rural freeways. The two points that were used was a house in Lee county, North Carolina (1916854.758, 598371.924) and a facility located in Moore county, North Carolina (1876707.890, 513807.245). However, all that was needed from OSM were the polylines because the coordinates would be saved and used later on. Once all the roads were verified, attribute information had to be entered. The most important was type and speed limit. The speed limit was generalized of the North Carolina Speed Limit website. After entering all the associated field names into OSM the data was ready for download.
The second category of the project involved using QGIS. QGIS was used versus ArcGIS because the open source software is able to download OSM data directly through plugins. To get OSM data into QGIS was a three part-step which was download OSM, import topology from XML, and export topology to spatialLIte. Once the data was exported a query had to be built to only select the polylines that were going to be used because the exportation of the spatialLIte exports all the information from OSM database. Lastly, after having the road layers that will be used the layers were reporjected from WGS 1984 to NAD 83. Now the data to be analyzed.
The third and last category of the project involved GRASS GIS. First the OSM data created in QGIS had to be imported into GRASS using v.in.ogr as moore_cnty. The region was set to moore_cnty with a resolution of 100 ft because the projection of the mapset was NAD 83 ft. Raster calculation was used to set the off-road values to 2 mph by using r.mapcalc and naming the output roads_speed. Then to assign the travel time across each cell in hours 0.01875 was divided by roads_speed. This raster would be used to determine the cumulative cost surface from the facility in Moore county by using r.cost. Lastly, to find the best path from the house in Lee county to the facility in Moore county r.drain was used.
workflow
Results
The distance was found by multiplying 100 by 1035, using r.univar, which came out be approximately to 19 miles, but the GPS found that the distance was 22 miles. The reason for the 3 mile difference is because at the beginning of the path the route travels off-road versus traveling up the cul de sac and taking a left out of the neighborhood. Now the time was figured out by using r.univar and the mean time came out to be 0.65123 or 39 minutes. However, the GPS time came out to be 26 minutes. The reason behind the difference is simply because the speed limits for the project was generalized versus what they actually are. Most of the roads in the project are entered as residential, but some residential speed limits are not always 35 MPH, but sometimes 45MPH.The slide show demonstrates the r.univar being used to find the distance and time.
Reflection
The project open me up to other software in the GIS world which were mostly open source. This was useful because I found that most open source software, which are free and don't require a license, are just as powerful as ESRI products. Secondly, I found that open source software are able to more than what ArcMap is capable of.