UNPKG

@hestia-earth/schema

Version:
296 lines (295 loc) 11.6 kB
import { JSON, JSONLD, NodeType, SchemaType } from './types'; import { Organisation } from './Organisation'; import { Source } from './Source'; import { Term } from './Term'; import { Measurement } from './Measurement'; import { Infrastructure } from './Infrastructure'; import { Practice } from './Practice'; import { TermTermType } from './Term'; export declare enum SiteSiteType { 'agri-food processor' = "agri-food processor", 'animal housing' = "animal housing", cropland = "cropland", 'food retailer' = "food retailer", forest = "forest", 'glass or high accessible cover' = "glass or high accessible cover", lake = "lake", 'other natural vegetation' = "other natural vegetation", 'permanent pasture' = "permanent pasture", pond = "pond", 'river or stream' = "river or stream", 'sea or ocean' = "sea or ocean" } export declare enum SiteTenure { 'farming on common land' = "farming on common land", 'farming on owned land' = "farming on owned land", 'farming on rented land' = "farming on rented land", 'other tenure model' = "other tenure model", 'share farming' = "share farming" } /** * Contains all the TermTermType with override on the Site. * Note: it does not contain the default TermTermType on related Blank Nodes. */ export declare const siteTermTermType: { country: TermTermType[]; region: TermTermType[]; practices: { term: TermTermType[]; }; all: TermTermType[]; }; /** * A field for growing crops or grazing animals; an aquaculture pond; a building; or semi-natural vegetation. */ export declare class Site extends JSON<SchemaType.Site> { /** * An automatically generated name for the Site composed of: siteType, "-", organisation.name, "-", site.region "," site.country, "-", description. */ name?: string; /** * A description of the Site, including information that cannot be captured with other fields. */ description?: string; /** * The type of the Site. Definitions for agricultural land follow [FAOSTAT](http://www.fao.org/ag/agn/nutrition/Indicatorsfiles/Agriculture.pdf), where cropland here means arable land and permanent crops. The additional term "glass or high accessible cover" is defined by [EUROSTAT](https://ec.europa.eu/eurostat/cache/metadata/Annexes/apro_cp_esms_an1.pdf). */ siteType?: SiteSiteType; /** * A reference to the [Organisation] this Site is managed by. */ organisation?: Organisation; /** * The ownership status of the Site following [EUROSTAT](https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Glossary:Type_of_tenure) terminology. */ tenure?: SiteTenure; /** * The default [Source] for all data in the Site which can be overridden by specifying a source for each blank node. Not required (but reccomended) if [dataPrivate](#dataPrivate) = true. */ defaultSource?: Source; /** * If data on multiple Sites are aggregated and represented as a single Site, the number of Sites. */ numberOfSites?: number; /** * A nested [GeoJSON](https://tools.ietf.org/html/rfc7946) object for the Site boundary of type 'FeatureCollection'. For cropland the boundary should represent [area under cultivation](https://www.fao.org/faostat/en/#data/QCL/metadata) (also called sown area). */ boundary?: any; /** * The area of the Site in hectares. For cropland, this is [area under cultivation](https://www.fao.org/faostat/en/#data/QCL/metadata) (also called sown area) only. Uncultivated area can be added by creating a new Site and linking it under the same [Organisation]. Harvested area can be defined for each Cycle using the field [harvestedArea](./Cycle#harvestedArea). */ area?: number; /** * The standard deviation of area, if there are multiple Sites. */ areaSd?: number; /** * The latitude of the centroid of the Site (-90 to 90, WGS84 datum). We recommend providing latitude with five decimal place precision (which roughly corresponds to 1 meter precision at the equator). */ latitude?: number; /** * The longitude of the centroid of the Site (-180 to 180, WGS84 datum). We recommend providing longitude with five decimal place precision (which roughly corresponds to 1 meter precision at the equator). */ longitude?: number; /** * The country name from the [Glossary](/glossary?termType=region). */ country?: Term; /** * The most specific geographical region from the [Glossary](/glossary?termType=region). */ region?: Term; /** * The [WWF Terrestrial Ecoregion](https://www.worldwildlife.org/publications/terrestrial-ecoregions-of-the-world) name. */ ecoregion?: string; /** * The [AWARE](http://wulca-waterlca.org/) water basin identifier. */ awareWaterBasinId?: string; /** * The [Global Location Number](https://en.wikipedia.org/wiki/Global_Location_Number). */ glnNumber?: string; /** * The date in which the Site in its current form was established in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). */ startDate?: string; /** * The date in which the Site in its current form ceased to exist in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). */ endDate?: string; /** * The Measurements taken on the Site. */ measurements?: Measurement[]; /** * The Infrastructure on the Site. */ infrastructure?: Infrastructure[]; /** * The Practices used on the Site. */ practices?: Practice[]; /** * The identifier for these data in the source database. */ originalId?: string; /** * The version of the schema when these data were created. */ schemaVersion?: string; /** * A list of fields that have been added to the original dataset. */ added?: (string)[]; /** * A list of versions of the model used to add these fields. */ addedVersion?: (string)[]; /** * A list of fields that have been updated on the original dataset. */ updated?: (string)[]; /** * A list of versions of the model used to update these fields. */ updatedVersion?: (string)[]; /** * If this Cycle has been 'aggregated' using data from multiple [Cycles](./Cycle). */ aggregated?: boolean; /** * A version of the aggregation engine corresponding to this Cycle. */ aggregatedVersion?: string; /** * If these data are private. */ dataPrivate?: boolean; } /** * A field for growing crops or grazing animals; an aquaculture pond; a building; or semi-natural vegetation. */ export interface ISiteJSONLD extends JSONLD<NodeType.Site> { /** * A description of the Site, including information that cannot be captured with other fields. */ description?: string; /** * The type of the Site. Definitions for agricultural land follow [FAOSTAT](http://www.fao.org/ag/agn/nutrition/Indicatorsfiles/Agriculture.pdf), where cropland here means arable land and permanent crops. The additional term "glass or high accessible cover" is defined by [EUROSTAT](https://ec.europa.eu/eurostat/cache/metadata/Annexes/apro_cp_esms_an1.pdf). */ siteType?: SiteSiteType; /** * A reference to the [Organisation] this Site is managed by. */ organisation?: Organisation; /** * The ownership status of the Site following [EUROSTAT](https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Glossary:Type_of_tenure) terminology. */ tenure?: SiteTenure; /** * The default [Source] for all data in the Site which can be overridden by specifying a source for each blank node. Not required (but reccomended) if [dataPrivate](#dataPrivate) = true. */ defaultSource?: Source; /** * If data on multiple Sites are aggregated and represented as a single Site, the number of Sites. */ numberOfSites?: number; /** * A nested [GeoJSON](https://tools.ietf.org/html/rfc7946) object for the Site boundary of type 'FeatureCollection'. For cropland the boundary should represent [area under cultivation](https://www.fao.org/faostat/en/#data/QCL/metadata) (also called sown area). */ boundary?: any; /** * The area of the Site in hectares. For cropland, this is [area under cultivation](https://www.fao.org/faostat/en/#data/QCL/metadata) (also called sown area) only. Uncultivated area can be added by creating a new Site and linking it under the same [Organisation]. Harvested area can be defined for each Cycle using the field [harvestedArea](./Cycle#harvestedArea). */ area?: number; /** * The standard deviation of area, if there are multiple Sites. */ areaSd?: number; /** * The latitude of the centroid of the Site (-90 to 90, WGS84 datum). We recommend providing latitude with five decimal place precision (which roughly corresponds to 1 meter precision at the equator). */ latitude?: number; /** * The longitude of the centroid of the Site (-180 to 180, WGS84 datum). We recommend providing longitude with five decimal place precision (which roughly corresponds to 1 meter precision at the equator). */ longitude?: number; /** * The country name from the [Glossary](/glossary?termType=region). */ country?: Term; /** * The most specific geographical region from the [Glossary](/glossary?termType=region). */ region?: Term; /** * The [WWF Terrestrial Ecoregion](https://www.worldwildlife.org/publications/terrestrial-ecoregions-of-the-world) name. */ ecoregion?: string; /** * The [AWARE](http://wulca-waterlca.org/) water basin identifier. */ awareWaterBasinId?: string; /** * The [Global Location Number](https://en.wikipedia.org/wiki/Global_Location_Number). */ glnNumber?: string; /** * The date in which the Site in its current form was established in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). */ startDate?: string; /** * The date in which the Site in its current form ceased to exist in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). */ endDate?: string; /** * The Measurements taken on the Site. */ measurements?: Measurement[]; /** * The Infrastructure on the Site. */ infrastructure?: Infrastructure[]; /** * The Practices used on the Site. */ practices?: Practice[]; /** * The identifier for these data in the source database. */ originalId?: string; /** * The version of the schema when these data were created. */ schemaVersion?: string; /** * A list of fields that have been added to the original dataset. */ added?: (string)[]; /** * A list of versions of the model used to add these fields. */ addedVersion?: (string)[]; /** * A list of fields that have been updated on the original dataset. */ updated?: (string)[]; /** * A list of versions of the model used to update these fields. */ updatedVersion?: (string)[]; /** * If this Cycle has been 'aggregated' using data from multiple [Cycles](./Cycle). */ aggregated?: boolean; /** * A version of the aggregation engine corresponding to this Cycle. */ aggregatedVersion?: string; /** * If these data are private. */ dataPrivate?: boolean; }