• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
North River Geographic Systems Inc

North River Geographic Systems Inc

Geospatial Problem Solving

  • Home
  • About NRGS
  • Training
  • Blog
  • Resources
    • QGIS Tutorials and Hacks
    • GDAL Tutorials and Hacks
    • PostGIS Tutorials and Hacks
    • GRASS Tutorials and Hacks
    • OSM Tutorials and Hacks
  • Services
    • Support and Services
    • Tennessee NG911 Address Server
    • Forestry Database Services
    • Conservation GIS
  • Portfolio
  • Show Search
Hide Search

Distance Bands and GRASS GIS

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

Primary Sidebar

Calendar

June 2022
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
27282930  
« Apr    

What we talk about

addresses ArcGIS ASPRS Athens Atlanta Beer Cartography Chattanooga Community Conference Data Do Some Good Education ESRI Forestry FOSS4G foss4gna Fulcrum gaurisa ga urisa Gdal Georgia GeoServer GIS GISP Google GRASS Lidar MAGS open source OpenStreetMap osgeo OSM postgis Python QGIS raleigh Rambling Small Business Tennessee TNGIC Topology Training URISA usvi

North River Geographic Systems Inc

  • Home
  • About NRGS
  • Training
  • Blog
  • Resources
  • Services
  • Portfolio