Skip to content

Commit

Permalink
fix band references assignment (#132)
Browse files Browse the repository at this point in the history
* fix register_maps_in_space_time_dataset() for vector type, skip band references assignment

* Wording

Co-Authored-By: Markus Neteler <neteler@gmail.com>

* add read_band_reference_from_grass()/set_band_reference() also to AbstractMapDataset, change register accordigly
  • Loading branch information
landam committed Nov 10, 2019
1 parent 2684941 commit 04da30d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions lib/python/temporal/abstract_map_dataset.py
Expand Up @@ -1054,6 +1054,25 @@ def remove_stds_from_register(self, stds_id, dbif=None, execute=True):

return statement

def read_band_reference_from_grass(self):
"""Read the band identifier of this map from the map metadata
in the GRASS file system based spatial database and
set the internal band identifier that should be insert/updated
in the temporal database.
Currently only implemented in RasterDataset. Otherwise
silently pass.
"""
pass

def set_band_reference(self, band_reference):
"""Set band reference identifier
Currently only implemented in RasterDataset. Otherwise
report a warning.
"""
self.msgr.warning(_("Band references can only be assigned to raster maps"))

###############################################################################

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion lib/python/temporal/register.py
Expand Up @@ -328,7 +328,7 @@ def register_maps_in_space_time_dataset(
increment=increment, mult=count,
interval=interval)

# Set the band reference
# Set the band reference (only raster type supported)
if band_reference:
# Band reference defined in input file
# -> update raster metadata
Expand Down

0 comments on commit 04da30d

Please sign in to comment.