#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
Resolution: | Keywords:
CPU: x86-64 | Platform: MSWindows 8
-----------------------+-------------------------
Comment (by glynn):
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
{{{
if (!flag.align->answer) {
Rast_get_cellhd(ncb.oldcell, "", &cellhd);
G_get_window(&window);
Rast_align_window(&window, &cellhd);
Rast_set_window(&window);
}
}}}
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).
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2931#comment:1>
GRASS GIS <https://grass.osgeo.org>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev