#2931: r.neighbors shifts output raster by 360 degrees (WGS 84)
-------------------------+-------------------------
Reporter: markinpt | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.6
Component: Default | Version: 6.4.3
Keywords: | CPU: x86-64
Platform: MSWindows 8 |
-------------------------+-------------------------
Input raster is an elevation raster that goes from -180 to 180 longitude
(WGS 84). I am using r.neighbors to calculate the elevation standard
deviation over 9 cells circular.
The output comes back as 180 to 540 degrees in longitude. Not exactly a
desirable outcome as I have to then shift it back to +- 180.
Replying to [ticket:2931 markinpt]:
> Input raster is an elevation raster that goes from -180 to 180 longitude
(WGS 84). I am using r.neighbors to calculate the elevation standard
deviation over 9 cells circular.
>
> The output comes back as 180 to 540 degrees in longitude. Not exactly a
desirable outcome as I have to then shift it back to +- 180.
Does this happen if you use the -a flag?
Without that flag, r.neighbors aligns the region to the input map with
It's possible that Rast_align_window doesn't handle lat/lon correctly.
Also, is the current region correct when running r.neighbors? The bounds
and resolution of the output map are dictated primarily by the current
region, and are unaffected by any input maps unless the module
specifically sets the region (as is the case for r.neighbors when run
without the -a flag).
Sorry, I left out one key item. I am running r.neighbors through the QGIS
GUI.
Given that context, what do you mean by "Current Region"? The Grass region
extent? I left that as default because the source raster is the same
extent that I wanted as an output.
Also, I am not sure if the -a flag is used or not in QGIS. I assumed this
was a Grass issue but perhaps it is the way QGIS is calling r.neighbors?