[Fwd: [GRASS-user] r.cost vs. costallocation (arcgis)]

António M . Rodrigues amrodrigues at fcsh.unl.pt
Sun Mar 14 19:51:24 EDT 2010

I'll try to explain the concepts used (sorry for not being clear in previous messages)

Cost surface: input raster map whose cell category value represent cost (from r.cost). Example: time 
spent to cross a given cell, depending on slope, road type, etc.
Accessibilty surface: a raster containing the cumulative cost of moving from each cell in the study 
area (whose value is not null) to a set of chosen targets. For example, I have used this methodology 
to calculate travel distances to the nearest hospital.

Allocation surface / grid: a raster whose value of each cell is the code of the nearest target. Example: 
If the possible targets are hospital 1 and 2, each cell in the allocation surface will contain values 1 or 
2, depending on which is the nearest hospital.

I use this "cost surface methodology" in cases where the road network I have is not complete 
(missing regional and municipal roads), hence making it impossible to calculate time distances from 
rural areas to the nearest "target" using network analysis.

The "allocation surfaces" are essential when I want to cross demographic data (from census tracts) 
with time distances. It is important to know, for example, for a given hospital, how many people live 
5 minutes away, 10 minutes, etc. Of course the allocation surfaces are only important when I have 
multiple targets (ie. hospitals)

I have used already r.cost and it works fine (slow, but that's no susprise given the raster resolution 
and the size of the study area). My problem is that r.cost only outputs the "accessibility surface" (not 
the allocation grid). Now, intuitively, I would say it should not be too difficult to get the code of the 
nearest target, since r.cost "must know" this information (the algorithm must chose the nearest 

I was surprised r.cost didn't provide this information (allocation surface), since this is quite standard 
output when using this methodology with arcinfo (using a function called costdistance); but yes, I'm 
quite sure there must be a way of doing this in GRASS.

Any help would be greatly appreciated.

On Sun, 14 Mar 2010 22:16:39 +0100, Paolo Cavallini wrote
> >> From: António M. Rodrigues <amrodrigues at fcsh.unl.pt>
> >> To: grass-user at lists.osgeo.org
> >> Subject: [GRASS-user] r.cost vs. costallocation (arcgis)
> >> Date: Sun, 14 Mar 2010 13:21:14 +0000
> >> Cost distance and costallocation (arcinfo and arcgis) output two surfaces: an accessibility and 
> >> allocation surface.
> >>
> >> For verious reasons, I need both.
> >>
> >> In GRASS, I had a look at r.cost, r.walk r.watershed and r.drain, trying to find a toll which could 
> >> an allocation grid based on a cost surface. From what I could see, none of these tools will do.
> >>
> >> I find it hard to believe that:
> >> 	1. No one have had this problem before using GRASS,
> >> 	2. there is no solution using GRASS.
> >>
> >> If someone, anyone, could point me in "any" direction, it would be greatly appreciated. Even 
> >> something like: "dude, just give up, and go back to arcgis"...
> >>
> >> If the solution involves programming a new tool, probably based on r.cost, is there some 
> >> online dealing with programming in GRASS?
> Hi António.
> Could you please explain us more clearly what do you (rather, ESRI)
>  mean by accessibility and allocation? I would be very surprised if 
> this could not be done with GRASS. All the best.
> -- 
> Paolo Cavallini: http://www.faunalia.it/pc
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user

More information about the grass-user mailing list