Skip to content

OpenPlainsInc/grass-stac-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[WIP] GRASS GIS Extension Specification

This document explains the GRASS GIS Extension to the SpatioTemporal Asset Catalog (STAC) specification.

GRASS GIS metadata...

GRASS Metadata Commands

Candidate GRASS commands for metadata production:

  • g.region - Region Boundaries
  • g.proj - CRS information
  • *.info - Basic metadata
  • *.out.color - Exports color table
  • t.rast.colors - Export temporal raster color table
  • r.describe - Range of category values
  • *.category - Category information
  • *.univar - Univariate statistics
  • t.*.univar - Temporal univariate Statistics
  • *.stats - General statistics
  • *.report - Report statistics
  • r.out.png - Export raster thumbnail

Once a spec is agreed upon we can develop a GRASS module *.out.stac to generate a grassdata STAC.

Fields

The fields in the table below can be used in these parts of STAC documents:

  • Catalogs
  • Collections
  • Item Properties (incl. Summaries in Collections)
  • Assets (for both Collections and Items, incl. Item Asset Definitions in Collections)
  • Links
Field Name Type Description
grass:type string [grassdata, location, mapset, raster, vector, strds] REQUIRED. The GRASS GIS object type
grass:datatype string The GRASS datatype (e.g. CELL, FCELL, DCELL, etc..) (r.info datatype)
grass:description string GRASS GIS Processing metadata (r.info metadata)
grass:comments string (r.info comments)
grass:creator string (r.info creator)
grass:ewres [number] The east west spatial resolution (r.info ewres)
grass:nsres [number] The north south spatial resolution (r.info nsres)
grass:cols [number] The number of columns in the raster (r.cols nsres)
grass:location string The name of the GRASS location (i.e., project)
grass:mapset string The name of the GRASS mapset (i.e., sub-project)
grass:map string (r.info map)
grass:maptype string (r.info maptype)
grass:min [number] The min data value (r.info min)
grass:max [number] The max data value (r.info max)
grass:ncats [number] The max data value (r.info ncats)
grass:semantic_label string The semantic_label (r.info semantic_label)
grass:source1 string The source1 value (r.info source1)
grass:source2 string The source1 value (r.info source1)
grass:color_table string *.colors.out

Additional Field Information

template:new_field

This is a much more detailed description of the field template:new_field...

Contributing

All contributions are subject to the STAC Specification Code of Conduct. For contributions, please follow the STAC specification contributing guide Instructions for running tests are copied here for convenience.

Running tests

The same checks that run as checks on PR's are part of the repository and can be run locally to verify that changes are valid. To run tests locally, you'll need npm, which is a standard part of any node.js installation.

First you'll need to install everything with npm once. Just navigate to the root of this repository and on your command line run:

npm install

Then to check markdown formatting and test the examples against the JSON schema, you can run:

npm test

This will spit out the same texts that you see online, and you can then go and fix your markdown or examples.

If the tests reveal formatting problems with the examples, you can fix them with:

npm run format-examples