landam / grass-gis-git-migration-test

0 stars 0 forks source link

r3.null creates a lot of new unexpected null cells likely by creating a null tile #210

Open landam opened 5 years ago

landam commented 5 years ago

Reported by wenzeslaus on 19 Apr 2016 14:58 UTC When running https://trac.osgeo.org/grass/changeset/3.null I get a lot of NULL cells as a result regardless of input. When I show it in 3D as slices one part of the raster is missing. It looks like all values in one tile are NULLs (the tile is a NULL tile).

It seems that the computational region is important. I don't get the behavior with arbitrary region.

> g.region -3 n=220180 s=219900 w=638360 e=638720 t=153 b=106 res=2 res3=2

When replacing value by NULL, I get more NULL cells than expected:

> https://trac.osgeo.org/grass/changeset/3.mapcalc --o expr="test_1 = float(col() + row() + depth())"
> https://trac.osgeo.org/grass/changeset/3.univar map=test_1
total null and non-null cells: 604800
total null cells: 0
...
> https://trac.osgeo.org/grass/changeset/3.null map=test_1 setnull=10
> https://trac.osgeo.org/grass/changeset/3.univar map=test_1
total null and non-null cells: 604800
total null cells: 40356
...

When replacing NULLs by value, I get a lot of NULL values.

> https://trac.osgeo.org/grass/changeset/3.mapcalc --o expr="test_1 = float(col() + row() + depth())"
> https://trac.osgeo.org/grass/changeset/3.univar map=test_1
total null and non-null cells: 604800
total null cells: 0
...
> https://trac.osgeo.org/grass/changeset/3.null map=test_1 null=10
> https://trac.osgeo.org/grass/changeset/3.univar map=test_1
total null and non-null cells: 604800
total null cells: 40320
...

There is a lot of different Rast3d_*lock*() calls in the code but when I comment out the call of Rast3d_flush_tiles_in_cube(), I get the right results (there is Rast3d_flush_all_tiles() at the end). Documentation of Rast3d_flush_tiles_in_cube() says ''tiles which are not stored in the cache are written as NULL-tiles.''

Migrated-From: https://trac.osgeo.org/grass/ticket/2992

landam commented 5 years ago

Modified by @landam on 12 May 2016 06:36 UTC

landam commented 5 years ago

Modified by neteler on 2 Oct 2016 21:02 UTC

landam commented 5 years ago

Comment by wenzeslaus on 19 Aug 2017 21:47 UTC In [changeset:"71421\"] https://trac.osgeo.org/grass/changeset/71421:

https://trac.osgeo.org/grass/changeset/3.null: remove code which causes nulls (maybe empty tiles) to be written to the map (tested by https://trac.osgeo.org/grass/changeset/71420, see #210)
landam commented 5 years ago

Comment by wenzeslaus on 19 Aug 2017 21:52 UTC Added existing tests in https://trac.osgeo.org/grass/changeset/71418, tests for this ticket in https://trac.osgeo.org/grass/changeset/71420, removed the problematic code in https://trac.osgeo.org/grass/changeset/71421 from https://grass.osgeo.org/grass77/manuals/https://trac.osgeo.org/grass/changeset/3.null. Tests now run. .htmlThis still points to a possible bug in the library.

landam commented 5 years ago

Comment by neteler on 26 Jan 2018 11:40 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Modified by neteler on 12 Jun 2018 20:48 UTC

landam commented 5 years ago

Comment by @landam on 25 Sep 2018 07:02 UTC Any progress?

landam commented 5 years ago

Comment by neteler on 22 Oct 2018 20:50 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Comment by @landam on 11 Dec 2018 11:35 UTC Bump milestone to 7.4.4

landam commented 5 years ago

Comment by neteler on 4 Jan 2019 19:23 UTC Ticket retargeted after milestone closed