[GIS] How to get a city road network as line segments

geometric-networkqgisroad

I want to have road-network information of different cities(New York for example) in the format of line segments(i.e. every road is represented by segment(s)). I want this for experimental purposes in my college project. I have looked into using QGIS however I am unable to get what I want as I am totally new to the platform. To be precise the question is as follows:

Input : A city name

Output : File containing a list of segments which together approximates the road network of the input city.

I have installed the openlayers plugin in qgis, but as I am totally new I don't know how to use it and where to start. Any pointers will be appreciated.

UPDATE:

So far I was able to get upto a road network in QGIS. This was done as follows(e.g. for a city in India):

  1. Downloaded India Shapefile from gadm.org

  2. Extracted the city I wanted into a new shapefile(Select city from attribute table, and do a vector clip)

  3. Got road shapefile for India from http://download.geofabrik.de/asia/india.html and again did a Geometric intersect with the shapefile obtained in step 2. Saved this as a new shapefile.

Now there is only one hurdle remaining. I have a road network for a city in my hands as a shapefile. How do I convert the road network into co-ordinates for line segments which approximate the network(i.e. each straight segment in the shapefile is represented by two co-ordinates, I want all these co-ordinates).
Any pointers on this would be really helpful.

Best Answer

It's not going to be as easy as you expect.

  • Firstly you need a data source. Your best option for this is OpenStreetMaps' Database. But if you take the entire world, the data is in 100s of GBs.
  • Secondly, you will need a source for your cities. You will need a polygon source, which indicates the boundary of the city, so that you can then select the streets inside it. However finding this source is going to be an hard task. I know of no source that will give the boundary of each and every city in the world. You will have to integrate and collect this data yourself, from various sources.
  • Once you have these two, you will first have to get the boundary of the input city, and then select the roads that lie within it.
Related Question