From 491d09c17d020a2f131fc813098ef0bb76538f23 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Sun, 9 Mar 2025 06:48:16 -0400 Subject: [PATCH 1/2] minor doc sweep (links, reorganize) --- LICENSE.md | 2 +- docs/content/index.md | 6 +-- .../{formats => extensions}/iso19139-2.md | 2 +- .../{formats => extensions}/iso19139-hnap.md | 10 ++--- .../{formats => extensions}/wmo-cmp.md | 3 +- .../{formats => extensions}/wmo-wcmp2.md | 8 ++-- .../{formats => extensions}/wmo-wigos.md | 37 +++++++++---------- docs/content/reference/index.md | 10 ++--- docs/content/reference/mcf.md | 14 +++---- docs/content/tutorial.md | 32 +++++++++++----- docs/mkdocs.yml | 17 +++++---- 11 files changed, 75 insertions(+), 66 deletions(-) rename docs/content/reference/{formats => extensions}/iso19139-2.md (82%) rename docs/content/reference/{formats => extensions}/iso19139-hnap.md (86%) rename docs/content/reference/{formats => extensions}/wmo-cmp.md (83%) rename docs/content/reference/{formats => extensions}/wmo-wcmp2.md (50%) rename docs/content/reference/{formats => extensions}/wmo-wigos.md (77%) diff --git a/LICENSE.md b/LICENSE.md index 7d32d95..813ddfb 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -19,7 +19,7 @@ are asked to read the 3rd Party Licenses referenced with those assets. The MIT License (MIT) ===================== -Copyright (c) 2015 Government of Canada +Copyright (c) 2025 Government of Canada Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/docs/content/index.md b/docs/content/index.md index f733d5e..347769c 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -6,7 +6,7 @@ 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]). +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. @@ -20,7 +20,7 @@ The project supports various metadata formats out of the box including ISO find the format you're looking for? Element(s) missing from a given format? Feel free to open an [issue](https://github.com/geopython/pygeometa/issues)! -pygeometa has minimal dependencies (install is less than 50 kB), and provides +pygeometa has minimal dependencies (wheel install is less than 100 kB), and provides a flexible extension mechanism leveraging the Jinja2 templating system. pygeometa is [open source](https://opensource.org) and released under an @@ -44,4 +44,4 @@ 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](http://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=27122). +Board [Policy on Acceptable Network and Device Use](https://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=27122). diff --git a/docs/content/reference/formats/iso19139-2.md b/docs/content/reference/extensions/iso19139-2.md similarity index 82% rename from docs/content/reference/formats/iso19139-2.md rename to docs/content/reference/extensions/iso19139-2.md index d198cec..780da23 100644 --- a/docs/content/reference/formats/iso19139-2.md +++ b/docs/content/reference/extensions/iso19139-2.md @@ -1,6 +1,6 @@ # ISO 19139-2 Schema Reference -This documentation focuses on the [ISO 19115-2/19139-2 Extensions for acquisition and processing](https://www.iso.org/standard/67039.html) based schema enhancements in pygeometa. +This document describes [ISO 19115-2/19139-2 Extensions for acquisition and processing](https://www.iso.org/standard/67039.html) schema extensions in pygeometa. ## Sections diff --git a/docs/content/reference/formats/iso19139-hnap.md b/docs/content/reference/extensions/iso19139-hnap.md similarity index 86% rename from docs/content/reference/formats/iso19139-hnap.md rename to docs/content/reference/extensions/iso19139-hnap.md index dcba4fe..ac0a1f4 100644 --- a/docs/content/reference/formats/iso19139-hnap.md +++ b/docs/content/reference/extensions/iso19139-hnap.md @@ -1,6 +1,6 @@ # HNAP Schema Reference -This documentation focuses on unique HNAP schema specifities in pygeometa. +This document describes HNAP schema extensions in pygeometa. ### `identification.keywords` @@ -36,7 +36,7 @@ Example of valid HNAP distribution sections: ```yaml distribution: waf_fra-CAN: - url: http://dd.weather.gc.ca/model_gem_global/25km/grib2/lat_lon/ + url: https://dd.weather.gc.ca/model_gem_global/25km/grib2/lat_lon/ type: WWW:LINK name: en: MSC Datamart @@ -51,7 +51,7 @@ distribution: function: download waf_eng-CAN: - url: http://dd.weather.gc.ca/model_gem_global/25km/grib2/lat_lon/ + url: https://dd.weather.gc.ca/model_gem_global/25km/grib2/lat_lon/ type: WWW:LINK name: en: MSC Datamart @@ -66,7 +66,7 @@ distribution: function: download wms_eng-CAN: - url: http://geo.weather.gc.ca/geomet/?lang=E&service=WMS&request=GetCapabilities&layers=GDPS.ETA_TT + url: https://geo.weather.gc.ca/geomet/?lang=E&service=WMS&request=GetCapabilities&layers=GDPS.ETA_TT hnap_contenttype: en: Web Service fr: Service Web @@ -79,7 +79,7 @@ distribution: function: download wms_fra-CAN: - url: http://geo.weather.gc.ca/geomet/?lang=E&service=WMS&request=GetCapabilities&layers=GDPS.ETA_TT + url: https://geo.weather.gc.ca/geomet/?lang=E&service=WMS&request=GetCapabilities&layers=GDPS.ETA_TT hnap_contenttype: en: Web Service fr: Service Web diff --git a/docs/content/reference/formats/wmo-cmp.md b/docs/content/reference/extensions/wmo-cmp.md similarity index 83% rename from docs/content/reference/formats/wmo-cmp.md rename to docs/content/reference/extensions/wmo-cmp.md index f297929..9b554c6 100644 --- a/docs/content/reference/formats/wmo-cmp.md +++ b/docs/content/reference/extensions/wmo-cmp.md @@ -1,7 +1,6 @@ # WMO Core Metadata Profile Schema Reference -This documentation focuses on the [WMO Core Metadata Profile](http://wis.wmo.int/2013/metadata/version_1-3-0/WMO_Core_Metadata_Profile_v1.3_Part_1.pdf) based schema -enhancements in pygeometa. +This document describes [WMO Core Metadata Profile](https://wis.wmo.int/2013/metadata/version_1-3-0/WMO_Core_Metadata_Profile_v1.3_Part_1.pdf) schema extensions in pygeometa. ## Sections diff --git a/docs/content/reference/formats/wmo-wcmp2.md b/docs/content/reference/extensions/wmo-wcmp2.md similarity index 50% rename from docs/content/reference/formats/wmo-wcmp2.md rename to docs/content/reference/extensions/wmo-wcmp2.md index ac3f9d8..a23d830 100644 --- a/docs/content/reference/formats/wmo-wcmp2.md +++ b/docs/content/reference/extensions/wmo-wcmp2.md @@ -1,7 +1,7 @@ # WMO Core Metadata Profile 2 (WCMP2) Schema Reference -This documentation focuses on the draft [WMO Core Metadata Profile](https://github.com/wmo-im/wcmp2) based schema -enhancements in pygeometa. +This document describes [WMO Core Metadata Profile (WCMP2)](https://wmo-im.github.io/wcmp2/standard/wcmp2-STABLE.html) schema +extensions in pygeometa. ## Sections @@ -15,9 +15,9 @@ wmo_data_policy|Mandatory|WMO data policy as per Resolution 1 (Cg-Ext(2021) (`co pygeometa WCMP2 support includes the following `keywords` sections. -* `earth-system-discipline`: [Earth system categories](https://github.com/wmo-im/wis2-topic-hierarchy/blob/main/topic-hierarchy/earth-system-discipline.csv) as defined by the [WMO Unified Data Policy, Resolution 1 (Cg-Ext(2021), Annex 1](https://library.wmo.int/records/item/58009-wmo-unified-data-policy). +* `earth-system-discipline`: [Earth system categories](https://codes.wmo.int/wis/topic-hierarchy/earth-system-discipline) as defined by the [WMO Unified Data Policy, Resolution 1 (Cg-Ext(2021), Annex 1](https://library.wmo.int/records/item/58009-wmo-unified-data-policy). -Ensure that `vocabulary.url` is set to https://github.com/wmo-im/wis2-topic-hierarchy/blob/main/topic-hierarchy/earth-system-discipline.csv). +Ensure that `vocabulary.url` is set to https://codes.wmo.int/wis/topic-hierarchy/earth-system-discipline ## Validation diff --git a/docs/content/reference/formats/wmo-wigos.md b/docs/content/reference/extensions/wmo-wigos.md similarity index 77% rename from docs/content/reference/formats/wmo-wigos.md rename to docs/content/reference/extensions/wmo-wigos.md index 5623d0a..0056a0c 100644 --- a/docs/content/reference/formats/wmo-wigos.md +++ b/docs/content/reference/extensions/wmo-wigos.md @@ -1,14 +1,11 @@ # WMO WIGOS Metadata Standard Reference -This documentation focuses on the [WMO WIGOS Metadata Standard](https://library.wmo.int/opac/doc_num.php?explnum_id=3653) based schema -enhancements in pygeometa. - -pygeometa's MCF model for WIGOS Metadata inherits as well as extends the core -MCF constructs. +This document describes [WMO WIGOS Metadata Standard](https://library.wmo.int/opac/doc_num.php?explnum_id=3653) schema +extensions in pygeometa. ## Codes -Codes for WMO WIGOS are available at http://codes.wmo.int/wmdr +Codes for WMO WIGOS are available at https://codes.wmo.int/wmdr ## Sections @@ -35,11 +32,11 @@ 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 +type|Mandatory|The type of the observing facility from the Station/platform type codelist (https://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 https://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 +wmo_region|Mandatory|The WMO region the observing facility is located in, from the WMORegionType codelist (https://codes.wmo.int/wmdr/_WMORegion)|northCentralAmericaCaribbean|WIGOS Metadata Representation, Section 4.3.2 #### `territory` @@ -49,7 +46,7 @@ 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 +name|Mandatory|The territory the observing facility is located in, from the TerritoryType codelist (https://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` @@ -69,7 +66,7 @@ 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 +program|Mandatory|Program Affiliation, see https://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 @@ -78,7 +75,7 @@ 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`| +status|Mandatory|Declared reporting status of the observing facility from the ReportingStatusType codelist (https://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` @@ -87,7 +84,7 @@ allows for specifying 0..n child objects to model changing climate zones over ti 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 +name|Mandatory|Climate zone of the observing facility, from the ClimateZone codelist (https://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` @@ -96,8 +93,8 @@ allows for specifying 0..n child objects to model changing surface covers over t 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 +name|Mandatory|Predominant surface cover, from the given surface cover classification scheme and the SurfaceCover codelist (https://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 (https://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` @@ -106,7 +103,7 @@ 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 +name|Mandatory|Surface roughness of surrounding of the observing facility, from the SurfaceRoughness codelist (https://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` @@ -115,10 +112,10 @@ allows for specifying 0..n child objects to model topography or bathymetry descr 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 +local_topography|Optional|Local topography of the observing facility from the LocalTopography codelist (https://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 (https://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 (https://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 (https://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` diff --git a/docs/content/reference/index.md b/docs/content/reference/index.md index e62fd4f..44edbe5 100644 --- a/docs/content/reference/index.md +++ b/docs/content/reference/index.md @@ -2,8 +2,8 @@ * [Metadata Control File](mcf.md) * Formats - * [iso19139](formats/iso19139-2.md), [specification](http://www.iso.org/iso/catalogue_detail.htm?csnumber=32557) - * [iso19139-hnap](formats/iso19139-hnap.md), [specification](http://www.gcpedia.gc.ca/wiki/Federal_Geospatial_Platform/Policies_and_Standards/Catalogue/Release/Appendix_B_Guidelines_and_Best_Practices/Guide_to_Harmonized_ISO_19115:2003_NAP) - * [wmo-cmp](formats/wmo-cmp.md), [specification](http://wis.wmo.int/2013/metadata/version_1-3-0/WMO_Core_Metadata_Profile_v1.3_Part_1.pdf) - * [wmo-wcmp2](formats/wmo-wcmp2.md), [draft specification](https://github.com/wmo-im/wcmp2) - * [wmo-wigos](formats/wmo-wigos.md), [specification](https://library.wmo.int/opac/doc_num.php?explnum_id=3653) + * [iso19139](extensions/iso19139-2.md), [specification](https://www.iso.org/standard/57104.html) + * [iso19139-hnap](extensions/iso19139-hnap.md), [specification](https://www.gcpedia.gc.ca/wiki/Federal_Geospatial_Platform/Policies_and_Standards/Catalogue/Release/Appendix_B_Guidelines_and_Best_Practices/Guide_to_Harmonized_ISO_19115:2003_NAP) + * [wmo-cmp](extensions/wmo-cmp.md), [specification](https://wis.wmo.int/2013/metadata/version_1-3-0/WMO_Core_Metadata_Profile_v1.3_Part_1.pdf) + * [wmo-wcmp2](extensions/wmo-wcmp2.md), [specification](https://wmo-im.github.io/wcmp2/standard/wcmp2-STABLE.html) + * [wmo-wigos](extensions/wmo-wigos.md), [specification](https://library.wmo.int/opac/doc_num.php?explnum_id=3653) diff --git a/docs/content/reference/mcf.md b/docs/content/reference/mcf.md index a979554..ff7ce08 100644 --- a/docs/content/reference/mcf.md +++ b/docs/content/reference/mcf.md @@ -31,7 +31,7 @@ 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 +# in insert mode, hit CTRL-V $CODE, where $CODE is as per https://www.htmlhelp.com/reference/charset # to see how the file is actually encoded on disk file --mime-encoding file.txt file -i file.txt @@ -145,10 +145,10 @@ topiccategory|Optional|main theme(s) of the dataset (must be one of 'geoscientif fees|Optional|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|Optional|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 +url|Mandatory|URL of the dataset to which the metadata applies|https://example.org/data|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|Optional|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 +browsegraphic|Optional|graphic that provides an illustration of the dataset|https://example.org/dataset.png|ISO 19115:2003 B.2.2.2 #### `identification.dates` @@ -215,7 +215,7 @@ identification: 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 + keywords_codelist: https://wis.wmo.int/2011/schemata/iso19139_2007/schema/resources/Codelist/gmxCodelists.xml#MD_KeywordTypeCode ``` Schema specific keywords sections @@ -232,7 +232,7 @@ 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 +keywords_codelist|Optional|specific code list URL (for advanced use cases, else the default is as per the given specified schema)|https://wis.wmo.int/2011/schemata/iso19139_2007/schema/resources/Codelist/gmxCodelists.xml|ISO 19115:2003 Section B.2.2.3 ##### `identification.keywords.vocabulary` @@ -371,7 +371,7 @@ 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 +url|Mandatory|on-line information that can be used to contact the individual or organization|https://example.org/data|ISO 19115:2003 Section B.3.2.3 individualname|Mandatory|name of the responsible person-surname|given name|title seperated by a delimiter|Lastname, Firstname|ISO 19115:2003 Section B.3.2.1 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 @@ -415,7 +415,7 @@ 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 +url|Mandatory|location (address) for on-line access using a Uniform Resource Locator address or similar addressing scheme such as http://www.isotc211.org/|https://example.org/data|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](https://www.iana.org/assignments/link-relations/link-relations.xhtml) 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 diff --git a/docs/content/tutorial.md b/docs/content/tutorial.md index 8a4c482..da54fd8 100644 --- a/docs/content/tutorial.md +++ b/docs/content/tutorial.md @@ -25,7 +25,7 @@ more information. The basic pygeometa workflow is: -1. Create a 'metadata control file' YAML file that contains metadata information +1. Create a 'Metadata Control File' YAML file that contains metadata information 1. Modify the [sample.yml](https://github.com/geopython/pygeometa/blob/master/sample.yml) example 2. pygeometa supports nesting MCFs together, allowing providing a single MCF for common metadata parameters (e.g. common contact information) @@ -132,15 +132,25 @@ 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 ABC `write` -class to emit a string using your tooling/workflow accordingly. See the -below sections for examples. +Adding metadata schemas to pygeometa involves extending +`pygeometa.schemas.base.BaseOutputSchema` and implementing the following design pattern: -Once you have added your metadata schema, you need to register it with +- `__init__`: initializer, including the following code: +```python +# initialize args: +super().__init__('shortname', 'my cool metadata', 'xml', THISDIR) +# - 'shortname': shortname identifier for metadata schema +# - 'my cool metadata': descripts of metadata schema +# - 'xml': encoding type (default is `xml`; `json` also supported) +# - 'THISDIR': current directory of plugin file for template rendering +``` +- `write`: write a string or dictionary of metadata output. Default behaviour + consists of Jinja2 template rendering (see [Jinja2 templates](#jinja2-templates) + for more information). Outputs can be generated via other means (lxml, xml.tree, + json, etc.) +- `import_` (optional): import a metadata format into MCF + +Once you have added your metadata schema plugin, it needs to be registered it with pygeometa's schema registry: ```bash @@ -151,9 +161,11 @@ vi pygeometa/schemas/__init__.py #### Jinja2 templates To add support for a new metadata schema using Jinja2 templates: + ```bash 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. @@ -201,4 +213,4 @@ 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](http://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=27122). +Board [Policy on Acceptable Network and Device Use](https://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=27122). diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 13e91cf..f8fa614 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,7 +1,7 @@ site_name: "pygeometa: Metadata Creation for the Rest of Us" site_description: pygeometa is a Python package to generate metadata for geospatial datasets site_author: the pygeometa team -copyright: Copyright (c) 2015 - 2019 the pygeometa team +copyright: Copyright (c) 2015 - 2025 the pygeometa team site_url: https://geopython.github.io/pygeometa repo_url: https://github.com/geopython/pygeometa docs_dir: content @@ -11,13 +11,14 @@ nav: - Code: https://github.com/geopython/pygeometa - Tutorial: tutorial.md - Reference: - - Metadata Control File: reference/mcf.md - - Formats: - - "ISO 19115-2, Part 2: Extensions for acquisition and processing": reference/formats/iso19139-2.md - - ISO Harmonized North American Profile (HNAP): reference/formats/iso19139-hnap.md - - WMO Core Metadata Profile: reference/formats/wmo-cmp.md - - WMO Core Metadata Profile 2: reference/formats/wmo-wcmp2.md - - WMO WIGOS Metadata Standard: reference/formats/wmo-wigos.md + - Metadata Control File: + - Core: reference/mcf.md + - Extensions: + - "ISO 19115-2, Part 2: Extensions for acquisition and processing": reference/extensions/iso19139-2.md + - ISO Harmonized North American Profile (HNAP): reference/extensions/iso19139-hnap.md + - WMO Core Metadata Profile: reference/extensions/wmo-cmp.md + - WMO Core Metadata Profile 2: reference/extensions/wmo-wcmp2.md + - WMO WIGOS Metadata Standard: reference/extensions/wmo-wigos.md # - Index: reference/index.md - pygeoapi plugin: pygeoapi-plugin.md From 0084fce7ebbd24603595fe6dba3da1b449f57efa Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Sun, 9 Mar 2025 07:20:23 -0400 Subject: [PATCH 2/2] more docs update --- docs/content/reference/mcf.md | 52 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/content/reference/mcf.md b/docs/content/reference/mcf.md index ff7ce08..7c3c9c7 100644 --- a/docs/content/reference/mcf.md +++ b/docs/content/reference/mcf.md @@ -4,18 +4,18 @@ Version: 1.0 ## Basic Concepts -* Sections are case sensitive -* Section parameters are case sensitive -* Section parameter values are case sensitive +* Section names are case sensitive +* Section parameter names are case sensitive +* Section parameter codelist values are case sensitive * YAML [rules, conventions and features](https://en.wikipedia.org/wiki/YAML) are suppported, such as: - * node anchors / references - * data typing -* If an optional section is specified, then its child parameters' cardinality are enforced + * node anchors / references + * data typing + * commented lines (`#`) +* If an optional section is specified, then its child parameter cardinality is 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 +* For colons (`:`) in text values, use quotation marks (`"` or `'`) on either side of your text to avoid parsing errors ## Version format @@ -23,9 +23,7 @@ MCFs are versioned using X.Y (MAJOR.MINOR changes) format. If a non supported MC ## Encoding -The MCF **MUST** be utf8 encoded. That is all. - -Is your MCF Encoded as UTF8? +The MCF **MUST** be UTF-8 encoded. That is all. ```bash # editing in vim @@ -41,16 +39,16 @@ 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. +In the case where the user is generating metadata for multiple datasets which have common information, it becomes efficient to nest MCFs. 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` +* Add `base_mcf: foo.yml` at the top of any section of a MCF * 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 +* One `base_mcf` per section of a MCF may be used * 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 * Note that if a parameter in the current MCF is a YAML list, the corresponding base_mcf list (if it exists) is entirely overwritten @@ -58,7 +56,7 @@ Notes about nesting MCFs: ## Environment variables -pygeometa supports environment variables, using the notation in the example MCF snippet below: +pygeometa supports use of environment variables, using the notation in the example MCF snippet below: ```yaml metadata: @@ -101,7 +99,19 @@ title: 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. +The ```language``` value in the ```metadata``` section **must** be a 2 letter language code (e.g. ```es``` for Spanish). + +## Keyword Substitution + +pygeometa supports using the following keyword substitutions: + +Keyword|Description|Format|Example +-------|-----------|------|-------: +`$year$`|current year|`YYYY`|2016 +`$date$`|current date|`YYYY-MM-DD`|2016-12-22 +`$datetime$`|current date and time|`YYYY-MM-DDThh:mm:ssZ`|2016-12-22T16:34:15Z + +# Reference ## Sections @@ -433,13 +443,3 @@ 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