[GRASS-user] question on i.nightlights.intercalibration code

Markus Metz markus.metz.giswork at gmail.com
Sat Jun 23 02:31:58 PDT 2018


On Sat, Jun 23, 2018 at 11:10 AM, Veronica Andreo <veroandreo at gmail.com>
wrote:
>
> Hi,
>
> El sáb., 23 jun. 2018 4:35, Markus Metz <markus.metz.giswork at gmail.com>
escribió:
>>
>>
>>
>> On Fri, Jun 22, 2018 at 10:34 PM, Veronica Andreo <veroandreo at gmail.com>
wrote:
>> >
>> > Hi Gabriel,
>> >
>> > What you could do is import with r.in.gdal -a  that adjusts resolution
for lat long maps [0]
>>
>> that will help to fix the resolution from 0.008333333300000 to
0.008333333333333, i.e. exactly 30 arc-seconds. The software used to create
the raster data has stored the resolution with limited precision.
>
>
> Right, I overlooked this
>
>> > and then (before the intercalibration step), set the region to one of
the imported maps with g.region raster=yourmap
>>
>> you will then get a message like
>> 360 degree EW extent is exceeded by 1 cells
>>
>> which is correct because the first and last column are duplicates. The
cell centers cover -180, 180, and the EW extents regarding cell borders are
E: 180:00:15E, W: 180:00:15W, grown by half a cell, i.e. 15 arc-seconds.
>
>
> So, solution is to just use the data with the extra 15 arc-seconds in
each side?

yes, or chop off the first or last column: set the region to the raster,
then modify the current region with g.region w=179:59:45W -p
>
> Of I want data to fit 180/-180, would r.region mymap e=180 w=180 help or
will it change the data?

this would modify the data because
1) the raster will be shifted by half a cell to the east
2) the cell size (ew resolution) will be changed

Markus M

>
> Vero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180623/abc6fc13/attachment.html>


More information about the grass-user mailing list