• Skip to primary navigation
  • Skip to main content

North River Geographic Systems Inc

Spatial Problem Solving

  • Home
  • About NRGS
  • Blog
  • Resources
    • Guides for using TN Data with QGIS
    • QGIS Resources
    • Tutorials
  • Services
    • Support
    • NRGS Geo Suite
    • Tennessee NG911 Server
    • Data Analysis
    • Training
  • Portfolio
  • Show Search
Hide Search
You are here: Home / GIS / Distance Bands and GRASS GIS

Distance Bands and GRASS GIS

rjhale · Jul 21, 2015 ·

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)

Selection_193

  1. Open GRASS.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.

Selection_194

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. Selection_195

Share this:

  • Email
  • Print
  • Twitter
  • Facebook
  • Pocket
  • Tumblr
  • LinkedIn
  • Reddit
  • Pinterest
  • WhatsApp

GIS, GRASS, postgis distance, GRASS, network, poi, road

Reader Interactions

Trackbacks

  1. Distance Bands and GRASS GIS | Geo-How-To News says:
    July 24, 2015 at 2:26 pm

    […] https://www.northrivergeographic.com/archives/distance-bands-and-grass-gis […]

Contact

  • (423) 653-3611
  • info@northrivergeographic.com

Copyright © 2019 · Monochrome Pro on Genesis Framework · WordPress · Log in

  • Home
  • About NRGS
  • Blog
  • Resources
  • Services
  • Portfolio
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.