[GRASS-user] Re: [Qgis-user] error with r.cost

Ramon says,
I'm afraid I don't - but given the current situations, I'd suggest anyone that could help would also be wondering which version of QGIS you were using and on which operating system.

The Qgis version is 1.6.0 also, the result is same on GRASS (tcl/tk) 6.4 RC1, performed on WinXP SP3 on a core2Duo machine.

regards,
Ambrish Dhaka

Ambrish Dhaka,

you need to check the region extent + resolution, probably
you are exceeding the available RAM if you are having too
many rows and columns.

Get the information with:
g.region -p

or the respective menu entry.

Markus

On Sun, Apr 10, 2011 at 10:57 AM, ambijat <ambijat@hotmail.com> wrote:

Ramon says,
I'm afraid I don't - but given the current situations, I'd suggest anyone
that could help would also be wondering which version of QGIS you were using
and on which operating system.

The Qgis version is 1.6.0 also, the result is same on GRASS (tcl/tk) 6.4
RC1, performed on WinXP SP3 on a core2Duo machine.

regards,
Ambrish Dhaka

On 10/04/2011, at 13:19 , ambijat wrote:

Hi All,
I am trying to create shortest path between two raster points (converted from v.to.rast) and I use the STRM data for the input values between the two points. This is the error I get.

r.cost input=afg_rast at user1 output=salroute start_rast=salang at user1 max_cost=0 -k
G_malloc: unable to allocate 524288 bytes at setup.c:64
Finished with error

Any idea why I am getting this?
Thanks and regards,
Ambrish Dhaka

On Sun, Apr 10, 2011 at 10:02 PM, Markus Neteler <neteler@osgeo.org> wrote:

Ambrish Dhaka,

you need to check the region extent + resolution, probably
you are exceeding the available RAM if you are having too
many rows and columns.

In this case you could adjust the percent_memory option of r.cost and
set it to 50 (by default all intermediate data are kept in memory).

Markus M

Get the information with:
g.region -p

or the respective menu entry.

Markus

On Sun, Apr 10, 2011 at 10:57 AM, ambijat <ambijat@hotmail.com> wrote:

Ramon says,
I'm afraid I don't - but given the current situations, I'd suggest anyone
that could help would also be wondering which version of QGIS you were using
and on which operating system.

The Qgis version is 1.6.0 also, the result is same on GRASS (tcl/tk) 6.4
RC1, performed on WinXP SP3 on a core2Duo machine.

regards,
Ambrish Dhaka

On 10/04/2011, at 13:19 , ambijat wrote:

Hi All,
I am trying to create shortest path between two raster points (converted from v.to.rast) and I use the STRM data for the input values between the two points. This is the error I get.

r.cost input=afg_rast at user1 output=salroute start_rast=salang at user1 max_cost=0 -k
G_malloc: unable to allocate 524288 bytes at setup.c:64
Finished with error

Any idea why I am getting this?
Thanks and regards,
Ambrish Dhaka

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi! Markus,
I am using a mask so as to limit my operation. The only improvisation I did was this time to run the set on Fedora14 as I have my dual boot machine. Luckily I have now my r.cost raster built. But, before going for that I reduced the SRTM altitude values to range between 0-255. So, some economizing on bit size was possible.

But,

But, now I am stuck with a new thing and this is with r.walk. I am still performing this operation on F14. But, there is a crash everytime. The input rasters are the two one the same rescaled raster for base values and r.cost generated raster for friction values. But, it is crashing every time. I am not getting a headway. I need to generate a route between two cities cross the Hindukush mountain ranges in Afghanistan.

Any, ideas to this issue. I am thinking of using r.slop.aspect raster for friction values what do you suggest.

Thanks and regards,
Ambrish Dhaka

On 4/11/2011 1:37 AM, Markus Neteler wrote:

Ambrish Dhaka,

you need to check the region extent + resolution, probably
you are exceeding the available RAM if you are having too
many rows and columns.

Get the information with:
g.region -p

or the respective menu entry.

Markus

