Space Time Related Modules¶
Spatio-temporal data handling and visualization in GRASS GIS.
-
class
gscpy.t_c_register.t_c_register.
CRegister
(output, title, description, start, type='raster', semantictype='mean', end=None, temporaltype='absolute', separator='comma', pattern=None, exclude=None, mapset=None, region=None, unit=None, increment=None)[source]¶ Create and register a space time dataset.
Parameters: - output (str) – Name of the output space time dataset.
- title (str) – Title of the new space time dataset.
- description (str) – Description of the new space time dataset
- semantictype ({"min", "max", "sum", "mean"}) – Semantic type of the space time dataset. Default is mean.
- type ({'raster', 'raster_3d', 'vector', 'label', 'region', 'group', 'all'}) – Data type(s). Default is raster.
- start (str) – Valid start date and time of the first map. Format for absolute time: “yyyy-mm-dd HH:MM:SS +HHMM”, relative time is of type integer.
- end (str) – Valid end date and time of last map. Format for absolute time: “yyyy-mm-dd HH:MM:SS +HHMM”, relative time is of type integer.
- temporaltype ({"absolute", "relative"}) – The temporal type of the space time datase. Default is absolute.
- separator ({"pipe", "comma", "space", "tab", "newline"}) – Field separator character of the input file. Default is comma.
- unit ({"years", "months", "days", "hours", "minutes", "seconds"}) – Time stamp unit. Unit must be set in case of relative timestamps.
- increment (str) – Time increment, works only in conjunction with start option. Time increment between maps for creation of valid time intervals (format for absolute time: NNN seconds, minutes, hours, days, weeks, months, years; format for relative time is of type integer: 5)
- pattern (str, optional) – The pattern of file names.
- exclude (str, optional) – Which files or patterns should be excluded?
- mapset (str, optional) – Name of mapset to list (default: current search path); ‘*’ for all mapsets in location.
- region (str, optional) – Name of saved region for map search (default: not restricted); ‘*’ for default region
-
lkwargs
¶ Attributes for g.list module.
Type: dict
-
ckwargs
¶ Attributes for t.create module.
Type: dict
-
rkwargs
¶ Attributes for t.register module.
Type: dict
Examples
The general usage is
$ t.c.register [-i-t-p-l-m] output=string title=string description=string start=string [type=string] [semantictype=string] [end=string] [temporaltype=string] [separator=string] [pattern=string] [exclude=float] [mapset=string] [region=string] [unit=string] [unit=increment] [--verbose] [--quiet]
Create a mapset that named ‘tempmean’ and register all raster files that contains tempmean
$ t.c.register output=tempmean temporaltype=absolute title="Average temperature" description="Monthly temperature average in NC [deg C]" pattern="*tempmean" start=2000-01-01 increment="1 months"
Create a mapset that named ‘tempmean’ and register all raster files that contains tempmean. Show a plot after registration
$ t.c.register -m -t output=tempmean temporaltype=absolute title="Average temperature" description="Monthly temperature average in NC [deg C]" pattern="*tempmean" start=2000-01-01 increment="1 months"
Create a mapset that named ‘precip_sum’ and register all raster files that contains precip. Show a plot after registration
$ t.c.register -m -t output=precip_sum title="Preciptation" description="Monthly precipitation sums in NC [mm]" pattern="*precip" start=2000-01-01 increment="1 months" semantictype=sum
Notes
- Flags:
- i : Ignore case.
- t : Create an interval (start and end time) in case an increment and the start time are provided
- p : Print the detected files and exit.
- l : List files after registration.
- m : Plot files after registration.
-
cregister
(t=False)[source] Create and register a space time dataset.
Parameters: t (bool) – Create an interval (start and end time) in case an increment and the start time are provided. Returns: Return type: None
-
list
()[source] List Files for current space time dataset.
Returns: Return type: None
-
plot
()[source] Visualize the temporal extents of the dataset.
Returns: Return type: None
-
print_products
()[source] Print all detected files.
Returns: Return type: None