├── .github ├── remark.yaml └── workflows │ ├── publish.yaml │ └── test.yaml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── examples ├── item-epos.json └── item.json ├── json-schema └── schema.json └── package.json /.github/remark.yaml: -------------------------------------------------------------------------------- 1 | plugins: 2 | # Check links 3 | - validate-links 4 | # Apply some recommended defaults for consistency 5 | - remark-preset-lint-consistent 6 | - remark-preset-lint-recommended 7 | - lint-no-html 8 | # General formatting 9 | - - remark-lint-emphasis-marker 10 | - '*' 11 | - remark-lint-hard-break-spaces 12 | - remark-lint-blockquote-indentation 13 | - remark-lint-no-consecutive-blank-lines 14 | - - remark-lint-maximum-line-length 15 | - 150 16 | # Code 17 | - remark-lint-fenced-code-flag 18 | - remark-lint-fenced-code-marker 19 | - remark-lint-no-shell-dollars 20 | - - remark-lint-code-block-style 21 | - 'fenced' 22 | # Headings 23 | - remark-lint-heading-increment 24 | - remark-lint-no-multiple-toplevel-headings 25 | - remark-lint-no-heading-punctuation 26 | - - remark-lint-maximum-heading-length 27 | - 70 28 | - - remark-lint-heading-style 29 | - atx 30 | - - remark-lint-no-shortcut-reference-link 31 | - false 32 | # Lists 33 | - remark-lint-list-item-bullet-indent 34 | - remark-lint-ordered-list-marker-style 35 | - remark-lint-ordered-list-marker-value 36 | - remark-lint-checkbox-character-style 37 | - - remark-lint-unordered-list-marker-style 38 | - '-' 39 | - - remark-lint-list-item-indent 40 | - space 41 | # Tables 42 | - remark-lint-table-pipes 43 | - remark-lint-no-literal-urls 44 | -------------------------------------------------------------------------------- /.github/workflows/publish.yaml: -------------------------------------------------------------------------------- 1 | name: Publish JSON Schema 2 | on: 3 | release: 4 | types: [published] 5 | jobs: 6 | deploy: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Inject env variables 10 | uses: rlespinasse/github-slug-action@v3.x 11 | - uses: actions/checkout@v2 12 | - name: deploy JSON Schema for version ${{ env.GITHUB_REF_SLUG }} 13 | uses: peaceiris/actions-gh-pages@v3 14 | with: 15 | github_token: ${{ secrets.GITHUB_TOKEN }} 16 | publish_dir: json-schema 17 | destination_dir: ${{ env.GITHUB_REF_SLUG }} 18 | -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- 1 | name: Check Markdown and Examples 2 | on: [push, pull_request] 3 | jobs: 4 | deploy: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/setup-node@v2 8 | with: 9 | node-version: 'lts/*' 10 | - uses: actions/checkout@v2 11 | - run: | 12 | npm install 13 | npm test 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS files 2 | .DS_Store 3 | Thumbs.db 4 | 5 | # Editors 6 | /.idea/ 7 | /.vscode/ 8 | 9 | # Node / npm 10 | .npm 11 | /node_modules/ 12 | /package-lock.json 13 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## [Unreleased] 8 | 9 | ### Added 10 | 11 | ### Changed 12 | 13 | ### Deprecated 14 | 15 | ### Removed 16 | 17 | ### Fixed 18 | 19 | ## [v1.0.0] - 2024-03-11 20 | 21 | [Unreleased]: 22 | [v1.0.0]: 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # InSAR Extension Specification 2 | 3 | - **Title:** InSAR 4 | - **Identifier:** 5 | - **Field Name Prefix:** insar 6 | - **Scope:** Item 7 | - **Extension [Maturity Classification](https://github.com/radiantearth/stac-spec/tree/master/extensions/README.md#extension-maturity):** Proposal 8 | - **Owner**: @fabricebrito, @emmanuelmathot 9 | 10 | This document explains the InSAR Extension to the [SpatioTemporal Asset Catalog](https://github.com/radiantearth/stac-spec) (STAC) specification. 11 | 12 | Interferometric synthetic aperture radar, abbreviated InSAR (or deprecated IfSAR), 13 | is a radar technique used in geodesy and remote sensing. 14 | This geodetic method uses two or more synthetic aperture radar (SAR) images to generate maps of surface deformation or digital elevation, 15 | using differences in the phase of the waves returning to the satellite or aircraft. 16 | The technique can potentially measure millimetre-scale changes in deformation over spans of days to years. 17 | It has applications for geophysical monitoring of natural hazards, for example earthquakes, volcanoes and landslides, 18 | and in structural engineering, in particular monitoring of subsidence and structural stability. 19 | 20 | The extension is primarly intented to describe **products** of InSAR processing, typically interferograms and related products. 21 | 22 | - Examples: 23 | - [Simple Item example](examples/item.json): Shows the basic usage of the extension in a STAC Item 24 | - [EPOS Item example](examples/item-epos.json): Shows the usage of the extension in a STAC Item with [EPOS data](https://gitlab.com/epos-tcs-satdata/productmetadata/-/blob/master/samples/UNWRAPPED_INTERFEROGRAM_InU_CNRIREA_20200814_20200820_ECJT.metadata) 25 | - [JSON Schema](json-schema/schema.json) 26 | - [Changelog](./CHANGELOG.md) 27 | 28 | ## Item Properties 29 | 30 | | Field Name | Type | Description | 31 | | ---------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 32 | | insar:perpendicular_baseline | number | The distance between two acquisition spots perpendicular to the satellite viewing direction | 33 | | insar:temporal_baseline | number | The time period between the reference and secondary acquisitions | 34 | | insar:height_of_ambiguity | number | This height of ambiguity is the 2 π interferometric phase cycle scaled with the perpendicular baseline between both satellites. The smaller the height of ambiguity is, the lower is the influence of errors caused by the instrument or the different decorrelation effects. | 35 | | insar:reference_datetime | string | Date of reference acquisition, in UTC. It is formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | 36 | | insar:secondary_datetime | string | Date of secondary acquisition, in UTC. It is formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | 37 | | insar:processing_dem | string | String representing the Digital Elevation Model used for processing the input data. A list is proposed in the [DEMs section](#digital-elevation-models-dems) | 38 | | insar:geocoding_dem | string | String representing the Digital Elevation Model used for geocoding the product. A list is proposed in the [DEMs section](#digital-elevation-models-dems) | 39 | 40 | ## Best Practices 41 | 42 | ### Core and other extensions fields 43 | 44 | It is higly recommended to use the following fields to describe the InSAR product: 45 | 46 | | Field name | InSAR usage | 47 | | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | 48 | | [date_time](https://github.com/radiantearth/stac-spec/blob/master/item-spec/common-metadata.md#date-and-time) | Center Time of the product, in UTC. (Here the date is not significant) | 49 | | [sar:instrument_mode](https://github.com/stac-extensions/sar/#item-properties-or-asset-fields) | REQUIRED. The name of the sensor acquisition mode that is used | 50 | | [sar:polarizations](https://github.com/stac-extensions/sar/#sarpolarizations) | Any combination of polarizations of the input products. | 51 | | [sar:looks_range](https://github.com/stac-extensions/sar/#item-properties-or-asset-fields) | Number of range looks, which is the number of groups of signal samples (looks) perpendicular to the flight path | 52 | | [sar:looks_azimuth](https://github.com/stac-extensions/sar/#item-properties-or-asset-fields) | Number of azimuth looks, which is the number of groups of signal samples (looks) parallel to the flight path. | 53 | | [sar:observation_direction](https://github.com/stac-extensions/sar/#item-properties-or-asset-fields) | Antenna pointing direction relative to the flight trajectory of the satellite, either left or right. | 54 | | [sar:pixel_spacing_range](https://github.com/stac-extensions/sar/#item-properties-or-asset-fields) | The range pixel spacing, which is the distance between adjacent pixels perpendicular to the flight path, in meters (m). | 55 | | [sar:pixel_spacing_azimuth](https://github.com/stac-extensions/sar/#item-properties-or-asset-fields) | The azimuth pixel spacing, which is the distance between adjacent pixels parallel to the flight path, in meters (m) | 56 | | [sar:resolution_range](https://github.com/stac-extensions/sar/#item-properties-or-asset-fields) | The range resolution, which is the maximum ability to distinguish two adjacent targets perpendicular to the flight path, in meters (m). | 57 | | [sar:resolution_azimuth](https://github.com/stac-extensions/sar/#item-properties-or-asset-fields) | The azimuth resolution, which is the maximum ability to distinguish two adjacent targets parallel to the flight path, in meters (m). | 58 | | [processing:level](https://github.com/stac-extensions/processing#suggested-processing-levels) | `L3` level is recommended since InSAR is a composite product. | 59 | | [processing:lineage](https://github.com/stac-extensions/processing#item-properties-and-collection-provider-fields) | Describe InSAR specific technique. For instance, `Geocoded Unwrapped Interferogram TOPSAR` | 60 | | [processing:software](https://github.com/stac-extensions/processing#item-properties-and-collection-provider-fields) | Software used for InSAR processing. For instance `{"ESA SNAP Toolbox": "8.0"}, {"SNAPHU": "1.4.2"}` | 61 | | [proj:epsg](https://github.com/stac-extensions/projection#projepsg) | EPSG code of the projection of the product | 62 | | [sat:orbit_state](https://github.com/stac-extensions/sat#satorbit_state) | `ascending` or `descending` | 63 | | [sat:relative_orbit](https://github.com/stac-extensions/sat#satrelative_orbit) | relative orbit (track) of the input datasets | 64 | | [sci:publications](https://github.com/stac-extensions/scientific#item-properties-and-collection-fields) | DOI of publications citing the data | 65 | | [view:azimuth](https://github.com/stac-extensions/view#item-properties) | The azimuth angle of the center of the product. | 66 | | [view:incidence_angle](https://github.com/stac-extensions/view#item-properties) | The incidence angle of the center of the product. | 67 | 68 | ### Assets roles 69 | 70 | One of the emerging best practices is to use [Asset Roles](https://github.com/radiantearth/stac-spec/tree/master/item-spec/item-spec.md#asset-roles) 71 | to provide clients with more information about the assets in an item. The following list includes a shared vocabulary for InSAR assets. 72 | This list should not be considered definitive, and implementors are welcome to use other asset roles. If consensus and tooling consolidates around 73 | these role names then they will be specified in the future as more standard than just 'best practices'. 74 | 75 | | Role Name | Description | 76 | | ---------------- | ------------------------------------------------------- | 77 | | coherence | 2D Coherence \[0-1\] from filtered interferogram | 78 | | phase | 2D Filtered wrapped interferogram geocoded in radians | 79 | | unwrapped_phase | 2D Filtered unwrapped interferogram geocoded in radians | 80 | | los_displacement | 2D Displacement in the satellite line of sight (LOS) | 81 | | amplitude | 2D Amplitude of interferogram in Watt | 82 | 83 | Combined with "standard" asset roles `data`, `overview`, `visual` and `metadata`, specific related assets can be included. 84 | 85 | ## Digital Elevation Models (DEMs) 86 | 87 | The DEM are named to commonly used datasets. The table below shows the common DEM dataset name based. 88 | This list should not be considered definitive, and implementors are welcome to use other DEM names. 89 | 90 | | DEM Name | Description | Spatial Resolution | 91 | | -------------- | ------------------------------------------------------------------------------------------------------ | -------------------- | 92 | | SRTM1 | Shuttle Radar Topography Mission | 1 arcsecond (~30m) | 93 | | SRTM3 | Shuttle Radar Topography Mission | 3 arcseconds (~90m) | 94 | | SRTM30 | Shuttle Radar Topography Mission | 30 arcseconds (~1km) | 95 | | COP-DEM_EEA-10 | Copernicus DEM - European states (EEA39) including all islands of those countries plus French Overseas | 10m | 96 | | COP-DEM_GLO30 | Copernicus DEM - Global Coverage | 30m | 97 | | COP-DEM_GLO90 | Copernicus DEM - Global Coverage | 90m | 98 | | GTOPO30 | USGS Global Terrain Elevation Data (30m) | 30m | 99 | 100 | ## Relation types 101 | 102 | The following types should be used as applicable `rel` types in the 103 | [Link Object](https://github.com/radiantearth/stac-spec/tree/master/item-spec/item-spec.md#link-object). 104 | 105 | | Type | Description | 106 | | --------- | --------------------------------------------------------- | 107 | | reference | This link points to the reference input product STAC Item | 108 | | secondary | This link points to the secondary input product STAC Item | 109 | 110 | ### Links roles 111 | 112 | It is possible to use [Links Roles](https://github.com/radiantearth/stac-spec/tree/master/item-spec/item-spec.md#link-roles) 113 | to provide clients with more information about the linked item in an item or a collection. 114 | The following list includes a shared vocabulary for InSAR assets. 115 | This list should not be considered definitive, and implementors are welcome to use other asset roles. If consensus and tooling consolidates around 116 | these role names then they will be specified in the future as more standard than just 'best practices'. 117 | 118 | | Role Name | Description | 119 | | --------- | ------------------------------------------------------------------------- | 120 | | event | Item is related to an event (e.g. earthquake, volcano eruption) | 121 | | coseismic | Item is related to a coseismic event or data results (e.g. interferogram) | 122 | | post | Item is related to a post event or data results (e.g. interferogram) | 123 | | pre | Item is related to a pre event or data results (e.g. interferogram) | 124 | 125 | ## Contributing 126 | 127 | All contributions are subject to the 128 | [STAC Specification Code of Conduct](https://github.com/radiantearth/stac-spec/blob/master/CODE_OF_CONDUCT.md). 129 | For contributions, please follow the 130 | [STAC specification contributing guide](https://github.com/radiantearth/stac-spec/blob/master/CONTRIBUTING.md) Instructions 131 | for running tests are copied here for convenience. 132 | 133 | ### Running tests 134 | 135 | The same checks that run as checks on PR's are part of the repository and can be run locally to verify that changes are valid. 136 | To run tests locally, you'll need `npm`, which is a standard part of any [node.js installation](https://nodejs.org/en/download/). 137 | 138 | First you'll need to install everything with npm once. Just navigate to the root of this repository and on 139 | your command line run: 140 | ```bash 141 | npm install 142 | ``` 143 | 144 | Then to check markdown formatting and test the examples against the JSON schema, you can run: 145 | ```bash 146 | npm test 147 | ``` 148 | 149 | This will spit out the same texts that you see online, and you can then go and fix your markdown or examples. 150 | 151 | If the tests reveal formatting problems with the examples, you can fix them with: 152 | ```bash 153 | npm run format-examples 154 | ``` 155 | -------------------------------------------------------------------------------- /examples/item-epos.json: -------------------------------------------------------------------------------- 1 | { 2 | "stac_version": "1.0.0", 3 | "stac_extensions": [ 4 | "https://stac-extensions.github.io/insar/v1.0.0/schema.json", 5 | "https://stac-extensions.github.io/sar/v1.0.0/schema.json", 6 | "https://stac-extensions.github.io/sat/v1.0.0/schema.json", 7 | "https://stac-extensions.github.io/processing/v1.1.0/schema.json", 8 | "https://stac-extensions.github.io/view/v1.0.0/schema.json", 9 | "https://stac-extensions.github.io/projection/v1.1.0/schema.json", 10 | "https://stac-extensions.github.io/scientific/v1.0.0/schema.json" 11 | ], 12 | "type": "Feature", 13 | "id": "InU_CNRIREA_20200814_20200820_ECJT", 14 | "bbox": [ 15 | -30.046712956246324, 16 | 36.997096120903144, 17 | -26.79777995624633, 18 | 39.01881312090315 19 | ], 20 | "geometry": { 21 | "type": "Polygon", 22 | "coordinates": [ 23 | [ 24 | [ 25 | 123.0072, 26 | 10.454015 27 | ], 28 | [ 29 | 123.65187, 30 | 13.726985 31 | ], 32 | [ 33 | 125.87542, 34 | 13.300287 35 | ], 36 | [ 37 | 125.20314, 38 | 10.018878 39 | ], 40 | [ 41 | 123.0072, 42 | 10.454015 43 | ] 44 | ] 45 | ] 46 | }, 47 | "properties": { 48 | "created": "2020-08-31T07:24:01Z", 49 | "datetime": "2020-08-14T21:30:32Z", 50 | "start_datetime": "2020-08-14T21:30:39.872810Z", 51 | "end_datetime": "2020-08-20T21:30:17.536197Z", 52 | "processing:level": "L3", 53 | "processing:lineage": "Parallel SBAS Interferometry Chain", 54 | "processing:software": { 55 | "CNR-IREA P-SBAS": "28" 56 | }, 57 | "proj:epsg": 4326, 58 | "sat:orbit_state": "descending", 59 | "sat:relative_orbit": 82, 60 | "sar:product_type": "InU", 61 | "sar:instrument_mode": "IW", 62 | "sar:frequency_band": "C", 63 | "sar:polarizations": [ 64 | "VV" 65 | ], 66 | "sar:looks_range": 20, 67 | "sar:looks_azimuth": 5, 68 | "sar:observation_direction": "right", 69 | "sar:resolution_range": 73, 70 | "sar:resolution_azimuth": 73, 71 | "sci:publications": [ 72 | { 73 | "doi": "10.1109/TGRS.2002.803792", 74 | "citation": "A new algorithm for surface deformation monitoring based on small baseline differential SAR interferograms" 75 | }, 76 | { 77 | "doi": "10.1109/JSTARS.2014.2322671", 78 | "citation": "SBAS-DInSAR Parallel Processing for Deformation Time-Series Computation" 79 | } 80 | ], 81 | "view:azimuth": 11, 82 | "view:incidence_angle": 30, 83 | "insar:height_of_ambiguity": -1274.2194555953786, 84 | "insar:temporal_baseline": 12, 85 | "insar:perpendicular_baseline": 12.1935032939007, 86 | "insar:reference_datetime": "2022-03-15T07:57:41Z", 87 | "insar:secondary_datetime": "2022-03-27T07:58:06Z", 88 | "insar:processing_dem": "SRTM1", 89 | "insar:geocoding_dem": "SRTM1" 90 | }, 91 | "links": [ 92 | { 93 | "href": "https://raw.githubusercontent.com/stac-extensions/insar/main/examples/item-epos.json", 94 | "rel": "self" 95 | }, 96 | { 97 | "href": "https://gitlab.com/epos-tcs-satdata/productmetadata/-/blob/master/samples/UNWRAPPED_INTERFEROGRAM_InU_CNRIREA_20200814_20200820_ECJT.metadata", 98 | "rel": "derived_from" 99 | }, 100 | { 101 | "href": "https://example.com/sentinel1/S1A_IW_SLC__1SDV_20200814T213039_20200814T213109_033908_03EEE0_9B1B.json", 102 | "rel": "reference" 103 | }, 104 | { 105 | "href": "https://example.com/sentinel1/S1B_IW_SLC__1SSV_20200820T213017_20200820T213047_023012_02BB06_30BE.json", 106 | "rel": "secondary" 107 | } 108 | ], 109 | "assets": { 110 | "coh": { 111 | "href": "https://example.com/examples/Coh_CNRIREA_20200814_20200820_ECJT.tiff", 112 | "roles": [ 113 | "visual", 114 | "data", 115 | "coherence" 116 | ] 117 | }, 118 | "coh_th": { 119 | "href": "https://example.com/examples/Coh_CNRIREA_20200814_20200820_ECJT.png", 120 | "roles": [ 121 | "thumbnail", 122 | "coherence" 123 | ] 124 | }, 125 | "phase": { 126 | "href": "https://example.com/examples/InW_CNRIREA_20200814_20200820_ECJT.tiff", 127 | "roles": [ 128 | "data", 129 | "phase" 130 | ] 131 | }, 132 | "phase_th": { 133 | "href": "https://example.com/examples/InW_CNRIREA_20200814_20200820_ECJT.tiff", 134 | "roles": [ 135 | "thumbnail", 136 | "phase" 137 | ] 138 | }, 139 | "unw_pha": { 140 | "href": "https://example.com/examples/UNWRAPPED_INTERFEROGRAM_InU_CNRIREA_20200814_20200820_ECJT.tiff", 141 | "roles": [ 142 | "data", 143 | "unwrapped_phase" 144 | ] 145 | }, 146 | "unw_pha_th": { 147 | "href": "https://example.com/examples/UNWRAPPED_INTERFEROGRAM_InU_CNRIREA_20200814_20200820_ECJT.png", 148 | "roles": [ 149 | "thumbnail", 150 | "unwrapped_phase" 151 | ] 152 | } 153 | } 154 | } -------------------------------------------------------------------------------- /examples/item.json: -------------------------------------------------------------------------------- 1 | { 2 | "stac_version": "1.0.0", 3 | "stac_extensions": [ 4 | "https://stac-extensions.github.io/insar/v1.0.0/schema.json", 5 | "https://stac-extensions.github.io/sar/v1.0.0/schema.json", 6 | "https://stac-extensions.github.io/sat/v1.0.0/schema.json", 7 | "https://stac-extensions.github.io/view/v1.0.0/schema.json", 8 | "https://stac-extensions.github.io/processing/v1.1.0/schema.json" 9 | ], 10 | "type": "Feature", 11 | "id": "S1_GUNW_D_R_082_TOPS_20220315_20220327_075745_PP_4EDA3", 12 | "bbox": [ 13 | -30.046712956246324, 14 | 36.997096120903144, 15 | -26.79777995624633, 16 | 39.01881312090315 17 | ], 18 | "geometry": { 19 | "type": "Polygon", 20 | "coordinates": [ 21 | [ 22 | [ 23 | -30.046712956246324, 24 | 36.997096120903144 25 | ], 26 | [ 27 | -26.79777995624633, 28 | 36.997096120903144 29 | ], 30 | [ 31 | -26.79777995624633, 32 | 39.01881312090315 33 | ], 34 | [ 35 | -30.046712956246324, 36 | 39.01881312090315 37 | ], 38 | [ 39 | -30.046712956246324, 40 | 36.997096120903144 41 | ] 42 | ] 43 | ] 44 | }, 45 | "properties": { 46 | "datetime": "2022-03-21T07:57:45.000Z", 47 | "sar:polarizations": [ 48 | "VV" 49 | ], 50 | "sar:instrument_mode": "IW", 51 | "sar:frequency_band": "C", 52 | "sar:product_type": "GUNW", 53 | "processing:level": "L3", 54 | "processing:lineage": "Geocoded Unwrapped Interferogram TOPSAR", 55 | "processing:software": { 56 | "ESA SNAP Toolbox": "8.0", 57 | "SNAPHU": "1.4.2" 58 | }, 59 | "sat:orbit_state": "descending", 60 | "sat:relative_orbit": 82, 61 | "view:azimuth": 11, 62 | "view:incidence_angle": 30, 63 | "insar:height_of_ambiguity": -1274.2194555953786, 64 | "insar:temporal_baseline": 12, 65 | "insar:perpendicular_baseline": 12.1935032939007, 66 | "insar:reference_datetime": "2022-03-15T07:57:41Z", 67 | "insar:secondary_datetime": "2022-03-27T07:58:06Z" 68 | }, 69 | "links": [ 70 | { 71 | "href": "https://raw.githubusercontent.com/stac-extensions/insar/main/examples/item.json", 72 | "rel": "self" 73 | }, 74 | { 75 | "href": "https://example.com/sentinel1/S1A_IW_SLC__1SDV_20220315T075739_20220315T075806_042329_050BCA_1825.json", 76 | "rel": "reference" 77 | }, 78 | { 79 | "href": "https://example.com/sentinel1/S1A_IW_SLC__1SDV_20220327T075739_20220327T075806_042504_0511BC_4D8D.json", 80 | "rel": "secondary" 81 | } 82 | ], 83 | "assets": { 84 | "coherence": { 85 | "href": "https://example.com/examples/S1_GUNW_D_R_082_TOPS_20220315_20220327_075745_PP_4EDA3_COH.tiff", 86 | "roles": [ 87 | "coherence" 88 | ] 89 | }, 90 | "phase": { 91 | "href": "https://example.com/examples/S1_GUNW_D_R_082_TOPS_20220315_20220327_075745_PP_4EDA3_PHA.tiff", 92 | "roles": [ 93 | "phase" 94 | ] 95 | }, 96 | "unw_pha": { 97 | "href": "https://example.com/examples/S1_GUNW_D_R_082_TOPS_20220315_20220327_075745_PP_4EDA3_UNW.tiff", 98 | "roles": [ 99 | "unwrapped_phase" 100 | ] 101 | }, 102 | "amplitude": { 103 | "href": "https://example.com/examples/S1_GUNW_D_R_082_TOPS_20220315_20220327_075745_PP_4EDA3_AMP.tiff", 104 | "roles": [ 105 | "amplitude" 106 | ] 107 | } 108 | } 109 | } -------------------------------------------------------------------------------- /json-schema/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://stac-extensions.github.io/insar/v1.0.0/schema.json", 4 | "title": "Interferometry Extension", 5 | "description": "STAC Interferometry Extension to a STAC Item.", 6 | "oneOf": [ 7 | { 8 | "$comment": "This is the schema for STAC Items.", 9 | "allOf": [ 10 | { 11 | "type": "object", 12 | "required": [ 13 | "type", 14 | "properties", 15 | "assets" 16 | ], 17 | "properties": { 18 | "type": { 19 | "const": "Feature" 20 | }, 21 | "properties": { 22 | "allOf": [ 23 | { 24 | "anyOf": [ 25 | { 26 | "required": [ 27 | "insar:perpendicular_baseline" 28 | ] 29 | }, 30 | { 31 | "required": [ 32 | "insar:temporal_baseline" 33 | ] 34 | }, 35 | { 36 | "required": [ 37 | "insar:height_of_ambiguity" 38 | ] 39 | }, 40 | { 41 | "required": [ 42 | "insar:reference_datetime" 43 | ] 44 | }, 45 | { 46 | "required": [ 47 | "insar:secondary_datetime" 48 | ] 49 | }, 50 | { 51 | "required": [ 52 | "insar:processing_dem" 53 | ] 54 | }, 55 | { 56 | "required": [ 57 | "insar:geocoding_dem" 58 | ] 59 | } 60 | ] 61 | }, 62 | { 63 | "$ref": "#/definitions/fields" 64 | } 65 | ] 66 | }, 67 | "assets": { 68 | "type": "object", 69 | "additionalProperties": { 70 | "$ref": "#/definitions/fields" 71 | } 72 | } 73 | } 74 | }, 75 | { 76 | "$ref": "#/definitions/stac_extensions" 77 | } 78 | ] 79 | }, 80 | { 81 | "$comment": "This is the schema for STAC Collections.", 82 | "allOf": [ 83 | { 84 | "type": "object", 85 | "required": [ 86 | "type" 87 | ], 88 | "properties": { 89 | "type": { 90 | "const": "Collection" 91 | }, 92 | "assets": { 93 | "type": "object", 94 | "additionalProperties": { 95 | "$ref": "#/definitions/fields" 96 | } 97 | }, 98 | "item_assets": { 99 | "type": "object", 100 | "additionalProperties": { 101 | "$ref": "#/definitions/fields" 102 | } 103 | } 104 | } 105 | }, 106 | { 107 | "$ref": "#/definitions/stac_extensions" 108 | } 109 | ] 110 | } 111 | ], 112 | "definitions": { 113 | "stac_extensions": { 114 | "type": "object", 115 | "required": [ 116 | "stac_extensions" 117 | ], 118 | "properties": { 119 | "stac_extensions": { 120 | "type": "array", 121 | "contains": { 122 | "const": "https://stac-extensions.github.io/insar/v1.0.0/schema.json" 123 | } 124 | } 125 | } 126 | }, 127 | "fields": { 128 | "type": "object", 129 | "properties": { 130 | "insar:perpendicular_baseline": { 131 | "type": "number" 132 | }, 133 | "insar:temporal_baseline": { 134 | "type": "number" 135 | }, 136 | "insar:height_of_ambiguity": { 137 | "type": "number" 138 | } , 139 | "insar:reference_datetime": { 140 | "type": "string", 141 | "format": "date-time" 142 | }, 143 | "insar:secondary_datetime": { 144 | "type": "string", 145 | "format": "date-time" 146 | }, 147 | "insar:processing_dem": { 148 | "type": "string" 149 | }, 150 | "insar:geocoding_dem": { 151 | "type": "string" 152 | } 153 | }, 154 | "patternProperties": { 155 | "^(?!insar:)": { 156 | "$comment": "Do not allow unspecified fields prefixed with insar:" 157 | } 158 | }, 159 | "additionalProperties": false 160 | } 161 | } 162 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "stac-extensions", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "test": "npm run check-markdown && npm run check-examples", 6 | "check-markdown": "remark . -f -r .github/remark.yaml", 7 | "check-examples": "stac-node-validator . --lint --verbose --schemaMap https://stac-extensions.github.io/insar/v1.0.0/schema.json=./json-schema/schema.json", 8 | "format-examples": "stac-node-validator . --format --schemaMap https://stac-extensions.github.io/insar/v1.0.0/schema.json=./json-schema/schema.json" 9 | }, 10 | "dependencies": { 11 | "remark-cli": "^8.0.0", 12 | "remark-lint": "^7.0.0", 13 | "remark-lint-no-html": "^2.0.0", 14 | "remark-preset-lint-consistent": "^3.0.0", 15 | "remark-preset-lint-markdown-style-guide": "^3.0.0", 16 | "remark-preset-lint-recommended": "^4.0.0", 17 | "remark-validate-links": "^10.0.0", 18 | "stac-node-validator": "^1.0.0" 19 | } 20 | } 21 | --------------------------------------------------------------------------------