'+ escapeHtml(title) + '
' + escapeHtml(summary) +'
diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..0c0cd18 --- /dev/null +++ b/404.html @@ -0,0 +1,183 @@ + + +
+ + + + + + + +Page not found
+pygeometa provides a lightweight and Pythonic approach for users to easily +create geospatial metadata in standards-based formats using simple +configuration files (affectionately called metadata control files [MCF]). +Leveraging the simple but powerful YAML format, pygeometa can generate metadata +in numerous standards. Users can also create their own custom metadata formats +which can be plugged into pygeometa for custom metadata format output.
+For developers, pygeometa provides a Pythonic API that allows developers to +tightly couple metadata generation within their systems and integrate nicely +into metadata production pipelines.
+The project supports various metadata formats out of the box including ISO +19115, the WMO Core Metadata Profile, and the WIGOS Metadata Standard. Can't +find the format you're looking for? Element(s) missing from a given format? +Feel free to open an issue!
+pygeometa has minimal dependencies (install is less than 50 kB), and provides +a flexible extension mechanism leveraging the Jinja2 templating system.
+pygeometa is open source and released under an +MIT license.
+Started in 2009, pygeometa originated within an internal project called pygdm, +which provided generic geospatial data management functions. pygdm (now end +of life) was used for generating MSC/CMC geospatial metadata. pygeometa was +pulled out of pygdm to focus on the core requirement of generating geospatial +metadata within a real-time environment and automated workflows.
+In 2015 pygeometa was made publically available in support of the Treasury +Board Policy on Acceptable Network and Device Use.
pygeometa also provides a custom pygeoapi processing plugin, providing +pygeometa functionality via OGC API - Processes.
+To integrate this plugin in pygeoapi:
+ensure pygeometa is installed into the pygeoapi deployment environment
+add the processes to the pygeoapi configuration as follows:
+
+pygeometa-metadata-schemas:
+ type: process
+ processor:
+ name: pygeometa.pygeoapi_plugin.PygeometaMetadataSchemasProcessor
+
+pygeometa-metadata-import:
+ type: process
+ processor:
+ name: pygeometa.pygeoapi_plugin.PygeometaMetadataImportProcessor
+
+pygeometa-metadata-validate:
+ type: process
+ processor:
+ name: pygeometa.pygeoapi_plugin.PygeometaMetadataValidateProcessor
+
+pygeometa-metadata-generate:
+ type: process
+ processor:
+ name: pygeometa.pygeoapi_plugin.PygeometaMetadataGenerateProcessor
+
+pygeometa-metadata-transform:
+ type: process
+ processor:
+ name: pygeometa.pygeoapi_plugin.PygeometaMetadataTransformProcessor
+
+pygeoapi openapi generate $PYGEOAPI_CONFIG --output-file $PYGEOAPI_OPENAPI
+
+The resulting processes will be available at the following endpoints:
+/processes/pygeometa-metadata-import
/processes/pygeometa-metadata-validate
/processes/pygeometa-metadata-generate
/processes/pygeometa-metadata-transform
Note that pygeoapi's OpenAPI/Swagger interface (at /openapi
) also
+provides a developer-friendly interface to test and run requests
This documentation focuses on the ISO 19115-2/19139-2 Extensions for acquisition and processing based schema enhancements in pygeometa.
+acquisition
The acquisition
object supports 1..n platform defintions.
acquisition.platforms
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
identifier | +Mandatory | +unique identification of the platform | +LANDSAT_8 | +ISO 19115 Part 2 Section B.2.5.8 | +
description | +Mandatory | +platform description | +My platform | +ISO 19115 Part 2 Section B.2.5.8 | +
acquisition.platforms
objects support 1..n instrument definitions.
acquisition.platforms[].instruments
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
identifier | +Mandatory | +instrument identifier | +OLI_TIRS | +ISO 19115 Part 2 B.2.5.4 | +
type | +Mandatory | +instrument type | +INS-NOBS | +ISO 19115 Part 2 B.2.5.4 | +
This documentation focuses on unique HNAP schema specifities in pygeometa.
+identification.keywords
HNAP support includes the following keywords
sections.
gc_cst
: Government of Canada Core Subject Thesaurushnap_category_information
: HNAPhnap_category_geography
: HNAPhnap_category_content
: HNAPKeyword requirements are the same as pygeometa's default keyword rules.
+distribution
Distribution identifier:
+_eng-CAN
and _fra-CAN
to distribution namesDistribution parameters:
+format_version:
Example of valid HNAP distribution sections:
+distribution:
+ waf_fra-CAN:
+ url: http://dd.weather.gc.ca/model_gem_global/25km/grib2/lat_lon/
+ type: WWW:LINK
+ name:
+ en: MSC Datamart
+ fr: Datamart du SMC
+ hnap_contenttype:
+ en: Dataset
+ fr: Données
+ format:
+ en: Other
+ fr: Autre
+ format_version: 0
+ function: download
+
+ waf_eng-CAN:
+ url: http://dd.weather.gc.ca/model_gem_global/25km/grib2/lat_lon/
+ type: WWW:LINK
+ name:
+ en: MSC Datamart
+ fr: Datamart du SMC
+ hnap_contenttype:
+ en: Dataset
+ fr: Données
+ format:
+ en: Other
+ fr: Autre
+ format_version: 0
+ function: download
+
+ wms_eng-CAN:
+ url: http://geo.weather.gc.ca/geomet/?lang=E&service=WMS&request=GetCapabilities&layers=GDPS.ETA_TT
+ hnap_contenttype:
+ en: Web Service
+ fr: Service Web
+ type: OGC:WMS
+ format: WMS
+ format_version: 1.1.1
+ name:
+ en: GDPS.ETA_TT
+ fr: GDPS.ETA_TT
+ function: download
+
+ wms_fra-CAN:
+ url: http://geo.weather.gc.ca/geomet/?lang=E&service=WMS&request=GetCapabilities&layers=GDPS.ETA_TT
+ hnap_contenttype:
+ en: Web Service
+ fr: Service Web
+ type: OGC:WMS
+ format: WMS
+ format_version: 1.1.1
+ name:
+ en: GDPS.ETA_TT
+ fr: GDPS.ETA_TT
+ function: download
+
This documentation focuses on the WMO Core Metadata Profile based schema +enhancements in pygeometa.
+identification
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
otherconstraints_wmo_data_policy | +Mandatory | +WMO data policy statment from WMO_DataLicenseCode (must be one of 'WMOEssential', 'WMOAdditional' 'WMOOther') | +WMOEssential | +WMO Core Metadata Profile 1.3, Part 1, Section 9.3.1 | +
otherconstraints_wmo_gts_priority | +Mandatory | +WMO GTS priority (must be one of 'GTSPriority1', 'GTSPriority2', 'GTSPriority3', 'GTSPriority4') | +GTSPriority2 | +WMO Core Metadata Profile 1.3, Part 1, Section 9.3.2 | +
identification.keywords
WMO support includes a wmo
keywords section (WMO Core Metadata Profile 1.3, Part 2, Table 16). Keyword requirements are the same as pygeometa's default keywords rules.
WMO Core Metadata Profile output can be validated using the WMO Core Metadata Profile Test Suite.
This documentation focuses on the draft WMO Core Metadata Profile based schema +enhancements in pygeometa.
+identification
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
wmo_data_policy | +Mandatory | +WMO data policy as per Resolution 1 (Cg-Ext(2021) (core or recommended ) |
+core |
+WMO Core Metadata Profile 2, clause 7 | +
identification.keywords
pygeometa WCMP2 support includes the following keywords
sections.
earth-system-discipline
: Earth system categories as defined by the WMO Unified Data Policy, Resolution 1 (Cg-Ext(2021), Annex 1.Ensure that vocabulary.url
is set to https://github.com/wmo-im/wis2-topic-hierarchy/blob/main/topic-hierarchy/earth-system-discipline.csv).
WMO Core Metadata Profile output can be validated using the pywcmp tool.
This documentation focuses on the WMO WIGOS Metadata Standard based schema +enhancements in pygeometa.
+pygeometa's MCF model for WIGOS Metadata inherits as well as extends the core +MCF constructs.
+Codes for WMO WIGOS are available at http://codes.wmo.int/wmdr
+metadata
See MCF reference
+contact
See MCF reference. WMO WIGOS MCF add the contact type facility
to
+attach contact information to a facility. The pointOfContact
MCF contact is attached
+to the wmdr:Header
element.
identification
See MCF reference
+facility
The facility
object consists of 1..n keys. Key names are up to the user
+with key objects having the model below.
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
identifier | +Mandatory | +WMO WIGOS identifier | +0-20008-0-JFJ | +WIGOS Metadata Representation, Section 8.6.4 | +
name | +Mandatory | ++ | + | WIGOS Metadata Representation, Section 4.3 | +
type | +Mandatory | +The type of the observing facility from the Station/platform type codelist (http://codes.wmo.int/wmdr/_FacilityType) | +landFixed | +WIGOS Metadata Representation, Section 4.3.2 | +
geopositioning_method | +Optional | +Element describes the geospatial reference system used for the specified geolocation (codelist http://codes.wmo.int/wmdr/_GeopositioningMethod) | +gps | +WIGOS Metadata Representation, Section 4.2.2 | +
url | +Optional | +An online resource containing additional information about the facility or equipment | +https://example.org/station/123 | +WIGOS Metadata Representation, Section 4.2.2 | +
date_established | +Mandatory | +Date at which the observingFacility was established. Normally considered to be the date the first observations were made | +2011-11-11T11:11:11Z | +WIGOS Metadata Representation, Section 4.3.2 | +
wmo_region | +Mandatory | +The WMO region the observing facility is located in, from the WMORegionType codelist (http://codes.wmo.int/wmdr/_WMORegion) | +northCentralAmericaCaribbean | +WIGOS Metadata Representation, Section 4.3.2 | +
territory
The territory
object is a child of the facility
object and
+allows for specifying 1..n child objects to model changing territory names
+over time. At least one child object is required.
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
name | +Mandatory | +The territory the observing facility is located in, from the TerritoryType codelist (http://codes.wmo.int/wmdr/_TerritoryName) | +CAN |
+WIGOS Metadata Representation, Section 4.3.2 | +
valid_period | +Optional | +Specifies at least the begin date of the indicated territoryName. If omitted, the dateEstablished of the facility will be assumed | +begin: 2011-11-11 , end: now |
+WIGOS Metadata Representation, Section 4.3.2 | +
spatiotemporal
The spatiotemporal
object is a child of the facility
object and
+allows for specifying 1..n child objects to model a moving location
+over time. At least one child object is required.
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
timeperiod | +Mandatory | +Specifies at least the begin date accompanying the location | +begin: 2011-11-11 , end: now |
+WIGOS Metadata Representation, Section 7.9 | +
location | +Mandatory. The location property includes a crs property (EPSG code), and point property (x,y,z) |
+Representative or conventional geospatial location of observing facility, the reference location. This will always be a point location, but this location can change with time. | +crs: 4326, point: -75,45,400 , end: now |
+WIGOS Metadata Representation, Section 7.9 | +
program_affiliation
The program_affiliation
object is a child of the facility
object and
+allows for specifying 1..n child objects to model program affiliations.
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
program | +Mandatory | +Program Affiliation, see http://codes.wmo.int/wmdr/_ProgramAffiliation | +GOS |
+WIGOS Metadata Representation, Section 4.3.2 | +
reporting_status
The reporting_status
object is a child of the program_affiliation
object and
+allows for specifying 1..n child objects to model program affiliations reporting status
+over time.
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
status | +Mandatory | +Declared reporting status of the observing facility from the ReportingStatusType codelist (http://codes.wmo.int/wmdr/_ReportingStatus) | +operational |
++ |
valid_period | +Optional | +Specifies at least the begin date of the indicated reportingStatus. | +begin: 2011-11-11 , end: now |
++ |
climate_zone
The climate_zone
object is a child of the facility
object and
+allows for specifying 0..n child objects to model changing climate zones over time.
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
name | +Mandatory | +Climate zone of the observing facility, from the ClimateZone codelist (http://codes.wmo.int/wmdr/_ClimateZone) | +snowFullyHumidCoolSummer |
+WIGOS Metadata Representation, Section 4.3.2 | +
valid_period | +Optional | +Specifies at least the begin date of the indicated climate zone. If omitted, the dateEstablished of the facility will be assumed | +begin: 2011-11-11 , end: now |
+WIGOS Metadata Representation, Section 4.3.2 | +
surface_cover
The surface_cover
object is a child of the facility
object and
+allows for specifying 0..n child objects to model changing surface covers over time.
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
name | +Mandatory | +Predominant surface cover, from the given surface cover classification scheme and the SurfaceCover codelist (http://codes.wmo.int/wmdr/_SurfaceCover) | +rainfedCroplands |
+WIGOS Metadata Representation, Section 4.3.2 | +
surface_cover_classification | +Mandatory | +Surface cover classification scheme, from the SurfaceCoverClassification codelist (http://codes.wmo.int/wmdr/_SurfaceCoverClassification) | +globCover2009 |
+WIGOS Metadata Representation, Section 4.3.2 | +
valid_period | +Optional | +Specifies at least the begin date. If omitted, the dateEstablished of the facility will be assumed | +begin: 2011-11-11 , end: now |
+WIGOS Metadata Representation, Section 4.3.2 | +
surface_roughness
The surface_roughness
object is a child of the facility
object and
+allows for specifying 0..n child objects.
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
name | +Mandatory | +Surface roughness of surrounding of the observing facility, from the SurfaceRoughness codelist (http://codes.wmo.int/wmdr/_SurfaceRoughness) | +rough |
+WIGOS Metadata Representation, Section 4.3.2 | +
valid_period | +Optional | +Specifies at least the begin date of the indicated surface roughness. If omitted, the dateEstablished of the facility will be assumed | +begin: 2011-11-11 , end: now |
+WIGOS Metadata Representation, Section 4.3.2 | +
topography_bathymetry
The topography_bathymetry
object is a child of the facility
object and
+allows for specifying 0..n child objects to model topography or bathymetry descriptions over time.
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
local_topography | +Optional | +Local topography of the observing facility from the LocalTopography codelist (http://codes.wmo.int/wmdr/_LocalTopography) | +flat |
+WIGOS Metadata Representation, Section 4.3.2 | +
relative_elevation | +Optional | +Relative elevation of the observing facility compared to its surrounding, from the RelativeElevation codelist (http://codes.wmo.int/wmdr/_RelativeElevation) | +inapplicable |
+WIGOS Metadata Representation, Section 4.3.2 | +
topographic_context | +Optional | +Topographic context of the observing facility, from the TopographicContext codelist (http://codes.wmo.int/wmdr/_TopographicContext) | +plains |
+WIGOS Metadata Representation, Section 4.3.2 | +
altitude_or_depth | +Optional | +Altitude or depth of observing facility, from the AltitudeOrDepth codelist (http://codes.wmo.int/wmdr/_AltitudeOrDepth) | +middleAltitude |
+WIGOS Metadata Representation, Section 4.3.2 | +
valid_period | +Optional | +Specifies at least the begin date. If omitted, the dateEstablished of the facility will be assumed | +begin: 2011-11-11 , end: now |
+WIGOS Metadata Representation, Section 4.3.2 | +
observations
The observations
object is a child of the facility
object and
+allows for specifying 0..n child objects to model observations provided by a facility.
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
name | +mandatory | +Freeform name of observed property | +Total column ozone |
+WIGOS Metadata Representation, Section 4.3.2 | +
timeperiod | +Optional | +The time period over which the property is observed. | +begin: 2011-11-11 , end: now |
+WIGOS Metadata Representation, Section 6.2.5 | +
url | +mandatory | +The online resource of the final result (output) of the observation | +https://example.org/data/atmos/spectral/total-column-ozone/111 | +WIGOS Metadata Representation, Section 6.2.5 | +
observedproperty | +Mandatory | +The property type being observed (ObservingMethodAtmosphere , ObservingMethodTerrestrial , ObservedVariableAtmosphere , ObservedVariableEarth , ObservedVariableOcean , ObservedVariableOuterSpace , ObservedVariableTerrestrial ) and name (see WMO code lists) relevant to the type |
++ | type: ObservingMethodAtmosphere , name: 263 |
+
Version: 1.0
+.yml
as file extensionfoo.shp
, foo.yml
)#
) will be ignored:
) in your text / value, use quotation marks ("
or '
) on either side of your text to avoid mapping errors when parsing the YAML fileMCFs are versioned using X.Y (MAJOR.MINOR changes) format. If a non supported MCF version is provided, pygeometa will throw an error and stop processing the MCF. Thus, the user must provide a valid and supported MCF version to generate the metadata.
+The MCF MUST be utf8 encoded. That is all.
+Is your MCF Encoded as UTF8?
+# editing in vim
+# :set encoding=utf8
+# pasting in vim
+# in insert mode, hit CTRL-V $CODE, where $CODE is as per http://www.htmlhelp.com/reference/charset
+# to see how the file is actually encoded on disk
+file --mime-encoding file.txt
+file -i file.txt
+# to convert from one encoding to another
+iconv -f iso8859-1 -t utf-8 file.yml > file.yml.new
+
+In the case where the user is generating metadata for multiple datasets which have common information, it becomes efficient to nest MCF together. pygeometa allows chaining MCFs to inherit values from other MCFs. Example: multiple datasets MCFs can refer a single MCF that contain contact information common to all those datasets.
+To use MCF nesting:
+base_mcf: foo.yml
Notes about nesting MCFs:
+base_mcf
per section of a MCFpygeometa supports environment variables, using the notation in the example MCF snippet below:
+metadata:
+ identifier: 3f342f64-9348-11df-ba6a-0014c2c00eab
+ parentidentifier: ${COLLECTION_ID}
+
+pygeometa supports default and alternate languages in ISO metadata.
+Multilingual support is driven by the following sections in [metadata]
:
language
: 2 letter language code (i.e. en
, fr
) of primary languagelanguage_alternate
: 2 letter language code (i.e. en
, fr
) of secondary languageExample:
+metadata:
+ language: en
+ language_alternate: fr
+
+If language_alternate
is not defined or missing, pygeometa assumes a single language.
Values which support multilingual values can be specified with as keys to denote the respective language. Examples:
+# single language
+title: foo
+
+# single language, explicit
+title:
+ en: foo
+
+# two languages, explicit
+title:
+ en: foo
+ fr: bar
+
+The language
value in the metadata
section must be a 2 letters language code. The user can use any language. For example: es
for Spanish.
mcf
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
version | +Mandatory | +version of MCF format | +1.0 | +pygeometa | +
metadata
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
identifier | +Mandatory | +unique identifier for this metadata file | +11800c2c-e6b9-11df-b9ae-0014c2c00eab | +ISO 19115:2003 Section B.2.1 | +
language | +Mandatory | +primary language used for documenting metadata, the metadata records themselves can be provided in multiple languages nonetheless | +en | +ISO 19115:2003 Section B.2.1 | +
language_alternate | +Optional | +alternate language used for documenting metadata | +en | +ISO 19115:2003 Annex J | +
charset | +Mandatory | +full name of the character coding standard used for the metadata set | +utf8 | +ISO 19115:2003 Section B.2.1 | +
parentidentifier | +Optional | +file identifier of the metadata to which this metadata is a subset | +11800c2c-e6b9-11df-b9ae-0014c2c33ebe | +ISO 19115:2003 Section B.2.1 | +
hierarchylevel | +Mandatory | +level to which the metadata applies (must be one of 'series', 'software', 'featureType', 'model', 'collectionHardware', 'collectionSession', 'nonGeographicDataset', 'propertyType', 'fieldSession', 'dataset', 'service', 'attribute', 'attributeType', 'tile', 'feature', 'dimensionGroup' | +dataset | +ISO 19115:2003 Section B.2.1 | +
datestamp | +Mandatory | +date that the metadata was created, pygeometa supports specifying the $date$ or $datetime$ variable to update the date value at run time | +2000-11-11 or 2000-01-12T11:11:11Z | +ISO 19115:2003 Section B.2.1 | +
dataseturi | +Optional | +Uniformed Resource Identifier (URI) of the dataset to which the metadata applies | +urn:x-wmo:md:int.wmo.wis::http://geo.woudc.org/def/data/uv-radiation/uv-irradiance |
+ISO 19115:2003 Section B.2.1 | +
spatial
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
datatype | +Mandatory | +method used to represent geographic information in the dataset (must be one of 'vector', 'grid', 'textTable', 'tin', 'stereoModel', 'video') | +vector | +Section B.5.26 | +
geomtype | +Mandatory | +name of point or vector objects used to locate zero-, one-, two-, or threedimensional spatial locations in the dataset (must be one of 'complex', 'composite', 'curve', 'point', 'solid', 'surface') | +point | +ISO 19115:2003 B.5.15 | +
identification
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
doi | +Optional | +Digital Object Identifier (DOI) | +12345 | +ISO 19115:2003 Section B.3.2.1 | +
language | +Optional | +language(s) used within the dataset. If the dataset is made of numerical values, the dataset language can be set to 'missing', 'withheld', 'inapplicable', 'unknown' or 'template' | +eng; CAN | +ISO 19115:2003 Section B.2.2.1 | +
charset | +Optional | +full name of the character coding standard used for the dataset | +eng; CAN | +ISO 19115:2003 Section B.2.1 | +
title | +Mandatory | +name by which the cited resource is known | +Important Bird Areas | +ISO 19115:2003 Section B.3.2.1 | +
edition | +Optional | +version of the cited resource | +1.8.0 | +ISO 19115:2003 Section B.3.2.1 | +
abstract | +Mandatory | +brief narrative summary of the content of the resource(s) | +Birds in important areas... | +ISO 19115:2003 Section B.2.2.1 | +
topiccategory | +Mandatory | +main theme(s) of the dataset (must be one of 'geoscientificInformation', 'farming', 'elevation', 'utilitiesCommunication', 'oceans', 'boundaries', 'inlandWaters', 'intelligenceMilitary', 'environment', 'location', 'economy', 'planningCadastre','biota', 'health', 'imageryBaseMapsEarthCover', 'transportation', 'society', 'structure', 'climatologyMeteorologyAtmosphere'. More than one topic category can be specified | +climatologyMeteorologyAtmosphere | +ISO 19115:2003 Section B.5.27 | +
fees | +Mandatory | +fees and terms for retreiving the resource. Include monetary units (as specified in ISO 4217). If there are no fees, use the term 'None' | +None,ISO 19115:2003 Section B.2.10.6 | ++ |
accessconstraints | +Mandatory | +access constraints applied to assure the protection of privacy or intellectual property, and any special restrictions or limitations on obtaining the resource or metadata (must be one of 'patent', 'otherRestrictions','copyright','trademark', 'patentPending','restricted','license', 'intellectualPropertyRights'). If there are no accessconstraints, use the term 'otherRestrictions' | +None | +ISO 19115:2003 Section B.2.3 | +
rights | +Mandatory | +Information about rights held in and over the resource. pygeometa supports using the $year$ variable to update the year value at run time. | +Copyright (c) 2010 Her Majesty the Queen in Right of Canada | +DMCI 1.1 | +
url | +Mandatory | +URL of the dataset to which the metadata applies | +http://host/path/ | +ISO 19115:2003 Section B.2.1 | +
status | +Mandatory | +"the status of the resource(s) (must be one of 'planned','historicalArchive','completed','onGoing', 'underDevelopment','required','obsolete')" | +completed | +ISO 19115:2003 Section B.2.2.1 | +
maintenancefrequency | +Mandatory | +frequency with which modifications and deletions are made to the data after it is first produced (must be one of 'continual', 'daily', 'weekly', 'fortnightly', 'monthly', 'quarterly', 'biannually', 'annually', 'asNeeded', 'irregular', 'notPlanned', 'unknown' | +continual | +ISO 19115:2003 B.5.18 | +
browsegraphic | +Optional | +graphic that provides an illustration of the dataset | +http://example.org/dataset.png | +ISO 19115:2003 B.2.2.2 | +
identification.dates
identification.dates
sections can have 1..n dates
sections as required with the following object names/types:
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
creation | +Mandatory* | +'creation' reference date for the cited resource, referring to when the resource was brought into existence, *: presence of creation or publication or revision is mandatory | +2000-09-01 or 2000-09-01T00:00:00Z | +ISO 19115:2003 Section B.3.2.4 | +
publication | +Optional* | +'publication' reference date for the cited resource, referring to when the resource was issued, *: presence of creation or publication or revision is mandatory | +2000-09-01 or 2000-09-01T00:00:00Z | +ISO 19115:2003 Section B.3.2.4 | +
revision | +Optional* | +'revision' reference date for the cited resource, refersring to when the resource was examined or re-examined and improved or amended, *: presence of creation or publication or revision is mandatory | +2000-09-01 or 2000-09-01T00:00:00Z | +ISO 19115:2003 Section B.3.2.4 | +
identification:
+ ...
+ dates:
+ creation: 2011-11-11
+ publication: 2000-09-01T00:00:00Z
+
+identification.extents
identification.extents
sections can have 1..n spatial
and temporal
sections as required with the following properties.
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
spatial.bbox | +Mandatory | +geographic position of the dataset, formatted as as list of [minx,miny,maxx,maxy] | +-141,42,-52,84 | +ISO 19115:2003 Section B.3.1.2 | +
spatial.crs | +Mandatory | +EPSG code identifier | +4326 | +ISO 19115:2003 Section B.2.7.3 | +
spatial.description | +Optional | +description of the geographic area using an identifier | +Toronto, Ontario, Canada | +ISO 19115:2003 Section B.3.1.2 | +
temporal.begin | +Optional | +Starting time period covered by the content of the dataset, either time period (startdate/enddate) or a single point in time value | +1950-07-31 | +ISO 19115:2003 Section B.3.1.3 | +
temporal.end | +Optional | +End time period covered by the content of the dataset, either time period (startdate/enddate) or a single point in time value. For data updated in realtime, use the term now |
+now | +ISO 19115:2003 Section B.3.1.3 | +
temporal.resolution | +Optional | +Minimum time period resolvable in the dataset, as an ISO 8601 duration | +P1D | +ISO 19108 | +
identification:
+ ...
+ extents:
+ spatial:
+ - bbox: [-141,42,-52,84]
+ crs: 4326
+ temporal:
+ - begin: 1950-07-31
+ end: now
+ resolution: P1D
+
+identification.keywords
identification
sections can have 1..n keywords
sections as required using nesting. Example:
identification:
+ ...
+ keywords:
+ default:
+ keywords:
+ en: [foo1, bar1]
+ fr: [foo2, bar2]
+ keywords_type: theme
+ vocabulary:
+ name: my vocabulary
+ url: https://example.org/vocab
+ wmo:
+ keywords:
+ en: [foo3, bar3]
+ fr: [foo4, bar4]
+ keywords_type: theme
+ keywords_codelist: http://wis.wmo.int/2011/schemata/iso19139_2007/schema/resources/Codelist/gmxCodelists.xml#MD_KeywordTypeCode
+
+Schema specific keywords sections
+wmo
: World Meteorological Organization keywords (used for WMO Core Metadata Profile)gc_cst
: Government of Canada Core Subject Thesaurus (used for HNAP)hnap_category_information
: HNAPhnap_category_geography
: HNAPhnap_category_content
: HNAPWithin each keywords
section, the following elements are supported:
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
keywords | +Mandatory | +category keywords | +keyword1,keyword2,keyword3 | +ISO 19115:2003 Section B.2.2.1 | +
keywords_type | +Mandatory | +subject matter used to group similar keywords (must be one of 'discipline', 'place', 'stratum', 'temporal', 'theme') | +theme | +ISO 19115:2003 Section B.2.2.3 | +
keywords_codelist | +Optional | +specific code list URL (for advanced use cases, else the default is as per the given specified schema) | +http://wis.wmo.int/2011/schemata/iso19139_2007/schema/resources/Codelist/gmxCodelists.xml | +ISO 19115:2003 Section B.2.2.3 | +
identification.keywords.vocabulary
identification.keywords
sections can specify an optional vocabulary
section with the following elements:
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
name | +Mandatory | +name of the source of keywords (English) | +my thesaurus name | +ISO 19115:2003 Section B.2.2.3 | +
url | +Optional | +URL of source of keywords | +https://example.org/my-vocab | +- | +
identification.license
identification.license
sections can provide a optinoal license via a name or URL using the following elements:
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
name | +Mandatory | +name of license | +CC BY 4.0 | +- | +
url | +Optional | +URL of license | +https://creativecommons.org/licenses/by/4.0 | +- | +
content_info
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
type | +Mandatory | +Content type (must be one of 'coverage', 'image', 'feature_catalogue' | +image | +ISO 19115:2003 Section B.2.8.1 | +
cloud_cover | +Optional | +area of the dataset obscured by clouds, expressed as a percentage of the spatial extent | +72 | +ISO 19115:2003 Section B.2.8.1 | +
processing_level | +Optional | +image distributor’s code that identifies the level of radiometric and geometric processing that has been applied | +L1 | +ISO 19115:2003 Section B.2.8.1 | +
content_info.attributes
content_info
sections can have 1..n attributes
sections as required using nesting. Example:
attributes:
+ - name: temperature
+ title:
+ en: Air temperature
+ abstract:
+ en: Description of air temperature attribute
+ type: number
+ units: K
+ values: [1.2, 2.5, 1.3]
+
+Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
name | +Mandatory | +attribute name | +temperature |
++ |
title | +Optional | +attribute title | +Air temperature | ++ |
abstract | +Optional | +attribute description | +Description of air temperature | ++ |
url | +Optional | +URL with more information about the attribute | +Air temperature | ++ |
type | +Optional | +data type | +(must be one of 'string', 'number', 'integer', 'object', 'array', 'boolean') | +string | +
units | +Optional | +SI units | +K | +https://en.wikipedia.org/wiki/International_System_of_Units | +
values | +Optional | +specification of attribute values | +see below | ++ |
content_info.attributes.values
Attributes may also provide the values within a given domain, via one of the following constructs:
+content_info.attributes.values.enum
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
enum | +Optional | +Enumerated list of values | +[1, 2, 3, 4] | ++ |
Example:
+ values:
+ enum: [1, 2, 3. 4]
+
+content_info.attributes.values.range
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
range | +Optional | +Range of values (min/max) | +[1, 4] | ++ |
Example:
+ values:
+ range: [1, 4]
+
+content_info.attributes.values.codelist
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
codelist | +Optional | +codelist of values | +see below | ++ |
codelist.name | +Mandatory | +value name | +foo | ++ |
codelist.title | +Optional | +value title | +Foo | ++ |
codelist.abstract | +Optional | +value abstract | +Description of value Foo | ++ |
codelist.url | +Optional | +URL with more information about the value | +https://example.org/foo | ++ |
Example:
+values:
+ codelist:
+ - name: foo
+ title:
+ en: foo title
+ abstract:
+ en: foo description
+ url: https://example.org/values/foo
+
+content_info.dimensions
content_info
objects support 1..n dimension
objects.
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
name | +Mandatory | +name of dimension | +B1 | +ISO 19115:2003 Section B.2.8.2 | +
units | +Mandatory | +units in which sensor wavelengths are expressed | +nm | +ISO 19115:2003 Section B.2.8.2 | +
min | +Mandatory | +shortest wavelength that the sensor is capable of collecting within a designated band | +101 | +ISO 19115:2003 Section B.2.8.2 | +
max | +Mandatory | +longest wavelength that the sensor is capable of collecting within a designated band | +199 | +ISO 19115:2003 Section B.2.8.2 | +
contact
MCFs can have 1..n contact
sections as required using nesting. Example:
contact:
+ pointOfContact:
+ ....
+ distributor:
+ ....
+
+The contact.pointOfContact
section provides information for the pointOfContact
role (see ISO 19115:2003 Section B.3.2.1). This section is minimally required.
Within each contact
section, the following elements are supported:
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
organization | +Mandatory | +name of the responsible organization | +Environment Canada | +ISO 19115:2003 Section B.3.2.1 | +
url | +Mandatory | +on-line information that can be used to contact the individual or organization | +http://host/path | +ISO 19115:2003 Section B.3.2.3 | +
individualname | +Mandatory | +name of the responsible person-surname | +given name | +title seperated by a delimiter | +
positionname | +Mandatory | +role or position of the responsible person | +Senior Systems Scientist | +ISO 19115:2003 Section B.3.2.1 | +
phone | +Mandatory | +telephone number by which individuals can speak to the responsible organization or individual | ++01-123-456-7890 | +ISO 19115:2003 Section B.3.2.7 | +
fax | +Mandatory | +telephone number of a facsimile machine for the responsible organization or individual | ++01-123-456-7890 | +ISO 19115:2003 Section B.3.2.7 | +
address | +Mandatory | +address line for the location (as described in ISO 11180 | +Annex A) | +4905 Dufferin Street | +
city | +Mandatory | +city of the location | +Toronto | +ISO 19115:2003 Section B.3.2.2 | +
administrativearea | +Mandatory | +state, province of the location | +Ontario | +ISO 19115:2003 Section B.3.2.2 | +
postalcode | +Mandatory | +ZIP or other postal code | +M3H 5T4 | +ISO 19115:2003 Section B.3.2.2 | +
country | +Mandatory | +country of the physical address | +Canada | +ISO 19115:2003 Section B.3.2.2 | +
Mandatory | +address of the electronic mailbox of the responsible organization or individual | +foo@bar.tld | +ISO 19115:2003 Section B.3.2.2 | +|
hoursofservice | +Optional | +time period (including time zone) when individuals can contact the organization or individual | +0700h - 1500h EST | +ISO 19115:2003 Section B.3.2.3 | +
contactinstructions | +Optional | +supplementalinstructions on how or when to contact the individual or organization | +contact during working business hours | +ISO 19115:2003 Section B.3.2.3 | +
contact.distributor
The contact.distributor
section provides information for the distributor
role (see ISO 19115:2003 Section B.3.2.1) and has the identical structure as contact.pointOfContact
.
If contact information is the same for both, use YAML node anchors and references to have it provided in both sections in the metadata:
+contact:
+ pointOfContact: &id_contact_poc
+ ...
+
+ distributor: *id_contact_poc
+
+distribution
MCFs can have 1..n distribution
sections as required using nesting. Example:
distribution:
+ wms:
+ ....
+ waf:
+ ....
+
+Within each distribution
section, the following elements are supported:
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
url | +Mandatory | +location (address) for on-line access using a Uniform Resource Locator address or similar addressing scheme such as http://www.isotc211.org/ | +http://host/path | +ISO 19115:2003 Section B.3.2.5 | +
type | +Mandatory | +connection protocol to be used. Must be one of the identifier values from https://github.com/OSGeo/Cat-Interop/blob/master/LinkPropertyLookupTable.csv |
+WWW:LINK | +ISO 19115:2003 Section B.3.2.5 | +
rel | +Optional | +the type or semantic of the relation. The value should be an IANA link relation or a relation type specific to an established standard | +canonical | +Link Relations - Internet Assigned Numbers Authority | +
name | +Mandatory | +name of the online resource | +Download portal | +ISO 19115:2003 Section B.3.2.5 | +
description | +Mandatory | +detailed text description of what the online resources is/does | +brief description of the online resource (English) | +ISO 19115:2003 Section B.3.2.5 | +
function | +Mandatory | +code for function performed by the online resource (must be one of 'download', 'information', 'offlineAccess', 'order', 'search') | +download | +ISO 19115:2003 Section B.3.2.5 | +
format | +Optional | +Format of the distribution method | +WMS | +HNAP 2.3 | +
format_version | +Optional | +Format version of the distribution method | +1.0 | +HNAP 2.3 | +
channel | +Optional | +channel/topic/exchange when link is a Pub/Sub endpoint | +my/cool/topic | +OGC API - Pub/Sub | +
dataquality
Property Name | +Mandatory/Optional | +Description | +Example | +Reference | +
---|---|---|---|---|
scope.level | +Optional | +hierarchical level of the data specificed by the scope | +dataset | +ISO 19115:2003 Section B.2.4.5 | +
lineage.statement | +Optional | +general explanationn of the data producer's knowledge about the lineage of a dataset | +this dataset was produced from a custom process against dataset xyz | +ISO 19115:2003 Section B.2.4.2.1 | +
pygeometa supports using the following keyword substitutions:
+$year$
, which is substituted for the current year with the YYYY format, example: 2016$date$
, which is substituted for the current date with the YYYY-MM-DD, example: 2016-12-22 format$datetime$
, which is substituted for the current date and time with the YYYY-MM-DDThh:mm:ssZ, example: 2016-12-22T16:34:15Z format' + escapeHtml(summary) +'
' + noResultsText + '
'); + } +} + +function doSearch () { + var query = document.getElementById('mkdocs-search-query').value; + if (query.length > min_search_length) { + if (!window.Worker) { + displayResults(search(query)); + } else { + searchWorker.postMessage({query: query}); + } + } else { + // Clear results for short queries + displayResults([]); + } +} + +function initSearch () { + var search_input = document.getElementById('mkdocs-search-query'); + if (search_input) { + search_input.addEventListener("keyup", doSearch); + } + var term = getSearchTermFromLocation(); + if (term) { + search_input.value = term; + doSearch(); + } +} + +function onWorkerMessage (e) { + if (e.data.allowSearch) { + initSearch(); + } else if (e.data.results) { + var results = e.data.results; + displayResults(results); + } else if (e.data.config) { + min_search_length = e.data.config.min_search_length-1; + } +} + +if (!window.Worker) { + console.log('Web Worker API not supported'); + // load index in main thread + $.getScript(joinUrl(base_url, "search/worker.js")).done(function () { + console.log('Loaded worker'); + init(); + window.postMessage = function (msg) { + onWorkerMessage({data: msg}); + }; + }).fail(function (jqxhr, settings, exception) { + console.error('Could not load worker.js'); + }); +} else { + // Wrap search in a web worker + var searchWorker = new Worker(joinUrl(base_url, "search/worker.js")); + searchWorker.postMessage({init: true}); + searchWorker.onmessage = onWorkerMessage; +} diff --git a/search/search_index.json b/search/search_index.json new file mode 100644 index 0000000..d2feff7 --- /dev/null +++ b/search/search_index.json @@ -0,0 +1 @@ +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"pygeometa Metadata Creation for the Rest of Us pygeometa provides a lightweight and Pythonic approach for users to easily create geospatial metadata in standards-based formats using simple configuration files (affectionately called metadata control files [MCF]). Leveraging the simple but powerful YAML format, pygeometa can generate metadata in numerous standards. Users can also create their own custom metadata formats which can be plugged into pygeometa for custom metadata format output. For developers, pygeometa provides a Pythonic API that allows developers to tightly couple metadata generation within their systems and integrate nicely into metadata production pipelines. The project supports various metadata formats out of the box including ISO 19115, the WMO Core Metadata Profile, and the WIGOS Metadata Standard. Can't find the format you're looking for? Element(s) missing from a given format? Feel free to open an issue ! pygeometa has minimal dependencies (install is less than 50 kB), and provides a flexible extension mechanism leveraging the Jinja2 templating system. pygeometa is open source and released under an MIT license . Features simple YAML-based configuration real-time MCF validation extensible: plugin architecture allows for easy addition of new metadata formats using Jinja2 templates or custom workflow (JSON, YAML, CSV, etc.) flexible: use as a command-line tool or integrate as a library import from external metadata sources multilingual support History Started in 2009, pygeometa originated within an internal project called pygdm, which provided generic geospatial data management functions. pygdm (now end of life) was used for generating MSC/CMC geospatial metadata. pygeometa was pulled out of pygdm to focus on the core requirement of generating geospatial metadata within a real-time environment and automated workflows. In 2015 pygeometa was made publically available in support of the Treasury Board Policy on Acceptable Network and Device Use .","title":"Home"},{"location":"#pygeometa","text":"","title":"pygeometa"},{"location":"#features","text":"simple YAML-based configuration real-time MCF validation extensible: plugin architecture allows for easy addition of new metadata formats using Jinja2 templates or custom workflow (JSON, YAML, CSV, etc.) flexible: use as a command-line tool or integrate as a library import from external metadata sources multilingual support","title":"Features"},{"location":"#history","text":"Started in 2009, pygeometa originated within an internal project called pygdm, which provided generic geospatial data management functions. pygdm (now end of life) was used for generating MSC/CMC geospatial metadata. pygeometa was pulled out of pygdm to focus on the core requirement of generating geospatial metadata within a real-time environment and automated workflows. In 2015 pygeometa was made publically available in support of the Treasury Board Policy on Acceptable Network and Device Use .","title":"History"},{"location":"pygeoapi-plugin/","text":"pygeoapi plugin Overview pygeometa also provides a custom pygeoapi processing plugin, providing pygeometa functionality via OGC API - Processes. Installation To integrate this plugin in pygeoapi: ensure pygeometa is installed into the pygeoapi deployment environment add the processes to the pygeoapi configuration as follows: pygeometa-metadata-schemas: type: process processor: name: pygeometa.pygeoapi_plugin.PygeometaMetadataSchemasProcessor pygeometa-metadata-import: type: process processor: name: pygeometa.pygeoapi_plugin.PygeometaMetadataImportProcessor pygeometa-metadata-validate: type: process processor: name: pygeometa.pygeoapi_plugin.PygeometaMetadataValidateProcessor pygeometa-metadata-generate: type: process processor: name: pygeometa.pygeoapi_plugin.PygeometaMetadataGenerateProcessor pygeometa-metadata-transform: type: process processor: name: pygeometa.pygeoapi_plugin.PygeometaMetadataTransformProcessor regenerate the pygeoapi OpenAPI configuration pygeoapi openapi generate $PYGEOAPI_CONFIG --output-file $PYGEOAPI_OPENAPI restart pygeoapi Usage The resulting processes will be available at the following endpoints: /processes/pygeometa-metadata-import /processes/pygeometa-metadata-validate /processes/pygeometa-metadata-generate /processes/pygeometa-metadata-transform Note that pygeoapi's OpenAPI/Swagger interface (at /openapi ) also provides a developer-friendly interface to test and run requests","title":"pygeoapi plugin"},{"location":"pygeoapi-plugin/#pygeoapi-plugin","text":"","title":"pygeoapi plugin"},{"location":"pygeoapi-plugin/#overview","text":"pygeometa also provides a custom pygeoapi processing plugin, providing pygeometa functionality via OGC API - Processes.","title":"Overview"},{"location":"pygeoapi-plugin/#installation","text":"To integrate this plugin in pygeoapi: ensure pygeometa is installed into the pygeoapi deployment environment add the processes to the pygeoapi configuration as follows: pygeometa-metadata-schemas: type: process processor: name: pygeometa.pygeoapi_plugin.PygeometaMetadataSchemasProcessor pygeometa-metadata-import: type: process processor: name: pygeometa.pygeoapi_plugin.PygeometaMetadataImportProcessor pygeometa-metadata-validate: type: process processor: name: pygeometa.pygeoapi_plugin.PygeometaMetadataValidateProcessor pygeometa-metadata-generate: type: process processor: name: pygeometa.pygeoapi_plugin.PygeometaMetadataGenerateProcessor pygeometa-metadata-transform: type: process processor: name: pygeometa.pygeoapi_plugin.PygeometaMetadataTransformProcessor regenerate the pygeoapi OpenAPI configuration pygeoapi openapi generate $PYGEOAPI_CONFIG --output-file $PYGEOAPI_OPENAPI restart pygeoapi","title":"Installation"},{"location":"pygeoapi-plugin/#usage","text":"The resulting processes will be available at the following endpoints: /processes/pygeometa-metadata-import /processes/pygeometa-metadata-validate /processes/pygeometa-metadata-generate /processes/pygeometa-metadata-transform Note that pygeoapi's OpenAPI/Swagger interface (at /openapi ) also provides a developer-friendly interface to test and run requests","title":"Usage"},{"location":"tutorial/","text":"pygeometa Tutorial Overview This tutorial provides a tour of pygeometa for both users and developers, and is aimed at getting you up and running quickly. Let's go! For Users Installation You require Python 3 or greater to use pygeometa. The easiest way to install pygeometa is using pip: pip3 install pygeometa This will install the latest stable release. If you are looking to work with pygeometa from source, see the For Developers section for more information. Workflow The basic pygeometa workflow is: Create a 'metadata control file' YAML file that contains metadata information Modify the sample.yml example pygeometa supports nesting MCFs together, allowing providing a single MCF for common metadata parameters (e.g. common contact information) Refer to the Metadata Control File Reference documentation Run pygeometa for the .yml file with a specified target metadata schema Running # show all subcommands pygeometa # show all supported schemas pygeometa metadata schemas # provide a basic sanity check/report on an MCF (Metadata Control File) pygeometa metadata info path/to/file.yml # generate an ISO 19139 document to stdout pygeometa metadata generate path/to/file.yml --schema=iso19139 # generate an ISO 19139 document to disk pygeometa metadata generate path/to/file.yml --schema=iso19139 --output=some_file.xml # generate an ISO 19139 document to disk with debugging (ERROR, WARNING, INFO, DEBUG) pygeometa metadata generate path/to/file.yml --schema=iso19139 --output=some_file.xml --verbosity=DEBUG # add verbose (ERROR, WARNING, INFO, DEBUG) # use your own defined schema pygeometa metadata generate path/to/file.yml --schema_local=/path/to/my-schema --output=some_file.xml # to file # validate an MCF document pygeometa validate path/to/file.yml # import a metadata document to MCF pygeometa metadata import path/to/file.xml --schema=iso19139 # transform from one metadata representation to another pygeometa metadata transform path/to/file.xml --input-schema=iso19139 --output-schema=oarec-record For Developers Installation pygeometa is best installed and used within a Python virtualenv. Requirements Python 3 and above Python virtualenv package Dependencies Dependencies are listed in requirements.txt . Dependencies are automatically installed during pygeometa's installation. Installing the Package from Source python3 -m venv my-env cd my-env . bin/activate git clone https://github.com/geopython/pygeometa.git cd pygeometa python3 setup.py build python3 setup.py install Using the API from Python from pygeometa.core import read_mcf, render_j2_template # read from disk mcf_dict = read_mcf('/path/to/file.yml') # read from string mcf_dict = read_mcf(mcf_string) # choose ISO 19139 output schema from pygeometa.schemas.iso19139 import ISO19139OutputSchema iso_os = ISO19139OutputSchema() # default schema xml_string = iso_os.write(mcf_dict) # user-defined schema xml_string = render_j2_template(mcf_dict, schema_local='/path/to/new-schema') # write to disk with open('output.xml', 'wb') as ff: ff.write(xml_string) Development Setting up a Development Environment Same as installing a package. Use a virtualenv. Also install developer requirements: pip3 install -r requirements-dev.txt Adding a Metadata Schema to the Core Adding an output metadata schemas to pygeometa involves extending pygeometa.schemas.base.BaseOutputSchema and supporting the write function to return a string of exported metadata content. If you are using Jinja2 templates, see the next section. If you are using another means of generating metadata (lxml, xml.etree, json, etc.), override the ABS write class to emit a string using your tooling/workflow accordingly. See the below sections for examples. Once you have added your metadata schema, you need to register it with pygeometa's schema registry: vi pygeometa/schemas/__init__.py # edit the SCHEMAS dict with the metadata schema name and dotted path of class Jinja2 templates To add support for a new metadata schema using Jinja2 templates: cp -r pygeometa/schemas/iso19139 pygeometa/schemas/new-schema Then modify *.j2 files in the new pygeometa/schemas/new-schema directory to comply to new metadata schema. Custom tooling To add support for a new metadata schemas using other tooling/workflow: mkdir pygeometa/schemas/foo cp pygeometa/schemas/iso19139/__init__.py pygeometa/schemas/foo vi pygeometa/schemas/foo/__init__.py # update class name and super().__init__() function accordingly Running Tests # via distutils python3 setup.py test # manually cd tests python3 run_tests.py Releasing python3 setup.py sdist bdist_wheel --universal twine upload dist/* Code Conventions PEP8 Bugs and Issues All bugs, enhancements and issues are managed on GitHub . History Started in 2009, pygeometa originated within an internal project called pygdm, which provided generic geospatial data management functions. pygdm (now end of life) was used for generating MSC/CMC geospatial metadata. pygeometa was pulled out of pygdm to focus on the core requirement of generating geospatial metadata within a real-time environment and automated workflows. In 2015 pygeometa was made publically available in support of the Treasury Board Policy on Acceptable Network and Device Use .","title":"Tutorial"},{"location":"tutorial/#pygeometa-tutorial","text":"","title":"pygeometa Tutorial"},{"location":"tutorial/#overview","text":"This tutorial provides a tour of pygeometa for both users and developers, and is aimed at getting you up and running quickly. Let's go!","title":"Overview"},{"location":"tutorial/#for-users","text":"","title":"For Users"},{"location":"tutorial/#installation","text":"You require Python 3 or greater to use pygeometa. The easiest way to install pygeometa is using pip: pip3 install pygeometa This will install the latest stable release. If you are looking to work with pygeometa from source, see the For Developers section for more information.","title":"Installation"},{"location":"tutorial/#workflow","text":"The basic pygeometa workflow is: Create a 'metadata control file' YAML file that contains metadata information Modify the sample.yml example pygeometa supports nesting MCFs together, allowing providing a single MCF for common metadata parameters (e.g. common contact information) Refer to the Metadata Control File Reference documentation Run pygeometa for the .yml file with a specified target metadata schema","title":"Workflow"},{"location":"tutorial/#running","text":"# show all subcommands pygeometa # show all supported schemas pygeometa metadata schemas # provide a basic sanity check/report on an MCF (Metadata Control File) pygeometa metadata info path/to/file.yml # generate an ISO 19139 document to stdout pygeometa metadata generate path/to/file.yml --schema=iso19139 # generate an ISO 19139 document to disk pygeometa metadata generate path/to/file.yml --schema=iso19139 --output=some_file.xml # generate an ISO 19139 document to disk with debugging (ERROR, WARNING, INFO, DEBUG) pygeometa metadata generate path/to/file.yml --schema=iso19139 --output=some_file.xml --verbosity=DEBUG # add verbose (ERROR, WARNING, INFO, DEBUG) # use your own defined schema pygeometa metadata generate path/to/file.yml --schema_local=/path/to/my-schema --output=some_file.xml # to file # validate an MCF document pygeometa validate path/to/file.yml # import a metadata document to MCF pygeometa metadata import path/to/file.xml --schema=iso19139 # transform from one metadata representation to another pygeometa metadata transform path/to/file.xml --input-schema=iso19139 --output-schema=oarec-record","title":"Running"},{"location":"tutorial/#for-developers","text":"","title":"For Developers"},{"location":"tutorial/#installation_1","text":"pygeometa is best installed and used within a Python virtualenv.","title":"Installation"},{"location":"tutorial/#requirements","text":"Python 3 and above Python virtualenv package","title":"Requirements"},{"location":"tutorial/#dependencies","text":"Dependencies are listed in requirements.txt . Dependencies are automatically installed during pygeometa's installation.","title":"Dependencies"},{"location":"tutorial/#installing-the-package-from-source","text":"python3 -m venv my-env cd my-env . bin/activate git clone https://github.com/geopython/pygeometa.git cd pygeometa python3 setup.py build python3 setup.py install","title":"Installing the Package from Source"},{"location":"tutorial/#using-the-api-from-python","text":"from pygeometa.core import read_mcf, render_j2_template # read from disk mcf_dict = read_mcf('/path/to/file.yml') # read from string mcf_dict = read_mcf(mcf_string) # choose ISO 19139 output schema from pygeometa.schemas.iso19139 import ISO19139OutputSchema iso_os = ISO19139OutputSchema() # default schema xml_string = iso_os.write(mcf_dict) # user-defined schema xml_string = render_j2_template(mcf_dict, schema_local='/path/to/new-schema') # write to disk with open('output.xml', 'wb') as ff: ff.write(xml_string)","title":"Using the API from Python"},{"location":"tutorial/#development","text":"","title":"Development"},{"location":"tutorial/#setting-up-a-development-environment","text":"Same as installing a package. Use a virtualenv. Also install developer requirements: pip3 install -r requirements-dev.txt","title":"Setting up a Development Environment"},{"location":"tutorial/#adding-a-metadata-schema-to-the-core","text":"Adding an output metadata schemas to pygeometa involves extending pygeometa.schemas.base.BaseOutputSchema and supporting the write function to return a string of exported metadata content. If you are using Jinja2 templates, see the next section. If you are using another means of generating metadata (lxml, xml.etree, json, etc.), override the ABS write class to emit a string using your tooling/workflow accordingly. See the below sections for examples. Once you have added your metadata schema, you need to register it with pygeometa's schema registry: vi pygeometa/schemas/__init__.py # edit the SCHEMAS dict with the metadata schema name and dotted path of class","title":"Adding a Metadata Schema to the Core"},{"location":"tutorial/#jinja2-templates","text":"To add support for a new metadata schema using Jinja2 templates: cp -r pygeometa/schemas/iso19139 pygeometa/schemas/new-schema Then modify *.j2 files in the new pygeometa/schemas/new-schema directory to comply to new metadata schema.","title":"Jinja2 templates"},{"location":"tutorial/#custom-tooling","text":"To add support for a new metadata schemas using other tooling/workflow: mkdir pygeometa/schemas/foo cp pygeometa/schemas/iso19139/__init__.py pygeometa/schemas/foo vi pygeometa/schemas/foo/__init__.py # update class name and super().__init__() function accordingly","title":"Custom tooling"},{"location":"tutorial/#running-tests","text":"# via distutils python3 setup.py test # manually cd tests python3 run_tests.py","title":"Running Tests"},{"location":"tutorial/#releasing","text":"python3 setup.py sdist bdist_wheel --universal twine upload dist/*","title":"Releasing"},{"location":"tutorial/#code-conventions","text":"PEP8","title":"Code Conventions"},{"location":"tutorial/#bugs-and-issues","text":"All bugs, enhancements and issues are managed on GitHub .","title":"Bugs and Issues"},{"location":"tutorial/#history","text":"Started in 2009, pygeometa originated within an internal project called pygdm, which provided generic geospatial data management functions. pygdm (now end of life) was used for generating MSC/CMC geospatial metadata. pygeometa was pulled out of pygdm to focus on the core requirement of generating geospatial metadata within a real-time environment and automated workflows. In 2015 pygeometa was made publically available in support of the Treasury Board Policy on Acceptable Network and Device Use .","title":"History"},{"location":"reference/","text":"Reference Metadata Control File Formats iso19139 , specification iso19139-hnap , specification wmo-cmp , specification wmo-wcmp2 , draft specification wmo-wigos , specification","title":"Reference"},{"location":"reference/#reference","text":"Metadata Control File Formats iso19139 , specification iso19139-hnap , specification wmo-cmp , specification wmo-wcmp2 , draft specification wmo-wigos , specification","title":"Reference"},{"location":"reference/mcf/","text":"Metadata Control File Reference Version: 1.0 Basic Concepts Sections are case sensitive Section parameters are case sensitive Section parameter values are case sensitive YAML rules, conventions and features are suppported, such as: node anchors / references data typing If an optional section is specified, then its child parameters' cardinality are enforced Filename conventions are up to the user. However, below are some suggestions: use .yml as file extension name the MCF basename the same as the dataset (e.g. foo.shp , foo.yml ) To add a comment in a MCF, a line that begins with a hash tag ( # ) will be ignored If you have a colon ( : ) in your text / value, use quotation marks ( \" or ' ) on either side of your text to avoid mapping errors when parsing the YAML file Version format MCFs are versioned using X.Y (MAJOR.MINOR changes) format. If a non supported MCF version is provided, pygeometa will throw an error and stop processing the MCF. Thus, the user must provide a valid and supported MCF version to generate the metadata. Encoding The MCF MUST be utf8 encoded. That is all. Is your MCF Encoded as UTF8? # editing in vim # :set encoding=utf8 # pasting in vim # in insert mode, hit CTRL-V $CODE, where $CODE is as per http://www.htmlhelp.com/reference/charset # to see how the file is actually encoded on disk file --mime-encoding file.txt file -i file.txt # to convert from one encoding to another iconv -f iso8859-1 -t utf-8 file.yml > file.yml.new Nesting MCFs In the case where the user is generating metadata for multiple datasets which have common information, it becomes efficient to nest MCF together. pygeometa allows chaining MCFs to inherit values from other MCFs. Example: multiple datasets MCFs can refer a single MCF that contain contact information common to all those datasets. To use MCF nesting: At the top of any section of a MCF add base_mcf: foo.yml Specify the corresponding section in the base_mcf file Notes about nesting MCFs: You can refer to one base_mcf per section of a MCF Multiple sections can refer to the same base_mcf file When a parameter is defined in both the base_mcf file and the current MCF, it's always the current MCF that overwrites the base_mcf file MCFs can be nested in chains, meaning a MCF can be use a 'child' MCF and be used by a 'parent' MCF Environment variables pygeometa supports environment variables, using the notation in the example MCF snippet below: metadata: identifier: 3f342f64-9348-11df-ba6a-0014c2c00eab parentidentifier: ${COLLECTION_ID} Multilingual support pygeometa supports default and alternate languages in ISO metadata. Multilingual support is driven by the following sections in [metadata] : language : 2 letter language code (i.e. en , fr ) of primary language language_alternate : 2 letter language code (i.e. en , fr ) of secondary language Example: metadata: language: en language_alternate: fr If language_alternate is not defined or missing, pygeometa assumes a single language. Values which support multilingual values can be specified with as keys to denote the respective language. Examples: # single language title: foo # single language, explicit title: en: foo # two languages, explicit title: en: foo fr: bar The language value in the metadata section must be a 2 letters language code. The user can use any language. For example: es for Spanish. Sections mcf Property Name Mandatory/Optional Description Example Reference version Mandatory version of MCF format 1.0 pygeometa metadata Property Name Mandatory/Optional Description Example Reference identifier Mandatory unique identifier for this metadata file 11800c2c-e6b9-11df-b9ae-0014c2c00eab ISO 19115:2003 Section B.2.1 language Mandatory primary language used for documenting metadata, the metadata records themselves can be provided in multiple languages nonetheless en ISO 19115:2003 Section B.2.1 language_alternate Optional alternate language used for documenting metadata en ISO 19115:2003 Annex J charset Mandatory full name of the character coding standard used for the metadata set utf8 ISO 19115:2003 Section B.2.1 parentidentifier Optional file identifier of the metadata to which this metadata is a subset 11800c2c-e6b9-11df-b9ae-0014c2c33ebe ISO 19115:2003 Section B.2.1 hierarchylevel Mandatory level to which the metadata applies (must be one of 'series', 'software', 'featureType', 'model', 'collectionHardware', 'collectionSession', 'nonGeographicDataset', 'propertyType', 'fieldSession', 'dataset', 'service', 'attribute', 'attributeType', 'tile', 'feature', 'dimensionGroup' dataset ISO 19115:2003 Section B.2.1 datestamp Mandatory date that the metadata was created, pygeometa supports specifying the $date$ or $datetime$ variable to update the date value at run time 2000-11-11 or 2000-01-12T11:11:11Z ISO 19115:2003 Section B.2.1 dataseturi Optional Uniformed Resource Identifier (URI) of the dataset to which the metadata applies urn:x-wmo:md:int.wmo.wis::http://geo.woudc.org/def/data/uv-radiation/uv-irradiance ISO 19115:2003 Section B.2.1 spatial Property Name Mandatory/Optional Description Example Reference datatype Mandatory method used to represent geographic information in the dataset (must be one of 'vector', 'grid', 'textTable', 'tin', 'stereoModel', 'video') vector Section B.5.26 geomtype Mandatory name of point or vector objects used to locate zero-, one-, two-, or threedimensional spatial locations in the dataset (must be one of 'complex', 'composite', 'curve', 'point', 'solid', 'surface') point ISO 19115:2003 B.5.15 identification Property Name Mandatory/Optional Description Example Reference doi Optional Digital Object Identifier (DOI) 12345 ISO 19115:2003 Section B.3.2.1 language Optional language(s) used within the dataset. If the dataset is made of numerical values, the dataset language can be set to 'missing', 'withheld', 'inapplicable', 'unknown' or 'template' eng; CAN ISO 19115:2003 Section B.2.2.1 charset Optional full name of the character coding standard used for the dataset eng; CAN ISO 19115:2003 Section B.2.1 title Mandatory name by which the cited resource is known Important Bird Areas ISO 19115:2003 Section B.3.2.1 edition Optional version of the cited resource 1.8.0 ISO 19115:2003 Section B.3.2.1 abstract Mandatory brief narrative summary of the content of the resource(s) Birds in important areas... ISO 19115:2003 Section B.2.2.1 topiccategory Mandatory main theme(s) of the dataset (must be one of 'geoscientificInformation', 'farming', 'elevation', 'utilitiesCommunication', 'oceans', 'boundaries', 'inlandWaters', 'intelligenceMilitary', 'environment', 'location', 'economy', 'planningCadastre','biota', 'health', 'imageryBaseMapsEarthCover', 'transportation', 'society', 'structure', 'climatologyMeteorologyAtmosphere'. More than one topic category can be specified climatologyMeteorologyAtmosphere ISO 19115:2003 Section B.5.27 fees Mandatory fees and terms for retreiving the resource. Include monetary units (as specified in ISO 4217). If there are no fees, use the term 'None' None,ISO 19115:2003 Section B.2.10.6 accessconstraints Mandatory access constraints applied to assure the protection of privacy or intellectual property, and any special restrictions or limitations on obtaining the resource or metadata (must be one of 'patent', 'otherRestrictions','copyright','trademark', 'patentPending','restricted','license', 'intellectualPropertyRights'). If there are no accessconstraints, use the term 'otherRestrictions' None ISO 19115:2003 Section B.2.3 rights Mandatory Information about rights held in and over the resource. pygeometa supports using the $year$ variable to update the year value at run time. Copyright (c) 2010 Her Majesty the Queen in Right of Canada DMCI 1.1 url Mandatory URL of the dataset to which the metadata applies http://host/path/ ISO 19115:2003 Section B.2.1 status Mandatory \"the status of the resource(s) (must be one of 'planned','historicalArchive','completed','onGoing', 'underDevelopment','required','obsolete')\" completed ISO 19115:2003 Section B.2.2.1 maintenancefrequency Mandatory frequency with which modifications and deletions are made to the data after it is first produced (must be one of 'continual', 'daily', 'weekly', 'fortnightly', 'monthly', 'quarterly', 'biannually', 'annually', 'asNeeded', 'irregular', 'notPlanned', 'unknown' continual ISO 19115:2003 B.5.18 browsegraphic Optional graphic that provides an illustration of the dataset http://example.org/dataset.png ISO 19115:2003 B.2.2.2 identification.dates identification.dates sections can have 1..n dates sections as required with the following object names/types: Property Name Mandatory/Optional Description Example Reference creation Mandatory* 'creation' reference date for the cited resource, referring to when the resource was brought into existence, *: presence of creation or publication or revision is mandatory 2000-09-01 or 2000-09-01T00:00:00Z ISO 19115:2003 Section B.3.2.4 publication Optional* 'publication' reference date for the cited resource, referring to when the resource was issued, *: presence of creation or publication or revision is mandatory 2000-09-01 or 2000-09-01T00:00:00Z ISO 19115:2003 Section B.3.2.4 revision Optional* 'revision' reference date for the cited resource, refersring to when the resource was examined or re-examined and improved or amended, *: presence of creation or publication or revision is mandatory 2000-09-01 or 2000-09-01T00:00:00Z ISO 19115:2003 Section B.3.2.4 identification: ... dates: creation: 2011-11-11 publication: 2000-09-01T00:00:00Z identification.extents identification.extents sections can have 1..n spatial and temporal sections as required with the following properties. Property Name Mandatory/Optional Description Example Reference spatial.bbox Mandatory geographic position of the dataset, formatted as as list of [minx,miny,maxx,maxy] -141,42,-52,84 ISO 19115:2003 Section B.3.1.2 spatial.crs Mandatory EPSG code identifier 4326 ISO 19115:2003 Section B.2.7.3 spatial.description Optional description of the geographic area using an identifier Toronto, Ontario, Canada ISO 19115:2003 Section B.3.1.2 temporal.begin Optional Starting time period covered by the content of the dataset, either time period (startdate/enddate) or a single point in time value 1950-07-31 ISO 19115:2003 Section B.3.1.3 temporal.end Optional End time period covered by the content of the dataset, either time period (startdate/enddate) or a single point in time value. For data updated in realtime, use the term now now ISO 19115:2003 Section B.3.1.3 temporal.resolution Optional Minimum time period resolvable in the dataset, as an ISO 8601 duration P1D ISO 19108 identification: ... extents: spatial: - bbox: [-141,42,-52,84] crs: 4326 temporal: - begin: 1950-07-31 end: now resolution: P1D identification.keywords identification sections can have 1..n keywords sections as required using nesting. Example: identification: ... keywords: default: keywords: en: [foo1, bar1] fr: [foo2, bar2] keywords_type: theme vocabulary: name: my vocabulary url: https://example.org/vocab wmo: keywords: en: [foo3, bar3] fr: [foo4, bar4] keywords_type: theme keywords_codelist: http://wis.wmo.int/2011/schemata/iso19139_2007/schema/resources/Codelist/gmxCodelists.xml#MD_KeywordTypeCode Schema specific keywords sections wmo : World Meteorological Organization keywords (used for WMO Core Metadata Profile) gc_cst : Government of Canada Core Subject Thesaurus (used for HNAP) hnap_category_information : HNAP hnap_category_geography : HNAP hnap_category_content : HNAP Within each keywords section, the following elements are supported: Property Name Mandatory/Optional Description Example Reference keywords Mandatory category keywords keyword1,keyword2,keyword3 ISO 19115:2003 Section B.2.2.1 keywords_type Mandatory subject matter used to group similar keywords (must be one of 'discipline', 'place', 'stratum', 'temporal', 'theme') theme ISO 19115:2003 Section B.2.2.3 keywords_codelist Optional specific code list URL (for advanced use cases, else the default is as per the given specified schema) http://wis.wmo.int/2011/schemata/iso19139_2007/schema/resources/Codelist/gmxCodelists.xml ISO 19115:2003 Section B.2.2.3 identification.keywords.vocabulary identification.keywords sections can specify an optional vocabulary section with the following elements: Property Name Mandatory/Optional Description Example Reference name Mandatory name of the source of keywords (English) my thesaurus name ISO 19115:2003 Section B.2.2.3 url Optional URL of source of keywords https://example.org/my-vocab - identification.license identification.license sections can provide a optinoal license via a name or URL using the following elements: Property Name Mandatory/Optional Description Example Reference name Mandatory name of license CC BY 4.0 - url Optional URL of license https://creativecommons.org/licenses/by/4.0 - content_info Property Name Mandatory/Optional Description Example Reference type Mandatory Content type (must be one of 'coverage', 'image', 'feature_catalogue' image ISO 19115:2003 Section B.2.8.1 cloud_cover Optional area of the dataset obscured by clouds, expressed as a percentage of the spatial extent 72 ISO 19115:2003 Section B.2.8.1 processing_level Optional image distributor\u2019s code that identifies the level of radiometric and geometric processing that has been applied L1 ISO 19115:2003 Section B.2.8.1 content_info.attributes content_info sections can have 1..n attributes sections as required using nesting. Example: attributes: - name: temperature title: en: Air temperature abstract: en: Description of air temperature attribute type: number units: K values: [1.2, 2.5, 1.3] Property Name Mandatory/Optional Description Example Reference name Mandatory attribute name temperature title Optional attribute title Air temperature abstract Optional attribute description Description of air temperature url Optional URL with more information about the attribute Air temperature type Optional data type (must be one of 'string', 'number', 'integer', 'object', 'array', 'boolean') string units Optional SI units K https://en.wikipedia.org/wiki/International_System_of_Units values Optional specification of attribute values see below content_info.attributes.values Attributes may also provide the values within a given domain, via one of the following constructs: content_info.attributes.values.enum Property Name Mandatory/Optional Description Example Reference enum Optional Enumerated list of values [1, 2, 3, 4] Example: values: enum: [1, 2, 3. 4] content_info.attributes.values.range Property Name Mandatory/Optional Description Example Reference range Optional Range of values (min/max) [1, 4] Example: values: range: [1, 4] content_info.attributes.values.codelist Property Name Mandatory/Optional Description Example Reference codelist Optional codelist of values see below codelist.name Mandatory value name foo codelist.title Optional value title Foo codelist.abstract Optional value abstract Description of value Foo codelist.url Optional URL with more information about the value https://example.org/foo Example: values: codelist: - name: foo title: en: foo title abstract: en: foo description url: https://example.org/values/foo content_info.dimensions content_info objects support 1..n dimension objects. Property Name Mandatory/Optional Description Example Reference name Mandatory name of dimension B1 ISO 19115:2003 Section B.2.8.2 units Mandatory units in which sensor wavelengths are expressed nm ISO 19115:2003 Section B.2.8.2 min Mandatory shortest wavelength that the sensor is capable of collecting within a designated band 101 ISO 19115:2003 Section B.2.8.2 max Mandatory longest wavelength that the sensor is capable of collecting within a designated band 199 ISO 19115:2003 Section B.2.8.2 contact MCFs can have 1..n contact sections as required using nesting. Example: contact: pointOfContact: .... distributor: .... The contact.pointOfContact section provides information for the pointOfContact role (see ISO 19115:2003 Section B.3.2.1). This section is minimally required. Within each contact section, the following elements are supported: Property Name Mandatory/Optional Description Example Reference organization Mandatory name of the responsible organization Environment Canada ISO 19115:2003 Section B.3.2.1 url Mandatory on-line information that can be used to contact the individual or organization http://host/path ISO 19115:2003 Section B.3.2.3 individualname Mandatory name of the responsible person-surname given name title seperated by a delimiter positionname Mandatory role or position of the responsible person Senior Systems Scientist ISO 19115:2003 Section B.3.2.1 phone Mandatory telephone number by which individuals can speak to the responsible organization or individual +01-123-456-7890 ISO 19115:2003 Section B.3.2.7 fax Mandatory telephone number of a facsimile machine for the responsible organization or individual +01-123-456-7890 ISO 19115:2003 Section B.3.2.7 address Mandatory address line for the location (as described in ISO 11180 Annex A) 4905 Dufferin Street city Mandatory city of the location Toronto ISO 19115:2003 Section B.3.2.2 administrativearea Mandatory state, province of the location Ontario ISO 19115:2003 Section B.3.2.2 postalcode Mandatory ZIP or other postal code M3H 5T4 ISO 19115:2003 Section B.3.2.2 country Mandatory country of the physical address Canada ISO 19115:2003 Section B.3.2.2 email Mandatory address of the electronic mailbox of the responsible organization or individual foo@bar.tld ISO 19115:2003 Section B.3.2.2 hoursofservice Optional time period (including time zone) when individuals can contact the organization or individual 0700h - 1500h EST ISO 19115:2003 Section B.3.2.3 contactinstructions Optional supplementalinstructions on how or when to contact the individual or organization contact during working business hours ISO 19115:2003 Section B.3.2.3 contact.distributor The contact.distributor section provides information for the distributor role (see ISO 19115:2003 Section B.3.2.1) and has the identical structure as contact.pointOfContact . If contact information is the same for both, use YAML node anchors and references to have it provided in both sections in the metadata: contact: pointOfContact: &id_contact_poc ... distributor: *id_contact_poc distribution MCFs can have 1..n distribution sections as required using nesting. Example: distribution: wms: .... waf: .... Within each distribution section, the following elements are supported: Property Name Mandatory/Optional Description Example Reference url Mandatory location (address) for on-line access using a Uniform Resource Locator address or similar addressing scheme such as http://www.isotc211.org/ http://host/path ISO 19115:2003 Section B.3.2.5 type Mandatory connection protocol to be used. Must be one of the identifier values from https://github.com/OSGeo/Cat-Interop/blob/master/LinkPropertyLookupTable.csv WWW:LINK ISO 19115:2003 Section B.3.2.5 rel Optional the type or semantic of the relation. The value should be an IANA link relation or a relation type specific to an established standard canonical Link Relations - Internet Assigned Numbers Authority name Mandatory name of the online resource Download portal ISO 19115:2003 Section B.3.2.5 description Mandatory detailed text description of what the online resources is/does brief description of the online resource (English) ISO 19115:2003 Section B.3.2.5 function Mandatory code for function performed by the online resource (must be one of 'download', 'information', 'offlineAccess', 'order', 'search') download ISO 19115:2003 Section B.3.2.5 format Optional Format of the distribution method WMS HNAP 2.3 format_version Optional Format version of the distribution method 1.0 HNAP 2.3 channel Optional channel/topic/exchange when link is a Pub/Sub endpoint my/cool/topic OGC API - Pub/Sub dataquality Property Name Mandatory/Optional Description Example Reference scope.level Optional hierarchical level of the data specificed by the scope dataset ISO 19115:2003 Section B.2.4.5 lineage.statement Optional general explanationn of the data producer's knowledge about the lineage of a dataset this dataset was produced from a custom process against dataset xyz ISO 19115:2003 Section B.2.4.2.1 Tips Keyword Substitution pygeometa supports using the following keyword substitutions: $year$ , which is substituted for the current year with the YYYY format, example: 2016 $date$ , which is substituted for the current date with the YYYY-MM-DD, example: 2016-12-22 format $datetime$ , which is substituted for the current date and time with the YYYY-MM-DDThh:mm:ssZ, example: 2016-12-22T16:34:15Z format","title":"Metadata Control File"},{"location":"reference/mcf/#metadata-control-file-reference","text":"Version: 1.0","title":"Metadata Control File Reference"},{"location":"reference/mcf/#basic-concepts","text":"Sections are case sensitive Section parameters are case sensitive Section parameter values are case sensitive YAML rules, conventions and features are suppported, such as: node anchors / references data typing If an optional section is specified, then its child parameters' cardinality are enforced Filename conventions are up to the user. However, below are some suggestions: use .yml as file extension name the MCF basename the same as the dataset (e.g. foo.shp , foo.yml ) To add a comment in a MCF, a line that begins with a hash tag ( # ) will be ignored If you have a colon ( : ) in your text / value, use quotation marks ( \" or ' ) on either side of your text to avoid mapping errors when parsing the YAML file","title":"Basic Concepts"},{"location":"reference/mcf/#version-format","text":"MCFs are versioned using X.Y (MAJOR.MINOR changes) format. If a non supported MCF version is provided, pygeometa will throw an error and stop processing the MCF. Thus, the user must provide a valid and supported MCF version to generate the metadata.","title":"Version format"},{"location":"reference/mcf/#encoding","text":"The MCF MUST be utf8 encoded. That is all. Is your MCF Encoded as UTF8? # editing in vim # :set encoding=utf8 # pasting in vim # in insert mode, hit CTRL-V $CODE, where $CODE is as per http://www.htmlhelp.com/reference/charset # to see how the file is actually encoded on disk file --mime-encoding file.txt file -i file.txt # to convert from one encoding to another iconv -f iso8859-1 -t utf-8 file.yml > file.yml.new","title":"Encoding"},{"location":"reference/mcf/#nesting-mcfs","text":"In the case where the user is generating metadata for multiple datasets which have common information, it becomes efficient to nest MCF together. pygeometa allows chaining MCFs to inherit values from other MCFs. Example: multiple datasets MCFs can refer a single MCF that contain contact information common to all those datasets. To use MCF nesting: At the top of any section of a MCF add base_mcf: foo.yml Specify the corresponding section in the base_mcf file Notes about nesting MCFs: You can refer to one base_mcf per section of a MCF Multiple sections can refer to the same base_mcf file When a parameter is defined in both the base_mcf file and the current MCF, it's always the current MCF that overwrites the base_mcf file MCFs can be nested in chains, meaning a MCF can be use a 'child' MCF and be used by a 'parent' MCF","title":"Nesting MCFs"},{"location":"reference/mcf/#environment-variables","text":"pygeometa supports environment variables, using the notation in the example MCF snippet below: metadata: identifier: 3f342f64-9348-11df-ba6a-0014c2c00eab parentidentifier: ${COLLECTION_ID}","title":"Environment variables"},{"location":"reference/mcf/#multilingual-support","text":"pygeometa supports default and alternate languages in ISO metadata. Multilingual support is driven by the following sections in [metadata] : language : 2 letter language code (i.e. en , fr ) of primary language language_alternate : 2 letter language code (i.e. en , fr ) of secondary language Example: metadata: language: en language_alternate: fr If language_alternate is not defined or missing, pygeometa assumes a single language. Values which support multilingual values can be specified with as keys to denote the respective language. Examples: # single language title: foo # single language, explicit title: en: foo # two languages, explicit title: en: foo fr: bar The language value in the metadata section must be a 2 letters language code. The user can use any language. For example: es for Spanish.","title":"Multilingual support"},{"location":"reference/mcf/#sections","text":"","title":"Sections"},{"location":"reference/mcf/#mcf","text":"Property Name Mandatory/Optional Description Example Reference version Mandatory version of MCF format 1.0 pygeometa","title":"mcf"},{"location":"reference/mcf/#metadata","text":"Property Name Mandatory/Optional Description Example Reference identifier Mandatory unique identifier for this metadata file 11800c2c-e6b9-11df-b9ae-0014c2c00eab ISO 19115:2003 Section B.2.1 language Mandatory primary language used for documenting metadata, the metadata records themselves can be provided in multiple languages nonetheless en ISO 19115:2003 Section B.2.1 language_alternate Optional alternate language used for documenting metadata en ISO 19115:2003 Annex J charset Mandatory full name of the character coding standard used for the metadata set utf8 ISO 19115:2003 Section B.2.1 parentidentifier Optional file identifier of the metadata to which this metadata is a subset 11800c2c-e6b9-11df-b9ae-0014c2c33ebe ISO 19115:2003 Section B.2.1 hierarchylevel Mandatory level to which the metadata applies (must be one of 'series', 'software', 'featureType', 'model', 'collectionHardware', 'collectionSession', 'nonGeographicDataset', 'propertyType', 'fieldSession', 'dataset', 'service', 'attribute', 'attributeType', 'tile', 'feature', 'dimensionGroup' dataset ISO 19115:2003 Section B.2.1 datestamp Mandatory date that the metadata was created, pygeometa supports specifying the $date$ or $datetime$ variable to update the date value at run time 2000-11-11 or 2000-01-12T11:11:11Z ISO 19115:2003 Section B.2.1 dataseturi Optional Uniformed Resource Identifier (URI) of the dataset to which the metadata applies urn:x-wmo:md:int.wmo.wis::http://geo.woudc.org/def/data/uv-radiation/uv-irradiance ISO 19115:2003 Section B.2.1","title":"metadata"},{"location":"reference/mcf/#spatial","text":"Property Name Mandatory/Optional Description Example Reference datatype Mandatory method used to represent geographic information in the dataset (must be one of 'vector', 'grid', 'textTable', 'tin', 'stereoModel', 'video') vector Section B.5.26 geomtype Mandatory name of point or vector objects used to locate zero-, one-, two-, or threedimensional spatial locations in the dataset (must be one of 'complex', 'composite', 'curve', 'point', 'solid', 'surface') point ISO 19115:2003 B.5.15","title":"spatial"},{"location":"reference/mcf/#identification","text":"Property Name Mandatory/Optional Description Example Reference doi Optional Digital Object Identifier (DOI) 12345 ISO 19115:2003 Section B.3.2.1 language Optional language(s) used within the dataset. If the dataset is made of numerical values, the dataset language can be set to 'missing', 'withheld', 'inapplicable', 'unknown' or 'template' eng; CAN ISO 19115:2003 Section B.2.2.1 charset Optional full name of the character coding standard used for the dataset eng; CAN ISO 19115:2003 Section B.2.1 title Mandatory name by which the cited resource is known Important Bird Areas ISO 19115:2003 Section B.3.2.1 edition Optional version of the cited resource 1.8.0 ISO 19115:2003 Section B.3.2.1 abstract Mandatory brief narrative summary of the content of the resource(s) Birds in important areas... ISO 19115:2003 Section B.2.2.1 topiccategory Mandatory main theme(s) of the dataset (must be one of 'geoscientificInformation', 'farming', 'elevation', 'utilitiesCommunication', 'oceans', 'boundaries', 'inlandWaters', 'intelligenceMilitary', 'environment', 'location', 'economy', 'planningCadastre','biota', 'health', 'imageryBaseMapsEarthCover', 'transportation', 'society', 'structure', 'climatologyMeteorologyAtmosphere'. More than one topic category can be specified climatologyMeteorologyAtmosphere ISO 19115:2003 Section B.5.27 fees Mandatory fees and terms for retreiving the resource. Include monetary units (as specified in ISO 4217). If there are no fees, use the term 'None' None,ISO 19115:2003 Section B.2.10.6 accessconstraints Mandatory access constraints applied to assure the protection of privacy or intellectual property, and any special restrictions or limitations on obtaining the resource or metadata (must be one of 'patent', 'otherRestrictions','copyright','trademark', 'patentPending','restricted','license', 'intellectualPropertyRights'). If there are no accessconstraints, use the term 'otherRestrictions' None ISO 19115:2003 Section B.2.3 rights Mandatory Information about rights held in and over the resource. pygeometa supports using the $year$ variable to update the year value at run time. Copyright (c) 2010 Her Majesty the Queen in Right of Canada DMCI 1.1 url Mandatory URL of the dataset to which the metadata applies http://host/path/ ISO 19115:2003 Section B.2.1 status Mandatory \"the status of the resource(s) (must be one of 'planned','historicalArchive','completed','onGoing', 'underDevelopment','required','obsolete')\" completed ISO 19115:2003 Section B.2.2.1 maintenancefrequency Mandatory frequency with which modifications and deletions are made to the data after it is first produced (must be one of 'continual', 'daily', 'weekly', 'fortnightly', 'monthly', 'quarterly', 'biannually', 'annually', 'asNeeded', 'irregular', 'notPlanned', 'unknown' continual ISO 19115:2003 B.5.18 browsegraphic Optional graphic that provides an illustration of the dataset http://example.org/dataset.png ISO 19115:2003 B.2.2.2","title":"identification"},{"location":"reference/mcf/#identificationdates","text":"identification.dates sections can have 1..n dates sections as required with the following object names/types: Property Name Mandatory/Optional Description Example Reference creation Mandatory* 'creation' reference date for the cited resource, referring to when the resource was brought into existence, *: presence of creation or publication or revision is mandatory 2000-09-01 or 2000-09-01T00:00:00Z ISO 19115:2003 Section B.3.2.4 publication Optional* 'publication' reference date for the cited resource, referring to when the resource was issued, *: presence of creation or publication or revision is mandatory 2000-09-01 or 2000-09-01T00:00:00Z ISO 19115:2003 Section B.3.2.4 revision Optional* 'revision' reference date for the cited resource, refersring to when the resource was examined or re-examined and improved or amended, *: presence of creation or publication or revision is mandatory 2000-09-01 or 2000-09-01T00:00:00Z ISO 19115:2003 Section B.3.2.4 identification: ... dates: creation: 2011-11-11 publication: 2000-09-01T00:00:00Z","title":"identification.dates"},{"location":"reference/mcf/#identificationextents","text":"identification.extents sections can have 1..n spatial and temporal sections as required with the following properties. Property Name Mandatory/Optional Description Example Reference spatial.bbox Mandatory geographic position of the dataset, formatted as as list of [minx,miny,maxx,maxy] -141,42,-52,84 ISO 19115:2003 Section B.3.1.2 spatial.crs Mandatory EPSG code identifier 4326 ISO 19115:2003 Section B.2.7.3 spatial.description Optional description of the geographic area using an identifier Toronto, Ontario, Canada ISO 19115:2003 Section B.3.1.2 temporal.begin Optional Starting time period covered by the content of the dataset, either time period (startdate/enddate) or a single point in time value 1950-07-31 ISO 19115:2003 Section B.3.1.3 temporal.end Optional End time period covered by the content of the dataset, either time period (startdate/enddate) or a single point in time value. For data updated in realtime, use the term now now ISO 19115:2003 Section B.3.1.3 temporal.resolution Optional Minimum time period resolvable in the dataset, as an ISO 8601 duration P1D ISO 19108 identification: ... extents: spatial: - bbox: [-141,42,-52,84] crs: 4326 temporal: - begin: 1950-07-31 end: now resolution: P1D","title":"identification.extents"},{"location":"reference/mcf/#identificationkeywords","text":"identification sections can have 1..n keywords sections as required using nesting. Example: identification: ... keywords: default: keywords: en: [foo1, bar1] fr: [foo2, bar2] keywords_type: theme vocabulary: name: my vocabulary url: https://example.org/vocab wmo: keywords: en: [foo3, bar3] fr: [foo4, bar4] keywords_type: theme keywords_codelist: http://wis.wmo.int/2011/schemata/iso19139_2007/schema/resources/Codelist/gmxCodelists.xml#MD_KeywordTypeCode Schema specific keywords sections wmo : World Meteorological Organization keywords (used for WMO Core Metadata Profile) gc_cst : Government of Canada Core Subject Thesaurus (used for HNAP) hnap_category_information : HNAP hnap_category_geography : HNAP hnap_category_content : HNAP Within each keywords section, the following elements are supported: Property Name Mandatory/Optional Description Example Reference keywords Mandatory category keywords keyword1,keyword2,keyword3 ISO 19115:2003 Section B.2.2.1 keywords_type Mandatory subject matter used to group similar keywords (must be one of 'discipline', 'place', 'stratum', 'temporal', 'theme') theme ISO 19115:2003 Section B.2.2.3 keywords_codelist Optional specific code list URL (for advanced use cases, else the default is as per the given specified schema) http://wis.wmo.int/2011/schemata/iso19139_2007/schema/resources/Codelist/gmxCodelists.xml ISO 19115:2003 Section B.2.2.3","title":"identification.keywords"},{"location":"reference/mcf/#identificationkeywordsvocabulary","text":"identification.keywords sections can specify an optional vocabulary section with the following elements: Property Name Mandatory/Optional Description Example Reference name Mandatory name of the source of keywords (English) my thesaurus name ISO 19115:2003 Section B.2.2.3 url Optional URL of source of keywords https://example.org/my-vocab -","title":"identification.keywords.vocabulary"},{"location":"reference/mcf/#identificationlicense","text":"identification.license sections can provide a optinoal license via a name or URL using the following elements: Property Name Mandatory/Optional Description Example Reference name Mandatory name of license CC BY 4.0 - url Optional URL of license https://creativecommons.org/licenses/by/4.0 -","title":"identification.license"},{"location":"reference/mcf/#content_info","text":"Property Name Mandatory/Optional Description Example Reference type Mandatory Content type (must be one of 'coverage', 'image', 'feature_catalogue' image ISO 19115:2003 Section B.2.8.1 cloud_cover Optional area of the dataset obscured by clouds, expressed as a percentage of the spatial extent 72 ISO 19115:2003 Section B.2.8.1 processing_level Optional image distributor\u2019s code that identifies the level of radiometric and geometric processing that has been applied L1 ISO 19115:2003 Section B.2.8.1","title":"content_info"},{"location":"reference/mcf/#content_infoattributes","text":"content_info sections can have 1..n attributes sections as required using nesting. Example: attributes: - name: temperature title: en: Air temperature abstract: en: Description of air temperature attribute type: number units: K values: [1.2, 2.5, 1.3] Property Name Mandatory/Optional Description Example Reference name Mandatory attribute name temperature title Optional attribute title Air temperature abstract Optional attribute description Description of air temperature url Optional URL with more information about the attribute Air temperature type Optional data type (must be one of 'string', 'number', 'integer', 'object', 'array', 'boolean') string units Optional SI units K https://en.wikipedia.org/wiki/International_System_of_Units values Optional specification of attribute values see below","title":"content_info.attributes"},{"location":"reference/mcf/#content_infoattributesvalues","text":"Attributes may also provide the values within a given domain, via one of the following constructs:","title":"content_info.attributes.values"},{"location":"reference/mcf/#content_infoattributesvaluesenum","text":"Property Name Mandatory/Optional Description Example Reference enum Optional Enumerated list of values [1, 2, 3, 4] Example: values: enum: [1, 2, 3. 4]","title":"content_info.attributes.values.enum"},{"location":"reference/mcf/#content_infoattributesvaluesrange","text":"Property Name Mandatory/Optional Description Example Reference range Optional Range of values (min/max) [1, 4] Example: values: range: [1, 4]","title":"content_info.attributes.values.range"},{"location":"reference/mcf/#content_infoattributesvaluescodelist","text":"Property Name Mandatory/Optional Description Example Reference codelist Optional codelist of values see below codelist.name Mandatory value name foo codelist.title Optional value title Foo codelist.abstract Optional value abstract Description of value Foo codelist.url Optional URL with more information about the value https://example.org/foo Example: values: codelist: - name: foo title: en: foo title abstract: en: foo description url: https://example.org/values/foo","title":"content_info.attributes.values.codelist"},{"location":"reference/mcf/#content_infodimensions","text":"content_info objects support 1..n dimension objects. Property Name Mandatory/Optional Description Example Reference name Mandatory name of dimension B1 ISO 19115:2003 Section B.2.8.2 units Mandatory units in which sensor wavelengths are expressed nm ISO 19115:2003 Section B.2.8.2 min Mandatory shortest wavelength that the sensor is capable of collecting within a designated band 101 ISO 19115:2003 Section B.2.8.2 max Mandatory longest wavelength that the sensor is capable of collecting within a designated band 199 ISO 19115:2003 Section B.2.8.2","title":"content_info.dimensions"},{"location":"reference/mcf/#contact","text":"MCFs can have 1..n contact sections as required using nesting. Example: contact: pointOfContact: .... distributor: .... The contact.pointOfContact section provides information for the pointOfContact role (see ISO 19115:2003 Section B.3.2.1). This section is minimally required. Within each contact section, the following elements are supported: Property Name Mandatory/Optional Description Example Reference organization Mandatory name of the responsible organization Environment Canada ISO 19115:2003 Section B.3.2.1 url Mandatory on-line information that can be used to contact the individual or organization http://host/path ISO 19115:2003 Section B.3.2.3 individualname Mandatory name of the responsible person-surname given name title seperated by a delimiter positionname Mandatory role or position of the responsible person Senior Systems Scientist ISO 19115:2003 Section B.3.2.1 phone Mandatory telephone number by which individuals can speak to the responsible organization or individual +01-123-456-7890 ISO 19115:2003 Section B.3.2.7 fax Mandatory telephone number of a facsimile machine for the responsible organization or individual +01-123-456-7890 ISO 19115:2003 Section B.3.2.7 address Mandatory address line for the location (as described in ISO 11180 Annex A) 4905 Dufferin Street city Mandatory city of the location Toronto ISO 19115:2003 Section B.3.2.2 administrativearea Mandatory state, province of the location Ontario ISO 19115:2003 Section B.3.2.2 postalcode Mandatory ZIP or other postal code M3H 5T4 ISO 19115:2003 Section B.3.2.2 country Mandatory country of the physical address Canada ISO 19115:2003 Section B.3.2.2 email Mandatory address of the electronic mailbox of the responsible organization or individual foo@bar.tld ISO 19115:2003 Section B.3.2.2 hoursofservice Optional time period (including time zone) when individuals can contact the organization or individual 0700h - 1500h EST ISO 19115:2003 Section B.3.2.3 contactinstructions Optional supplementalinstructions on how or when to contact the individual or organization contact during working business hours ISO 19115:2003 Section B.3.2.3","title":"contact"},{"location":"reference/mcf/#contactdistributor","text":"The contact.distributor section provides information for the distributor role (see ISO 19115:2003 Section B.3.2.1) and has the identical structure as contact.pointOfContact . If contact information is the same for both, use YAML node anchors and references to have it provided in both sections in the metadata: contact: pointOfContact: &id_contact_poc ... distributor: *id_contact_poc","title":"contact.distributor"},{"location":"reference/mcf/#distribution","text":"MCFs can have 1..n distribution sections as required using nesting. Example: distribution: wms: .... waf: .... Within each distribution section, the following elements are supported: Property Name Mandatory/Optional Description Example Reference url Mandatory location (address) for on-line access using a Uniform Resource Locator address or similar addressing scheme such as http://www.isotc211.org/ http://host/path ISO 19115:2003 Section B.3.2.5 type Mandatory connection protocol to be used. Must be one of the identifier values from https://github.com/OSGeo/Cat-Interop/blob/master/LinkPropertyLookupTable.csv WWW:LINK ISO 19115:2003 Section B.3.2.5 rel Optional the type or semantic of the relation. The value should be an IANA link relation or a relation type specific to an established standard canonical Link Relations - Internet Assigned Numbers Authority name Mandatory name of the online resource Download portal ISO 19115:2003 Section B.3.2.5 description Mandatory detailed text description of what the online resources is/does brief description of the online resource (English) ISO 19115:2003 Section B.3.2.5 function Mandatory code for function performed by the online resource (must be one of 'download', 'information', 'offlineAccess', 'order', 'search') download ISO 19115:2003 Section B.3.2.5 format Optional Format of the distribution method WMS HNAP 2.3 format_version Optional Format version of the distribution method 1.0 HNAP 2.3 channel Optional channel/topic/exchange when link is a Pub/Sub endpoint my/cool/topic OGC API - Pub/Sub","title":"distribution"},{"location":"reference/mcf/#dataquality","text":"Property Name Mandatory/Optional Description Example Reference scope.level Optional hierarchical level of the data specificed by the scope dataset ISO 19115:2003 Section B.2.4.5 lineage.statement Optional general explanationn of the data producer's knowledge about the lineage of a dataset this dataset was produced from a custom process against dataset xyz ISO 19115:2003 Section B.2.4.2.1","title":"dataquality"},{"location":"reference/mcf/#tips","text":"","title":"Tips"},{"location":"reference/mcf/#keyword-substitution","text":"pygeometa supports using the following keyword substitutions: $year$ , which is substituted for the current year with the YYYY format, example: 2016 $date$ , which is substituted for the current date with the YYYY-MM-DD, example: 2016-12-22 format $datetime$ , which is substituted for the current date and time with the YYYY-MM-DDThh:mm:ssZ, example: 2016-12-22T16:34:15Z format","title":"Keyword Substitution"},{"location":"reference/formats/iso19139-2/","text":"ISO 19139-2 Schema Reference This documentation focuses on the ISO 19115-2/19139-2 Extensions for acquisition and processing based schema enhancements in pygeometa. Sections acquisition The acquisition object supports 1..n platform defintions. acquisition.platforms Property Name Mandatory/Optional Description Example Reference identifier Mandatory unique identification of the platform LANDSAT_8 ISO 19115 Part 2 Section B.2.5.8 description Mandatory platform description My platform ISO 19115 Part 2 Section B.2.5.8 acquisition.platforms objects support 1..n instrument definitions. acquisition.platforms[].instruments Property Name Mandatory/Optional Description Example Reference identifier Mandatory instrument identifier OLI_TIRS ISO 19115 Part 2 B.2.5.4 type Mandatory instrument type INS-NOBS ISO 19115 Part 2 B.2.5.4","title":"ISO 19115-2, Part 2: Extensions for acquisition and processing"},{"location":"reference/formats/iso19139-2/#iso-19139-2-schema-reference","text":"This documentation focuses on the ISO 19115-2/19139-2 Extensions for acquisition and processing based schema enhancements in pygeometa.","title":"ISO 19139-2 Schema Reference"},{"location":"reference/formats/iso19139-2/#sections","text":"","title":"Sections"},{"location":"reference/formats/iso19139-2/#acquisition","text":"The acquisition object supports 1..n platform defintions.","title":"acquisition"},{"location":"reference/formats/iso19139-2/#acquisitionplatforms","text":"Property Name Mandatory/Optional Description Example Reference identifier Mandatory unique identification of the platform LANDSAT_8 ISO 19115 Part 2 Section B.2.5.8 description Mandatory platform description My platform ISO 19115 Part 2 Section B.2.5.8 acquisition.platforms objects support 1..n instrument definitions.","title":"acquisition.platforms"},{"location":"reference/formats/iso19139-2/#acquisitionplatformsinstruments","text":"Property Name Mandatory/Optional Description Example Reference identifier Mandatory instrument identifier OLI_TIRS ISO 19115 Part 2 B.2.5.4 type Mandatory instrument type INS-NOBS ISO 19115 Part 2 B.2.5.4","title":"acquisition.platforms[].instruments"},{"location":"reference/formats/iso19139-hnap/","text":"HNAP Schema Reference This documentation focuses on unique HNAP schema specifities in pygeometa. identification.keywords HNAP support includes the following keywords sections. gc_cst : Government of Canada Core Subject Thesaurus hnap_category_information : HNAP hnap_category_geography : HNAP hnap_category_content : HNAP Keyword requirements are the same as pygeometa's default keyword rules. distribution Distribution identifier: To comply with HNAP, distribution methods require its sections to be duplicated and appended with _eng-CAN and _fra-CAN to distribution names Distribution parameters: Name of the distribution method needs to be specified with name: en and name: fr Do not provide values for the 'description' parameter in the MCF file since HNAP requires a special description that is built by pygeometa Content type needs to be bilingual and be a valid HNAP value Valid values are: Web Service,Service Web,Dataset,Donn\u00e9es,API,Application,Supporting Document,Document de soutien Format needs to be bilingual and based on the valid HNAP values Valid values are: AI. AMF,Application,ASCII Grid,BMP,CDED ASCII,CDR,CSV,DOC,dxf,E00,ECW,EDI,EMF,EPS,ESRI REST,EXE,FGDB / GDB,Flat raster binary,GeoPDF,GeoRSS,GeoTIF,GIF,GML,HDF,HTML,IATI,JPEG 2000,JPG,JSON,JSON Lines,KML / KMZ,NetCDF,ODP,ODS,ODT,PDF,PNG,PPT,RDF,RDFa,RSS,SAR / CCT,SAV,SEGY,SHP,SQL,SVG,TIFF,TXT,XLS,XLSM,XML,WFS,WMS,WMTS,Zip,Other Format version needs to be specified with format_version: Example of distribution section Example of valid HNAP distribution sections: distribution: waf_fra-CAN: url: http://dd.weather.gc.ca/model_gem_global/25km/grib2/lat_lon/ type: WWW:LINK name: en: MSC Datamart fr: Datamart du SMC hnap_contenttype: en: Dataset fr: Donn\u00e9es format: en: Other fr: Autre format_version: 0 function: download waf_eng-CAN: url: http://dd.weather.gc.ca/model_gem_global/25km/grib2/lat_lon/ type: WWW:LINK name: en: MSC Datamart fr: Datamart du SMC hnap_contenttype: en: Dataset fr: Donn\u00e9es format: en: Other fr: Autre format_version: 0 function: download wms_eng-CAN: url: http://geo.weather.gc.ca/geomet/?lang=E&service=WMS&request=GetCapabilities&layers=GDPS.ETA_TT hnap_contenttype: en: Web Service fr: Service Web type: OGC:WMS format: WMS format_version: 1.1.1 name: en: GDPS.ETA_TT fr: GDPS.ETA_TT function: download wms_fra-CAN: url: http://geo.weather.gc.ca/geomet/?lang=E&service=WMS&request=GetCapabilities&layers=GDPS.ETA_TT hnap_contenttype: en: Web Service fr: Service Web type: OGC:WMS format: WMS format_version: 1.1.1 name: en: GDPS.ETA_TT fr: GDPS.ETA_TT function: download","title":"ISO Harmonized North American Profile (HNAP)"},{"location":"reference/formats/iso19139-hnap/#hnap-schema-reference","text":"This documentation focuses on unique HNAP schema specifities in pygeometa.","title":"HNAP Schema Reference"},{"location":"reference/formats/iso19139-hnap/#identificationkeywords","text":"HNAP support includes the following keywords sections. gc_cst : Government of Canada Core Subject Thesaurus hnap_category_information : HNAP hnap_category_geography : HNAP hnap_category_content : HNAP Keyword requirements are the same as pygeometa's default keyword rules.","title":"identification.keywords"},{"location":"reference/formats/iso19139-hnap/#distribution","text":"Distribution identifier: To comply with HNAP, distribution methods require its sections to be duplicated and appended with _eng-CAN and _fra-CAN to distribution names Distribution parameters: Name of the distribution method needs to be specified with name: en and name: fr Do not provide values for the 'description' parameter in the MCF file since HNAP requires a special description that is built by pygeometa Content type needs to be bilingual and be a valid HNAP value Valid values are: Web Service,Service Web,Dataset,Donn\u00e9es,API,Application,Supporting Document,Document de soutien Format needs to be bilingual and based on the valid HNAP values Valid values are: AI. AMF,Application,ASCII Grid,BMP,CDED ASCII,CDR,CSV,DOC,dxf,E00,ECW,EDI,EMF,EPS,ESRI REST,EXE,FGDB / GDB,Flat raster binary,GeoPDF,GeoRSS,GeoTIF,GIF,GML,HDF,HTML,IATI,JPEG 2000,JPG,JSON,JSON Lines,KML / KMZ,NetCDF,ODP,ODS,ODT,PDF,PNG,PPT,RDF,RDFa,RSS,SAR / CCT,SAV,SEGY,SHP,SQL,SVG,TIFF,TXT,XLS,XLSM,XML,WFS,WMS,WMTS,Zip,Other Format version needs to be specified with format_version:","title":"distribution"},{"location":"reference/formats/iso19139-hnap/#example-of-distribution-section","text":"Example of valid HNAP distribution sections: distribution: waf_fra-CAN: url: http://dd.weather.gc.ca/model_gem_global/25km/grib2/lat_lon/ type: WWW:LINK name: en: MSC Datamart fr: Datamart du SMC hnap_contenttype: en: Dataset fr: Donn\u00e9es format: en: Other fr: Autre format_version: 0 function: download waf_eng-CAN: url: http://dd.weather.gc.ca/model_gem_global/25km/grib2/lat_lon/ type: WWW:LINK name: en: MSC Datamart fr: Datamart du SMC hnap_contenttype: en: Dataset fr: Donn\u00e9es format: en: Other fr: Autre format_version: 0 function: download wms_eng-CAN: url: http://geo.weather.gc.ca/geomet/?lang=E&service=WMS&request=GetCapabilities&layers=GDPS.ETA_TT hnap_contenttype: en: Web Service fr: Service Web type: OGC:WMS format: WMS format_version: 1.1.1 name: en: GDPS.ETA_TT fr: GDPS.ETA_TT function: download wms_fra-CAN: url: http://geo.weather.gc.ca/geomet/?lang=E&service=WMS&request=GetCapabilities&layers=GDPS.ETA_TT hnap_contenttype: en: Web Service fr: Service Web type: OGC:WMS format: WMS format_version: 1.1.1 name: en: GDPS.ETA_TT fr: GDPS.ETA_TT function: download","title":"Example of distribution section"},{"location":"reference/formats/wmo-cmp/","text":"WMO Core Metadata Profile Schema Reference This documentation focuses on the WMO Core Metadata Profile based schema enhancements in pygeometa. Sections identification Property Name Mandatory/Optional Description Example Reference otherconstraints_wmo_data_policy Mandatory WMO data policy statment from WMO_DataLicenseCode (must be one of 'WMOEssential', 'WMOAdditional' 'WMOOther') WMOEssential WMO Core Metadata Profile 1.3, Part 1, Section 9.3.1 otherconstraints_wmo_gts_priority Mandatory WMO GTS priority (must be one of 'GTSPriority1', 'GTSPriority2', 'GTSPriority3', 'GTSPriority4') GTSPriority2 WMO Core Metadata Profile 1.3, Part 1, Section 9.3.2 identification.keywords WMO support includes a wmo keywords section (WMO Core Metadata Profile 1.3, Part 2, Table 16). Keyword requirements are the same as pygeometa's default keywords rules. Validation WMO Core Metadata Profile output can be validated using the WMO Core Metadata Profile Test Suite .","title":"WMO Core Metadata Profile"},{"location":"reference/formats/wmo-cmp/#wmo-core-metadata-profile-schema-reference","text":"This documentation focuses on the WMO Core Metadata Profile based schema enhancements in pygeometa.","title":"WMO Core Metadata Profile Schema Reference"},{"location":"reference/formats/wmo-cmp/#sections","text":"","title":"Sections"},{"location":"reference/formats/wmo-cmp/#identification","text":"Property Name Mandatory/Optional Description Example Reference otherconstraints_wmo_data_policy Mandatory WMO data policy statment from WMO_DataLicenseCode (must be one of 'WMOEssential', 'WMOAdditional' 'WMOOther') WMOEssential WMO Core Metadata Profile 1.3, Part 1, Section 9.3.1 otherconstraints_wmo_gts_priority Mandatory WMO GTS priority (must be one of 'GTSPriority1', 'GTSPriority2', 'GTSPriority3', 'GTSPriority4') GTSPriority2 WMO Core Metadata Profile 1.3, Part 1, Section 9.3.2","title":"identification"},{"location":"reference/formats/wmo-cmp/#identificationkeywords","text":"WMO support includes a wmo keywords section (WMO Core Metadata Profile 1.3, Part 2, Table 16). Keyword requirements are the same as pygeometa's default keywords rules.","title":"identification.keywords"},{"location":"reference/formats/wmo-cmp/#validation","text":"WMO Core Metadata Profile output can be validated using the WMO Core Metadata Profile Test Suite .","title":"Validation"},{"location":"reference/formats/wmo-wcmp2/","text":"WMO Core Metadata Profile 2 (WCMP2) Schema Reference This documentation focuses on the draft WMO Core Metadata Profile based schema enhancements in pygeometa. Sections identification Property Name Mandatory/Optional Description Example Reference wmo_data_policy Mandatory WMO data policy as per Resolution 1 (Cg-Ext(2021) ( core or recommended ) core WMO Core Metadata Profile 2, clause 7 identification.keywords pygeometa WCMP2 support includes the following keywords sections. earth-system-discipline : Earth system categories as defined by the WMO Unified Data Policy, Resolution 1 (Cg-Ext(2021), Annex 1 . Ensure that vocabulary.url is set to https://github.com/wmo-im/wis2-topic-hierarchy/blob/main/topic-hierarchy/earth-system-discipline.csv). Validation WMO Core Metadata Profile output can be validated using the pywcmp tool.","title":"WMO Core Metadata Profile 2"},{"location":"reference/formats/wmo-wcmp2/#wmo-core-metadata-profile-2-wcmp2-schema-reference","text":"This documentation focuses on the draft WMO Core Metadata Profile based schema enhancements in pygeometa.","title":"WMO Core Metadata Profile 2 (WCMP2) Schema Reference"},{"location":"reference/formats/wmo-wcmp2/#sections","text":"","title":"Sections"},{"location":"reference/formats/wmo-wcmp2/#identification","text":"Property Name Mandatory/Optional Description Example Reference wmo_data_policy Mandatory WMO data policy as per Resolution 1 (Cg-Ext(2021) ( core or recommended ) core WMO Core Metadata Profile 2, clause 7","title":"identification"},{"location":"reference/formats/wmo-wcmp2/#identificationkeywords","text":"pygeometa WCMP2 support includes the following keywords sections. earth-system-discipline : Earth system categories as defined by the WMO Unified Data Policy, Resolution 1 (Cg-Ext(2021), Annex 1 . Ensure that vocabulary.url is set to https://github.com/wmo-im/wis2-topic-hierarchy/blob/main/topic-hierarchy/earth-system-discipline.csv).","title":"identification.keywords"},{"location":"reference/formats/wmo-wcmp2/#validation","text":"WMO Core Metadata Profile output can be validated using the pywcmp tool.","title":"Validation"},{"location":"reference/formats/wmo-wigos/","text":"WMO WIGOS Metadata Standard Reference This documentation focuses on the WMO WIGOS Metadata Standard based schema enhancements in pygeometa. pygeometa's MCF model for WIGOS Metadata inherits as well as extends the core MCF constructs. Codes Codes for WMO WIGOS are available at http://codes.wmo.int/wmdr Sections metadata See MCF reference contact See MCF reference. WMO WIGOS MCF add the contact type facility to attach contact information to a facility. The pointOfContact MCF contact is attached to the wmdr:Header element. identification See MCF reference facility The facility object consists of 1..n keys. Key names are up to the user with key objects having the model below. Property Name Mandatory/Optional Description Example Reference identifier Mandatory WMO WIGOS identifier 0-20008-0-JFJ WIGOS Metadata Representation, Section 8.6.4 name Mandatory WIGOS Metadata Representation, Section 4.3 type Mandatory The type of the observing facility from the Station/platform type codelist (http://codes.wmo.int/wmdr/_FacilityType) landFixed WIGOS Metadata Representation, Section 4.3.2 geopositioning_method Optional Element describes the geospatial reference system used for the specified geolocation (codelist http://codes.wmo.int/wmdr/_GeopositioningMethod) gps WIGOS Metadata Representation, Section 4.2.2 url Optional An online resource containing additional information about the facility or equipment https://example.org/station/123 WIGOS Metadata Representation, Section 4.2.2 date_established Mandatory Date at which the observingFacility was established. Normally considered to be the date the first observations were made 2011-11-11T11:11:11Z WIGOS Metadata Representation, Section 4.3.2 wmo_region Mandatory The WMO region the observing facility is located in, from the WMORegionType codelist (http://codes.wmo.int/wmdr/_WMORegion) northCentralAmericaCaribbean WIGOS Metadata Representation, Section 4.3.2 territory The territory object is a child of the facility object and allows for specifying 1..n child objects to model changing territory names over time. At least one child object is required. Property Name Mandatory/Optional Description Example Reference name Mandatory The territory the observing facility is located in, from the TerritoryType codelist (http://codes.wmo.int/wmdr/_TerritoryName) CAN WIGOS Metadata Representation, Section 4.3.2 valid_period Optional Specifies at least the begin date of the indicated territoryName. If omitted, the dateEstablished of the facility will be assumed begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 4.3.2 spatiotemporal The spatiotemporal object is a child of the facility object and allows for specifying 1..n child objects to model a moving location over time. At least one child object is required. Property Name Mandatory/Optional Description Example Reference timeperiod Mandatory Specifies at least the begin date accompanying the location begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 7.9 location Mandatory. The location property includes a crs property (EPSG code), and point property (x,y,z) Representative or conventional geospatial location of observing facility, the reference location. This will always be a point location, but this location can change with time. crs: 4326, point: -75,45,400 , end: now WIGOS Metadata Representation, Section 7.9 program_affiliation The program_affiliation object is a child of the facility object and allows for specifying 1..n child objects to model program affiliations. Property Name Mandatory/Optional Description Example Reference program Mandatory Program Affiliation, see http://codes.wmo.int/wmdr/_ProgramAffiliation GOS WIGOS Metadata Representation, Section 4.3.2 reporting_status The reporting_status object is a child of the program_affiliation object and allows for specifying 1..n child objects to model program affiliations reporting status over time. Property Name Mandatory/Optional Description Example Reference status Mandatory Declared reporting status of the observing facility from the ReportingStatusType codelist (http://codes.wmo.int/wmdr/_ReportingStatus) operational valid_period Optional Specifies at least the begin date of the indicated reportingStatus. begin: 2011-11-11 , end: now climate_zone The climate_zone object is a child of the facility object and allows for specifying 0..n child objects to model changing climate zones over time. Property Name Mandatory/Optional Description Example Reference name Mandatory Climate zone of the observing facility, from the ClimateZone codelist (http://codes.wmo.int/wmdr/_ClimateZone) snowFullyHumidCoolSummer WIGOS Metadata Representation, Section 4.3.2 valid_period Optional Specifies at least the begin date of the indicated climate zone. If omitted, the dateEstablished of the facility will be assumed begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 4.3.2 surface_cover The surface_cover object is a child of the facility object and allows for specifying 0..n child objects to model changing surface covers over time. Property Name Mandatory/Optional Description Example Reference name Mandatory Predominant surface cover, from the given surface cover classification scheme and the SurfaceCover codelist (http://codes.wmo.int/wmdr/_SurfaceCover) rainfedCroplands WIGOS Metadata Representation, Section 4.3.2 surface_cover_classification Mandatory Surface cover classification scheme, from the SurfaceCoverClassification codelist (http://codes.wmo.int/wmdr/_SurfaceCoverClassification) globCover2009 WIGOS Metadata Representation, Section 4.3.2 valid_period Optional Specifies at least the begin date. If omitted, the dateEstablished of the facility will be assumed begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 4.3.2 surface_roughness The surface_roughness object is a child of the facility object and allows for specifying 0..n child objects. Property Name Mandatory/Optional Description Example Reference name Mandatory Surface roughness of surrounding of the observing facility, from the SurfaceRoughness codelist (http://codes.wmo.int/wmdr/_SurfaceRoughness) rough WIGOS Metadata Representation, Section 4.3.2 valid_period Optional Specifies at least the begin date of the indicated surface roughness. If omitted, the dateEstablished of the facility will be assumed begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 4.3.2 topography_bathymetry The topography_bathymetry object is a child of the facility object and allows for specifying 0..n child objects to model topography or bathymetry descriptions over time. Property Name Mandatory/Optional Description Example Reference local_topography Optional Local topography of the observing facility from the LocalTopography codelist (http://codes.wmo.int/wmdr/_LocalTopography) flat WIGOS Metadata Representation, Section 4.3.2 relative_elevation Optional Relative elevation of the observing facility compared to its surrounding, from the RelativeElevation codelist (http://codes.wmo.int/wmdr/_RelativeElevation) inapplicable WIGOS Metadata Representation, Section 4.3.2 topographic_context Optional Topographic context of the observing facility, from the TopographicContext codelist (http://codes.wmo.int/wmdr/_TopographicContext) plains WIGOS Metadata Representation, Section 4.3.2 altitude_or_depth Optional Altitude or depth of observing facility, from the AltitudeOrDepth codelist (http://codes.wmo.int/wmdr/_AltitudeOrDepth) middleAltitude WIGOS Metadata Representation, Section 4.3.2 valid_period Optional Specifies at least the begin date. If omitted, the dateEstablished of the facility will be assumed begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 4.3.2 observations The observations object is a child of the facility object and allows for specifying 0..n child objects to model observations provided by a facility. Property Name Mandatory/Optional Description Example Reference name mandatory Freeform name of observed property Total column ozone WIGOS Metadata Representation, Section 4.3.2 timeperiod Optional The time period over which the property is observed. begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 6.2.5 url mandatory The online resource of the final result (output) of the observation https://example.org/data/atmos/spectral/total-column-ozone/111 WIGOS Metadata Representation, Section 6.2.5 observedproperty Mandatory The property type being observed ( ObservingMethodAtmosphere , ObservingMethodTerrestrial , ObservedVariableAtmosphere , ObservedVariableEarth , ObservedVariableOcean , ObservedVariableOuterSpace , ObservedVariableTerrestrial ) and name (see WMO code lists) relevant to the type type: ObservingMethodAtmosphere , name: 263","title":"WMO WIGOS Metadata Standard"},{"location":"reference/formats/wmo-wigos/#wmo-wigos-metadata-standard-reference","text":"This documentation focuses on the WMO WIGOS Metadata Standard based schema enhancements in pygeometa. pygeometa's MCF model for WIGOS Metadata inherits as well as extends the core MCF constructs.","title":"WMO WIGOS Metadata Standard Reference"},{"location":"reference/formats/wmo-wigos/#codes","text":"Codes for WMO WIGOS are available at http://codes.wmo.int/wmdr","title":"Codes"},{"location":"reference/formats/wmo-wigos/#sections","text":"","title":"Sections"},{"location":"reference/formats/wmo-wigos/#metadata","text":"See MCF reference","title":"metadata"},{"location":"reference/formats/wmo-wigos/#contact","text":"See MCF reference. WMO WIGOS MCF add the contact type facility to attach contact information to a facility. The pointOfContact MCF contact is attached to the wmdr:Header element.","title":"contact"},{"location":"reference/formats/wmo-wigos/#identification","text":"See MCF reference","title":"identification"},{"location":"reference/formats/wmo-wigos/#facility","text":"The facility object consists of 1..n keys. Key names are up to the user with key objects having the model below. Property Name Mandatory/Optional Description Example Reference identifier Mandatory WMO WIGOS identifier 0-20008-0-JFJ WIGOS Metadata Representation, Section 8.6.4 name Mandatory WIGOS Metadata Representation, Section 4.3 type Mandatory The type of the observing facility from the Station/platform type codelist (http://codes.wmo.int/wmdr/_FacilityType) landFixed WIGOS Metadata Representation, Section 4.3.2 geopositioning_method Optional Element describes the geospatial reference system used for the specified geolocation (codelist http://codes.wmo.int/wmdr/_GeopositioningMethod) gps WIGOS Metadata Representation, Section 4.2.2 url Optional An online resource containing additional information about the facility or equipment https://example.org/station/123 WIGOS Metadata Representation, Section 4.2.2 date_established Mandatory Date at which the observingFacility was established. Normally considered to be the date the first observations were made 2011-11-11T11:11:11Z WIGOS Metadata Representation, Section 4.3.2 wmo_region Mandatory The WMO region the observing facility is located in, from the WMORegionType codelist (http://codes.wmo.int/wmdr/_WMORegion) northCentralAmericaCaribbean WIGOS Metadata Representation, Section 4.3.2","title":"facility"},{"location":"reference/formats/wmo-wigos/#territory","text":"The territory object is a child of the facility object and allows for specifying 1..n child objects to model changing territory names over time. At least one child object is required. Property Name Mandatory/Optional Description Example Reference name Mandatory The territory the observing facility is located in, from the TerritoryType codelist (http://codes.wmo.int/wmdr/_TerritoryName) CAN WIGOS Metadata Representation, Section 4.3.2 valid_period Optional Specifies at least the begin date of the indicated territoryName. If omitted, the dateEstablished of the facility will be assumed begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 4.3.2","title":"territory"},{"location":"reference/formats/wmo-wigos/#spatiotemporal","text":"The spatiotemporal object is a child of the facility object and allows for specifying 1..n child objects to model a moving location over time. At least one child object is required. Property Name Mandatory/Optional Description Example Reference timeperiod Mandatory Specifies at least the begin date accompanying the location begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 7.9 location Mandatory. The location property includes a crs property (EPSG code), and point property (x,y,z) Representative or conventional geospatial location of observing facility, the reference location. This will always be a point location, but this location can change with time. crs: 4326, point: -75,45,400 , end: now WIGOS Metadata Representation, Section 7.9","title":"spatiotemporal"},{"location":"reference/formats/wmo-wigos/#program_affiliation","text":"The program_affiliation object is a child of the facility object and allows for specifying 1..n child objects to model program affiliations. Property Name Mandatory/Optional Description Example Reference program Mandatory Program Affiliation, see http://codes.wmo.int/wmdr/_ProgramAffiliation GOS WIGOS Metadata Representation, Section 4.3.2","title":"program_affiliation"},{"location":"reference/formats/wmo-wigos/#reporting_status","text":"The reporting_status object is a child of the program_affiliation object and allows for specifying 1..n child objects to model program affiliations reporting status over time. Property Name Mandatory/Optional Description Example Reference status Mandatory Declared reporting status of the observing facility from the ReportingStatusType codelist (http://codes.wmo.int/wmdr/_ReportingStatus) operational valid_period Optional Specifies at least the begin date of the indicated reportingStatus. begin: 2011-11-11 , end: now","title":"reporting_status"},{"location":"reference/formats/wmo-wigos/#climate_zone","text":"The climate_zone object is a child of the facility object and allows for specifying 0..n child objects to model changing climate zones over time. Property Name Mandatory/Optional Description Example Reference name Mandatory Climate zone of the observing facility, from the ClimateZone codelist (http://codes.wmo.int/wmdr/_ClimateZone) snowFullyHumidCoolSummer WIGOS Metadata Representation, Section 4.3.2 valid_period Optional Specifies at least the begin date of the indicated climate zone. If omitted, the dateEstablished of the facility will be assumed begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 4.3.2","title":"climate_zone"},{"location":"reference/formats/wmo-wigos/#surface_cover","text":"The surface_cover object is a child of the facility object and allows for specifying 0..n child objects to model changing surface covers over time. Property Name Mandatory/Optional Description Example Reference name Mandatory Predominant surface cover, from the given surface cover classification scheme and the SurfaceCover codelist (http://codes.wmo.int/wmdr/_SurfaceCover) rainfedCroplands WIGOS Metadata Representation, Section 4.3.2 surface_cover_classification Mandatory Surface cover classification scheme, from the SurfaceCoverClassification codelist (http://codes.wmo.int/wmdr/_SurfaceCoverClassification) globCover2009 WIGOS Metadata Representation, Section 4.3.2 valid_period Optional Specifies at least the begin date. If omitted, the dateEstablished of the facility will be assumed begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 4.3.2","title":"surface_cover"},{"location":"reference/formats/wmo-wigos/#surface_roughness","text":"The surface_roughness object is a child of the facility object and allows for specifying 0..n child objects. Property Name Mandatory/Optional Description Example Reference name Mandatory Surface roughness of surrounding of the observing facility, from the SurfaceRoughness codelist (http://codes.wmo.int/wmdr/_SurfaceRoughness) rough WIGOS Metadata Representation, Section 4.3.2 valid_period Optional Specifies at least the begin date of the indicated surface roughness. If omitted, the dateEstablished of the facility will be assumed begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 4.3.2","title":"surface_roughness"},{"location":"reference/formats/wmo-wigos/#topography_bathymetry","text":"The topography_bathymetry object is a child of the facility object and allows for specifying 0..n child objects to model topography or bathymetry descriptions over time. Property Name Mandatory/Optional Description Example Reference local_topography Optional Local topography of the observing facility from the LocalTopography codelist (http://codes.wmo.int/wmdr/_LocalTopography) flat WIGOS Metadata Representation, Section 4.3.2 relative_elevation Optional Relative elevation of the observing facility compared to its surrounding, from the RelativeElevation codelist (http://codes.wmo.int/wmdr/_RelativeElevation) inapplicable WIGOS Metadata Representation, Section 4.3.2 topographic_context Optional Topographic context of the observing facility, from the TopographicContext codelist (http://codes.wmo.int/wmdr/_TopographicContext) plains WIGOS Metadata Representation, Section 4.3.2 altitude_or_depth Optional Altitude or depth of observing facility, from the AltitudeOrDepth codelist (http://codes.wmo.int/wmdr/_AltitudeOrDepth) middleAltitude WIGOS Metadata Representation, Section 4.3.2 valid_period Optional Specifies at least the begin date. If omitted, the dateEstablished of the facility will be assumed begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 4.3.2","title":"topography_bathymetry"},{"location":"reference/formats/wmo-wigos/#observations","text":"The observations object is a child of the facility object and allows for specifying 0..n child objects to model observations provided by a facility. Property Name Mandatory/Optional Description Example Reference name mandatory Freeform name of observed property Total column ozone WIGOS Metadata Representation, Section 4.3.2 timeperiod Optional The time period over which the property is observed. begin: 2011-11-11 , end: now WIGOS Metadata Representation, Section 6.2.5 url mandatory The online resource of the final result (output) of the observation https://example.org/data/atmos/spectral/total-column-ozone/111 WIGOS Metadata Representation, Section 6.2.5 observedproperty Mandatory The property type being observed ( ObservingMethodAtmosphere , ObservingMethodTerrestrial , ObservedVariableAtmosphere , ObservedVariableEarth , ObservedVariableOcean , ObservedVariableOuterSpace , ObservedVariableTerrestrial ) and name (see WMO code lists) relevant to the type type: ObservingMethodAtmosphere , name: 263","title":"observations"}]} \ No newline at end of file diff --git a/search/worker.js b/search/worker.js new file mode 100644 index 0000000..8628dbc --- /dev/null +++ b/search/worker.js @@ -0,0 +1,133 @@ +var base_path = 'function' === typeof importScripts ? '.' : '/search/'; +var allowSearch = false; +var index; +var documents = {}; +var lang = ['en']; +var data; + +function getScript(script, callback) { + console.log('Loading script: ' + script); + $.getScript(base_path + script).done(function () { + callback(); + }).fail(function (jqxhr, settings, exception) { + console.log('Error: ' + exception); + }); +} + +function getScriptsInOrder(scripts, callback) { + if (scripts.length === 0) { + callback(); + return; + } + getScript(scripts[0], function() { + getScriptsInOrder(scripts.slice(1), callback); + }); +} + +function loadScripts(urls, callback) { + if( 'function' === typeof importScripts ) { + importScripts.apply(null, urls); + callback(); + } else { + getScriptsInOrder(urls, callback); + } +} + +function onJSONLoaded () { + data = JSON.parse(this.responseText); + var scriptsToLoad = ['lunr.js']; + if (data.config && data.config.lang && data.config.lang.length) { + lang = data.config.lang; + } + if (lang.length > 1 || lang[0] !== "en") { + scriptsToLoad.push('lunr.stemmer.support.js'); + if (lang.length > 1) { + scriptsToLoad.push('lunr.multi.js'); + } + if (lang.includes("ja") || lang.includes("jp")) { + scriptsToLoad.push('tinyseg.js'); + } + for (var i=0; i < lang.length; i++) { + if (lang[i] != 'en') { + scriptsToLoad.push(['lunr', lang[i], 'js'].join('.')); + } + } + } + loadScripts(scriptsToLoad, onScriptsLoaded); +} + +function onScriptsLoaded () { + console.log('All search scripts loaded, building Lunr index...'); + if (data.config && data.config.separator && data.config.separator.length) { + lunr.tokenizer.separator = new RegExp(data.config.separator); + } + + if (data.index) { + index = lunr.Index.load(data.index); + data.docs.forEach(function (doc) { + documents[doc.location] = doc; + }); + console.log('Lunr pre-built index loaded, search ready'); + } else { + index = lunr(function () { + if (lang.length === 1 && lang[0] !== "en" && lunr[lang[0]]) { + this.use(lunr[lang[0]]); + } else if (lang.length > 1) { + this.use(lunr.multiLanguage.apply(null, lang)); // spread operator not supported in all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Browser_compatibility + } + this.field('title'); + this.field('text'); + this.ref('location'); + + for (var i=0; i < data.docs.length; i++) { + var doc = data.docs[i]; + this.add(doc); + documents[doc.location] = doc; + } + }); + console.log('Lunr index built, search ready'); + } + allowSearch = true; + postMessage({config: data.config}); + postMessage({allowSearch: allowSearch}); +} + +function init () { + var oReq = new XMLHttpRequest(); + oReq.addEventListener("load", onJSONLoaded); + var index_path = base_path + '/search_index.json'; + if( 'function' === typeof importScripts ){ + index_path = 'search_index.json'; + } + oReq.open("GET", index_path); + oReq.send(); +} + +function search (query) { + if (!allowSearch) { + console.error('Assets for search still loading'); + return; + } + + var resultDocuments = []; + var results = index.search(query); + for (var i=0; i < results.length; i++){ + var result = results[i]; + doc = documents[result.ref]; + doc.summary = doc.text.substring(0, 200); + resultDocuments.push(doc); + } + return resultDocuments; +} + +if( 'function' === typeof importScripts ) { + onmessage = function (e) { + if (e.data.init) { + init(); + } else if (e.data.query) { + postMessage({ results: search(e.data.query) }); + } else { + console.error("Worker - Unrecognized message: " + e); + } + }; +} diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..0c1f62e --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,53 @@ + +This tutorial provides a tour of pygeometa for both users and developers, +and is aimed at getting you up and running quickly. Let's go!
+You require Python 3 or greater to use pygeometa.
+The easiest way to install pygeometa is using pip:
+pip3 install pygeometa
+
+This will install the latest stable release. If you are looking to work with +pygeometa from source, see the For Developers section for +more information.
+The basic pygeometa workflow is:
+# show all subcommands
+pygeometa
+
+# show all supported schemas
+pygeometa metadata schemas
+
+# provide a basic sanity check/report on an MCF (Metadata Control File)
+pygeometa metadata info path/to/file.yml
+
+# generate an ISO 19139 document to stdout
+pygeometa metadata generate path/to/file.yml --schema=iso19139
+
+# generate an ISO 19139 document to disk
+pygeometa metadata generate path/to/file.yml --schema=iso19139 --output=some_file.xml
+
+# generate an ISO 19139 document to disk with debugging (ERROR, WARNING, INFO, DEBUG)
+pygeometa metadata generate path/to/file.yml --schema=iso19139 --output=some_file.xml --verbosity=DEBUG # add verbose (ERROR, WARNING, INFO, DEBUG)
+
+# use your own defined schema
+pygeometa metadata generate path/to/file.yml --schema_local=/path/to/my-schema --output=some_file.xml # to file
+
+# validate an MCF document
+pygeometa validate path/to/file.yml
+
+# import a metadata document to MCF
+pygeometa metadata import path/to/file.xml --schema=iso19139
+
+# transform from one metadata representation to another
+pygeometa metadata transform path/to/file.xml --input-schema=iso19139 --output-schema=oarec-record
+
+pygeometa is best installed and used within a Python virtualenv.
+Dependencies are listed in requirements.txt
. Dependencies
+are automatically installed during pygeometa's installation.
python3 -m venv my-env
+cd my-env
+. bin/activate
+git clone https://github.com/geopython/pygeometa.git
+cd pygeometa
+python3 setup.py build
+python3 setup.py install
+
+from pygeometa.core import read_mcf, render_j2_template
+
+# read from disk
+mcf_dict = read_mcf('/path/to/file.yml')
+# read from string
+mcf_dict = read_mcf(mcf_string)
+
+# choose ISO 19139 output schema
+from pygeometa.schemas.iso19139 import ISO19139OutputSchema
+iso_os = ISO19139OutputSchema()
+
+# default schema
+xml_string = iso_os.write(mcf_dict)
+
+# user-defined schema
+xml_string = render_j2_template(mcf_dict, schema_local='/path/to/new-schema')
+
+# write to disk
+with open('output.xml', 'wb') as ff:
+ ff.write(xml_string)
+
+Same as installing a package. Use a virtualenv. Also install developer +requirements:
+pip3 install -r requirements-dev.txt
+
+Adding an output metadata schemas to pygeometa involves extending
+pygeometa.schemas.base.BaseOutputSchema
and supporting the write
+function to return a string of exported metadata content. If you are using
+Jinja2 templates, see the next section. If you are using another means of
+generating metadata (lxml, xml.etree, json, etc.), override the ABS write
+class to emit a string using your tooling/workflow accordingly. See the
+below sections for examples.
Once you have added your metadata schema, you need to register it with +pygeometa's schema registry:
+vi pygeometa/schemas/__init__.py
+# edit the SCHEMAS dict with the metadata schema name and dotted path of class
+
+To add support for a new metadata schema using Jinja2 templates:
+cp -r pygeometa/schemas/iso19139 pygeometa/schemas/new-schema
+
+Then modify *.j2
files in the new pygeometa/schemas/new-schema
directory
+to comply to new metadata schema.
To add support for a new metadata schemas using other tooling/workflow:
+mkdir pygeometa/schemas/foo
+cp pygeometa/schemas/iso19139/__init__.py pygeometa/schemas/foo
+vi pygeometa/schemas/foo/__init__.py
+# update class name and super().__init__() function accordingly
+
+# via distutils
+python3 setup.py test
+# manually
+cd tests
+python3 run_tests.py
+
+python3 setup.py sdist bdist_wheel --universal
+twine upload dist/*
+
+All bugs, enhancements and issues are managed on GitHub.
+Started in 2009, pygeometa originated within an internal project called pygdm, +which provided generic geospatial data management functions. pygdm (now end +of life) was used for generating MSC/CMC geospatial metadata. pygeometa was +pulled out of pygdm to focus on the core requirement of generating geospatial +metadata within a real-time environment and automated workflows.
+In 2015 pygeometa was made publically available in support of the Treasury +Board Policy on Acceptable Network and Device Use.