Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] t.info fails for single registered raster #4182

Open
petrasovaa opened this issue Aug 14, 2024 · 3 comments · May be fixed by #4328
Open

[Bug] t.info fails for single registered raster #4182

petrasovaa opened this issue Aug 14, 2024 · 3 comments · May be fixed by #4328
Assignees
Labels
backport to 8.4 PR needs to be backported to release branch 8.4 bug Something isn't working temporal Related to temporal data processing
Milestone

Comments

@petrasovaa
Copy link
Contributor

Describe the bug

Printing metadata for raster registered in temporal database fails:

t.info type=raster input=lst_2014.005_avg
 +-------------------- Raster Dataset ----------------------------------------+
 |                                                                            |
 +-------------------- Basic information -------------------------------------+
 | Id: ........................ lst_2014.005_avg@italy_LST_daily
 | Name: ...................... lst_2014.005_avg
 | Mapset: .................... italy_LST_daily
 | Creator: ................... mundialis
 | Temporal type: ............. absolute
 | Creation time: ............. 2019-09-05 12:57:57
 +-------------------- Absolute time -----------------------------------------+
 | Start time:................. 2014-01-05 00:00:00
 | End time:................... 2014-01-06 00:00:00
 +-------------------- Spatial extent ----------------------------------------+
 | North:...................... 2666000.0
 | South:...................... 2228000.0
 | East:.. .................... 4635000.0
 | West:....................... 4053000.0
 | Top:........................ 0.0
 | Bottom:..................... 0.0
Traceback (most recent call last):
  File "/home/akratoc/dev/grass/grass_main/dist.x86_64-pc-linux-gnu/scripts/t.info", line 134, in <module>
    main()
  File "/home/akratoc/dev/grass/grass_main/dist.x86_64-pc-linux-gnu/scripts/t.info", line 129, in main
    dataset.print_info()
  File "/home/akratoc/dev/grass/grass_main/dist.x86_64-pc-linux-gnu/etc/python/grass/temporal/abstract_map_dataset.py", line 308, in print_info
    self.metadata.print_info()
    ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RasterMetadata' object has no attribute 'print_info'

Expected behavior

Metadata should work not only for STDS, but also for registered maps.

Additional context

Broken in 7df1a7e.

@petrasovaa petrasovaa added bug Something isn't working temporal Related to temporal data processing backport to 8.4 PR needs to be backported to release branch 8.4 labels Aug 14, 2024
@petrasovaa petrasovaa added this to the 8.4.1 milestone Aug 14, 2024
@echoix
Copy link
Member

echoix commented Aug 14, 2024

I remember trying to take a look at something very similar...

Isn't it very similar to #4076?

@veroandreo
Copy link
Contributor

How to reproduce:

for i in $(seq 1 5) ; do 
r.mapcalc expression="map_${i} = ${i}" 
done

t.create type=strds temporaltype=absolute output=test title="test" description="test"

t.register input=test maps=`g.list rast pat=map* sep=comma` start="2024-07-14" increment="1 days" -i

t.info map_1 type=raster

@veroandreo
Copy link
Contributor

Isn't it very similar to #4076?

It's the same thing, I copied the how to reproduce part here, and will now close the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport to 8.4 PR needs to be backported to release branch 8.4 bug Something isn't working temporal Related to temporal data processing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants