Invariably when you’re using Open Source GIS you end up with those questions – How good is it? What can you do? It’s free…it can’t be that good…can it? Well – I’ve been working hard with Open Source GIS in it’s every form. PLUS – I don’t have all those nice extensions for the other piece of software. In this case – Network Analyst.
So the client had points. The client needed to know distance bands from those points. I had been experimenting with about everything – Postgis, grass, qgis…..whatever. I had decided I could do it in postgis…and I probably could….but I would require more “learning” of sql.
GRASS.Â I remember when I started using ArcINFO back in the 90’s someone would ask “what do you do?” – I explain. Then they would go -Â “I used GRASS in College”. We would laugh. This joke continues constantly until a few years ago. Well – if you haven’t taken a look – Grass is now up to Version 7. You also get GRASS when you install QGIS.
GRASS is a bit different than QGIS. You import the data into your workspace and you work with vector or raster data. In this case I found a tutorial. You can create networks with Grass. You can make isochrones.Â You also have command line options for everything and menus – so the point and clickers are good also.Â You have an entire set of menus devoted to networking.
So the very short story will be (since I linked to the tutorial) – you can network your data. You can develop different versions of this process from distance to time to shortest paths. GRASS 7 is almost “plugged into” qgis. So this will be a bit easier soon – but it’s doable now. I will also skip over a few things:
You start with this: roads and POI (Points of Interest)
- Open GRASS.
- Import your vector data into GRASS by going to File -> Import Vector Data -> Common import formats. Import the data you want to network and the point data.
- I’m going to use the command line version of the commands. Grass has a very nice interface to either click, search, type, or use python for your commands.
- Build the network: v.net –overwrite –verbose input=roads@rjhale points=POI@rjhale output=network operation=connect thresh=100 . Â Simple. The one thing you need to know is that thresh makes sure your points connect to your road network – anything that is 100 feet or less will snap. Also notice you’ve created a new layer called network.
- Look at your network metadata: v.category network op=reportÂ . Â Notice you have x number of POIs. I just use this for a sanity check. Hopefully you know how many POIs you have.
- Run the command: v.net.iso –overwrite –verbose input=network output=network_iso@rjhale ccats=1-7 costs=200,500,600,800 . So here you are making a new network with breaks and categories for each of the distances. For me cost was distance in this example.
Finally – because this is all going to end up in QGIS – I exported it out and symbolized the data.
I talk a lot about open source software. The killer on this one – it’s not *really* tied into QGIS…or PostGIS….it’s in GRASS and people will at times run the other way. GRASS is older software – it’s capable software but the interface is a bit of a throwback to a more fun time in GIS. Network Analyst is sexier – BUT – does that really matter if you need an answer.
Things you need to worry about:
- snap your data – make sure everything is connected. I didn’t the first time and I had a lot of breaks and oddness in the grass analysis. Grass is a topological piece of software. It likes for things to be snapped and clean.
- This data had originally went from File based geodatabase to postgis into grass. I *sinned* at the end and went to shapefile.
- Give yourself time – GRASS is different than what you are used to – but it works and it’s fast.
Anyway – that ends a short discussion on networking in Grass. I may talk about isochrones next. So if you’re a small group of emergency service providers and you are scraping together cash to buy a Geographic Information System……hopefully by me putting emergency service and GIS in there you will stumble upon this and save your self some money and maybe increase your aggravation just a hair. It’s doable though – and you might just do something very fun and cool with some free software.