[GRASS-git] [OSGeo/grass] 34e166: lib: Change default zone value from -1 to 0 (#6431)

Vaclav Petras noreply at github.com
Tue Sep 30 12:45:09 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 34e1660ab3bce3896b9f1a98b342e4ddc7704310
      https://github.com/OSGeo/grass/commit/34e1660ab3bce3896b9f1a98b342e4ddc7704310
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2025-09-30 (Tue, 30 Sep 2025)

  Changed paths:
    M lib/gis/rd_cellhd.c

  Log Message:
  -----------
  lib: Change default zone value from -1 to 0 (#6431)

The code for reading cell header (and computational region) used -1 as a default for zone (following example of the proj field). However, negative numbers are used to represent UTM south zones. On the other hand, 0 is used as a value for CRSs without zone (so everything else except UTM). So, this changes the default from -1 to 0. The code is reading internal GRASS data, and the writing code is setting the zone to 0, so -1 did not pop up anywhere based on the fact that zone is required by the code to be present (so -1 was either replaced or error was produced).

Core the context, the internal stograte is a custom key-value pair text file which uses 0. On the other hand, 'null' is available and used as a value in JSON outputs (#6407) and in r.pack computation region CRS JSON info which is implemented as a pass-through from the g.region JSON output (#6408 for original and #6407 for pass-through).

This does not have a specific test because in the overall integration only 0 is occuring (see above). The general functionality should be covered by g.region tests from #6407.



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list