[GRASS-dev] r.copy doesn't respect computational region??

Michael Barton Michael.Barton at asu.edu
Sun Mar 3 09:18:53 PST 2024


Thanks. I’ll check it out
______________
Michael Barton

Sent from  my iPhone
Please excusr any typoz

On Mar 2, 2024, at 6:48 PM, Vaclav Petras <wenzeslaus at gmail.com> wrote:




On Sat, 2 Mar 2024 at 07:04, Paulo van Breugel via grass-dev <grass-dev at lists.osgeo.org<mailto:grass-dev at lists.osgeo.org>> wrote:


On March 2, 2024 1:00:23 AM GMT+01:00, Michael Barton via grass-dev <grass-dev at lists.osgeo.org<mailto:grass-dev at lists.osgeo.org>> wrote:
>It's been awhile since I've done this but I thought I remembered that a new map created with r.copy is constrained by the computational region. That does not seem to the case, at least in 8.4 dev. Maybe it has been this way for awhile (long while?) and I didn't notice it.


g.copy is a general tool which creates a copy of the data. Perhaps you are interested in r.clip which is a raster tool and is driven by the computational region as expected. r.clip clips according to the current computation region (preserves original raster alignment  by default).

https://grass.osgeo.org/grass-stable/manuals/addons/r.clip.html<https://urldefense.com/v3/__https://grass.osgeo.org/grass-stable/manuals/addons/r.clip.html__;!!IKRxdwAv5BmarQ!bX6BJARtmhekJ3SG9PaerPBuEiEiQkRVfYrnDVdOljsw5vo69FcPmMNw7rpgTjuONRDgrZBYDLMSvZddoB0FyiU3Aw$>


I think, but I'm not 100% sure, that has always been the case.

Here is g.copy documentation from v6.4 it does not mention anything about region. It seems to go back to US Army CERL.

https://github.com/OSGeo/grass-legacy/blob/2734c86fd5cb976b4a94b04a2cdc75b4613f6a77/general/manage/cmd/g.copy.html#L6<https://urldefense.com/v3/__https://github.com/OSGeo/grass-legacy/blob/2734c86fd5cb976b4a94b04a2cdc75b4613f6a77/general/manage/cmd/g.copy.html*L6__;Iw!!IKRxdwAv5BmarQ!bX6BJARtmhekJ3SG9PaerPBuEiEiQkRVfYrnDVdOljsw5vo69FcPmMNw7rpgTjuONRDgrZBYDLMSvZddoB0EwccY8A$>

In any case, it seems to be the logical behavior, otherwise it wouldn't be a true copy?

Are the different expectations coming from differences between raster tools and general tools? With r.copy (as opposed to g.copy), you could perhaps argue for respecting the computational region, but I think the "true copy" expectation would still be strong.

Vaclav



>
>Michael
>_____________________________
>
>C. Michael Barton
>Associate Director, School of Complex Adaptive Systems (https://scas.asu.edu<https://scas.asu.edu/>)
>Professor, School of Human Evolution & Social Change (https://shesc.asu.edu)
>Director, Center for Social Dynamics & Complexity (https://complexity.asu.edu)
>Arizona State University
>Tempe, AZ 85287-2701
>USA
>
>Executive Director, Open Modeling Foundation (https://openmodelingfoundation.github.io<https://urldefense.com/v3/__https://openmodelingfoundation.github.io__;!!IKRxdwAv5BmarQ!bX6BJARtmhekJ3SG9PaerPBuEiEiQkRVfYrnDVdOljsw5vo69FcPmMNw7rpgTjuONRDgrZBYDLMSvZddoB2bt1bIhg$><https://openmodelingfoundation.github.io/<https://urldefense.com/v3/__https://openmodelingfoundation.github.io/__;!!IKRxdwAv5BmarQ!bX6BJARtmhekJ3SG9PaerPBuEiEiQkRVfYrnDVdOljsw5vo69FcPmMNw7rpgTjuONRDgrZBYDLMSvZddoB0JD-cSLQ$>>)
>Director, Network for Computational Modeling in Social & Ecological Sciences (https://comses.net<https://urldefense.com/v3/__https://comses.net__;!!IKRxdwAv5BmarQ!bX6BJARtmhekJ3SG9PaerPBuEiEiQkRVfYrnDVdOljsw5vo69FcPmMNw7rpgTjuONRDgrZBYDLMSvZddoB0xLCQgig$>)
>
>personal website: http://www.public.asu.edu/~cmbarton
>
>
_______________________________________________
grass-dev mailing list
grass-dev at lists.osgeo.org<mailto:grass-dev at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/grass-dev<https://urldefense.com/v3/__https://lists.osgeo.org/mailman/listinfo/grass-dev__;!!IKRxdwAv5BmarQ!bX6BJARtmhekJ3SG9PaerPBuEiEiQkRVfYrnDVdOljsw5vo69FcPmMNw7rpgTjuONRDgrZBYDLMSvZddoB1u5GUh6g$>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20240303/2de286c4/attachment-0001.htm>


More information about the grass-dev mailing list