On Sun, Apr 10, 2011 at 10:57 AM, ambijat<ambijat@hotmail.com> wrote:

Ramon says,
I'm afraid I don't - but given the current situations, I'd suggest anyone
that could help would also be wondering which version of QGIS you were using
and on which operating system.

The Qgis version is 1.6.0 also, the result is same on GRASS (tcl/tk) 6.4
RC1, performed on WinXP SP3 on a core2Duo machine.

regards,
Ambrish Dhaka

On 10/04/2011, at 13:19 , ambijat wrote:

Hi All,
I am trying to create shortest path between two raster points (converted from v.to.rast) and I use the STRM data for the input values between the two points. This is the error I get.

r.cost input=afg_rast at user1 output=salroute start_rast=salang at user1 max_cost=0 -k
G_malloc: unable to allocate 524288 bytes at setup.c:64
Finished with error

Any idea why I am getting this?
Thanks and regards,
Ambrish Dhaka

_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Markus wrote:

> you need to check the region extent + resolution, probably
> you are exceeding the available RAM if you are having too
> many rows and columns.
>
> Get the information with:
> g.region -p
>
> or the respective menu entry.

ambijat wrote:

I am using a mask so as to limit my operation.

...

But, now I am stuck with a new thing and this is with
r.walk. I am still performing this operation on F14. But,
there is a crash everytime.

is it the the same G_alloc() error message? if not, what does
the crash report say? if so it means you do not have enough
memory, which usually happens when the raster region/resolution
is set to crazy values.

As Markus asked, what does the region information from
"g.region -p" say? Is it more than ~ 40000x40000 rows and
columns?

Hamish

On Mon, Apr 11, 2011 at 3:19 PM, Hamish <hamish_b@yahoo.com> wrote:

Markus wrote:

> you need to check the region extent + resolution, probably
> you are exceeding the available RAM if you are having too
> many rows and columns.
>
> Get the information with:
> g.region -p
>
> or the respective menu entry.

ambijat wrote:

I am using a mask so as to limit my operation.

...

But, now I am stuck with a new thing and this is with
r.walk. I am still performing this operation on F14. But,
there is a crash everytime.

is it the the same G_alloc() error message? if not, what does
the crash report say? if so it means you do not have enough
memory, which usually happens when the raster region/resolution
is set to crazy values.

As Markus asked, what does the region information from
"g.region -p" say? Is it more than ~ 40000x40000 rows and
columns?

Just for reference: r.walk needs about 30MB per 1 million cells, plus
a little overhead. The memory requirements of r.cost and r.walk are
independent of any mask or of the range of input values, and solely
dependent on the number of cells in the current region. The
percent_memory option gives some control over the amount of memory
used by these two modules.

Also, the friction cost input for r.walk should indicate the friction
costs per cell. The output of r.cost is thus not suitable as input for
r.walk because the output of r.cost is cumulative: cumulative costs to
reach a given cell from the nearest start point. Rather calculate
friction costs for each cell from r.slope.aspect, as suggested by
Markus.

Markus M

Solved!!!

Thanks! Markus and Hamish,

I got a new mapset created, set the resolution and imported the raster. And, it has been fine output.
But, my query is that the raster that I generate from r.walk does not give me a line connecting two points. How to get that. I am using elevation raster (reclassified) as base raster. Now, about friction cost, what to use, aspect or slope map or the cost generated map.

suggest me so that I can get a fine line.

Thanks and regards,
Ambrish Dhaka

On Mon, Apr 11, 2011 at 7:40 PM, ambijat <ambijat@hotmail.com> wrote:

Solved!!!

Thanks! Markus and Hamish,

I got a new mapset created, set the resolution and imported the raster. And,
it has been fine output.
But, my query is that the raster that I generate from r.walk does not give
me a line connecting two points. How to get that. I am using elevation
raster (reclassified) as base raster. Now, about friction cost, what to use,
aspect or slope map or the cost generated map.

suggest me so that I can get a fine line.

use the output of r.walk as input for r.drain to get the shortest path