Details Ticket 4452


Comment | Reply | Take | Resolve


Serial Number 4452
Subject r.patch makes mosaics slowly
Area wish6
Queue grass
Requestors cedricgrass@shockfamily.net
Owner none
Status open
Last User Contact Fri May 12 07:10:08 2006 (2 yr ago)
Current Priority 25
Final Priority 70
Due No date assigned
Last Action Fri May 12 07:10:08 2006 (2 yr ago)
Created Thu May 11 22:28:25 2006 (2 yr ago)

Transaction History Ticket 4452


Thu, May 11 2006 22:28:25    Request created by cshock  
Subject: r.patch makes mosaics slowly

r.patch currently takes current_region_rows * current_region_columns *
number_of_input_maps time to compile mosaics. It has some reasonable
optimizations for patching an existing large map with many small patches, but
is quite unsuited to mosaics.

For mosaics the fast thing to do would be to iterate over input maps (bounds
of input, resolution of current region), copying values to nulls in the
output. (and non-zero values to zeros or nulls in the output with the -z switch).
Fri, May 12 2006 07:10:08    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Fri, 12 May 2006 17:09:59 +1200
From Hamish <hamish_nospam@yahoo.com>
To Request Tracker <grass-bugs@intevation.de>
Cc grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #4452] (grass) r.patch makes mosaics slowly
Message-Id <20060512170959.25190fb9.hamish_nospam@yahoo.com>
In-Reply-To <20060511202825.7A30D1006A3@lists.intevation.de>
References <20060511202825.7A30D1006A3@lists.intevation.de>
X-Mailer Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.0 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD
X-Spam-Level
> this bug's URL: http://intevation.de/rt/webrt?serial_num=4452
> ---------------------------------------------------------------------
> 
> Subject: r.patch makes mosaics slowly
> 
> r.patch currently takes current_region_rows * current_region_columns *
> number_of_input_maps time to compile mosaics. It has some reasonable
> optimizations for patching an existing large map with many small
> patches, but is quite unsuited to mosaics.
> 
> For mosaics the fast thing to do would be to iterate over input maps
> (bounds of input, resolution of current region), copying values to
> nulls in the output. (and non-zero values to zeros or nulls in the
> output with the -z switch).


isn't this just the r.mapcalc solution?

Eric wrote:
> r.mapcalc "$OUTPUT=if(isnull(Map_A), Map_B, Map_A)"


hint:

g.region rast=map1,map2,map3,map4

extends the region to enclose all listed maps. Helpful for r.patch.


I think in the end you will spend lots of time for little gain on this
problem- no matter how you frame it, you still have to read each cell of
each map. Just set the thing to run from a script before you leave for
the day & the result will wait for you in the morning. (unless you have
10,000 maps to patch or want real time availablility)


Hamish


Comment | Reply | Take | Resolve

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request