[GRASS-user] r.tile behaviour

Markus Metz markus.metz.giswork at gmail.com
Fri Nov 9 13:43:04 PST 2018


On Wed, Nov 7, 2018 at 9:17 PM Sajid Pareeth <spareeth at gmail.com> wrote:
>
> Thank you both,
>
> I got confused between first and last row tiles and the middle ones.
> The overlap is fine on first and last row tiles.

The produced tiles are correct. What might be confusing is that in case of
overlap the tiles at the edges of the input map extend beyond the input
map, with their parts beyond the extents of the input map filled with NULL
values. This could be improved by special treatment of the tiles at the
edges of the input map. It could also be a bug for global maps where the
resulting tiles at the northern edge go above 90 degrees North and the
resulting tiles at the southern edge go below 90 degrees South.

Markus M
>
> Regards
>
> Sajid
>
> On Wed, Nov 7, 2018 at 7:37 PM Markus Metz <markus.metz.giswork at gmail.com>
wrote:
>>
>>
>>
>> On Wed, Nov 7, 2018 at 7:06 PM Veronica Andreo <veroandreo at gmail.com>
wrote:
>> >
>> > Hi Sajid,
>> >
>> > I have never used r.tile before, but checking the code [1], it
multiplies the overlap by 2, so there's why. Now guesstimating, if I set an
overlap of 50, I would expect to have that overlap on both sides of the
desired size of the tiles, so maybe that's why it is doubled ?
>>
>> In princliple that's correct, but not for the first and last row and
column of tiles.
>>
>> In Sajid's example, the first and last row of tiles should have 725 rows
(675 + 50) and all other tiles 775 rows (675 + 2 * 50). Accordingly for
columns.
>>
>> That should be relatively easy to fix.
>>
>> Markus M
>> >
>> > HTH,
>> > Vero
>> >
>> > [1]
https://trac.osgeo.org/grass/browser/grass/trunk/raster/r.tile/main.c#L101
>> >
>> > El mié., 7 nov. 2018 a las 15:08, Sajid Pareeth (<spareeth at gmail.com>)
escribió:
>> >>
>> >> Hi all
>> >>
>> >> The r.tile module don't have overwrite flag, so if we re run the
module with different parameters but with same output prefix name, then it
will rewrite output with out warning.
>> >> Is this intentional?
>> >>
>> >> Another point is, if I use overlap option it adds double the overlap
cells to the output maps.
>> >>
>> >> For example in the NC location:
>> >>>
>> >>> r.info elevation -g
>> >>
>> >> rows=1350
>> >> cols=1500
>> >>
>> >>> r.tile input=elevation output=elev_tile width=750 height=675
>> >>> r.info elev_tile-001-001 -g
>> >>
>> >> rows=675
>> >> cols=750
>> >>
>> >>> r.tile input=elevation output=elev_tile width=750 height=675
overlap=50
>> >>> r.info elev_tile-001-001 -g
>> >>
>> >> rows=775 (+ 100)
>> >> cols=850 (+ 100)
>> >>
>> >> In the last case the rows and cols should be 725 and 800
respectively, as it should add 50 cells as overlap to each tile? Or am I
missing something?
>> >>
>> >> Regards
>> >>
>> >> Sajid
>> >>
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> grass-user mailing list
>> >> grass-user at lists.osgeo.org
>> >> https://lists.osgeo.org/mailman/listinfo/grass-user
>> >
>> > _______________________________________________
>> > grass-user mailing list
>> > grass-user at lists.osgeo.org
>> > https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20181109/fcbe7446/attachment.html>


More information about the grass-user mailing list