├── .github └── workflows │ └── ci.yml ├── .pre-commit-config.yaml ├── 0.0.1 ├── Readme.md ├── example │ └── dg_post_idai.json └── schema.json ├── 0.0.2 ├── Readme.md ├── example │ └── dg_post_idai.json └── schema.json ├── 0.0.3 ├── Readme.md ├── example │ └── dg_post_idai.json └── schema.json ├── CHANGES.md ├── LICENSE └── Readme.md /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | # On every pull request, but only on push to main 4 | on: 5 | push: 6 | branches: 7 | - main 8 | tags: 9 | - '*' 10 | pull_request: 11 | 12 | jobs: 13 | tests: 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@v3 18 | - name: Set up Python 19 | uses: actions/setup-python@v4 20 | with: 21 | python-version: 3.11 22 | 23 | - name: Run pre-commit 24 | run: | 25 | python -m pip install pre-commit 26 | pre-commit run --all-files 27 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/python-jsonschema/check-jsonschema 3 | rev: 0.23.0 4 | hooks: 5 | - id: check-jsonschema 6 | files: schema.json$ 7 | args: ["--check-metaschema"] 8 | -------------------------------------------------------------------------------- /0.0.1/Readme.md: -------------------------------------------------------------------------------- 1 | # MosaicJSON 0.0.1 2 | 3 | ## 1. Purpose 4 | 5 | This specification attempts to create a standard for representing 6 | metadata about a mosaic of Cloud-Optimized GeoTIFF (COG) files. 7 | 8 | ## 2. File format 9 | 10 | MosaicJSON is intentionally based on the TileJSON specification and uses 11 | the JSON format. 12 | 13 | Implementations MUST treat unknown keys as if they weren't present. 14 | However, implementations MUST expose unknown key/values in their API 15 | so that API users can optionally handle these keys. Implementations MUST 16 | treat invalid values for keys as if they weren't present. If the key is 17 | required and not valid or present, implementations MUST treat the entire 18 | MosaicJSON manifest file as invalid and refuse the operation. 19 | 20 | 21 | ```javascript 22 | { 23 | // REQUIRED. A semver.org style version number. Describes the version of 24 | // the MosaicJSON spec that is implemented by this JSON object. 25 | "mosaicjson": "0.0.1", 26 | 27 | // OPTIONAL. Default: null. A name describing the tileset. The name can 28 | // contain any legal character. Implementations SHOULD NOT interpret the 29 | // name as HTML. 30 | "name": "compositing", 31 | 32 | // OPTIONAL. Default: null. A text description of the tileset. The 33 | // description can contain any legal character. Implementations SHOULD NOT 34 | // interpret the description as HTML. 35 | "description": "A simple, light grey world.", 36 | 37 | // OPTIONAL. Default: "1.0.0". A semver.org style version number. When 38 | // changes across files are introduced, the minor version MUST change. 39 | // This may lead to cut off labels. Therefore, implementors can decide to 40 | // clean their cache when the minor version changes. Changes to the patch 41 | // level MUST only have changes to tiles that are contained within one tile. 42 | // When tiles change significantly, the major version MUST be increased. 43 | // Implementations MUST NOT use tiles with different major versions. 44 | "version": "1.0.0", 45 | 46 | // OPTIONAL. Default: null. Contains an attribution to be displayed 47 | // when the map is shown to a user. Implementations MAY decide to treat this 48 | // as HTML or literal text. For security reasons, make absolutely sure that 49 | // this field can't be abused as a vector for XSS or beacon tracking. 50 | "attribution": "OSM contributors", 51 | 52 | // REQUIRED. 53 | // An integer specifying the minimum zoom level. 54 | "minzoom": 0, 55 | 56 | // REQUIRED. 57 | // An integer specifying the maximum zoom level. MUST be >= minzoom. 58 | "maxzoom": 11, 59 | 60 | // OPTIONAL. Default: [-180, -90, 180, 90]. 61 | // The maximum extent of available map tiles. Bounds MUST define an area 62 | // covered by all zoom levels. The bounds are represented in WGS:84 63 | // latitude and longitude values, in the order left, bottom, right, top. 64 | // Values may be integers or floating point numbers. 65 | "bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ], 66 | 67 | // OPTIONAL. Default: null. 68 | // The first value is the longitude, the second is latitude (both in 69 | // WGS:84 values), the third value is the zoom level as an integer. 70 | // Longitude and latitude MUST be within the specified bounds. 71 | // The zoom level MUST be between minzoom and maxzoom. 72 | // Implementations can use this value to set the default location. If the 73 | // value is null, implementations may use their own algorithm for 74 | // determining a default location. 75 | "center": [ -76.275329586789, 39.153492567373, 8 ] 76 | 77 | // REQUIRED. A dictionary of per quadkey dataset in form of {quadkeys: [datasets]} pairs. 78 | // Keys MUST be valid quadkeys index with zoom level equal to mosaic `minzoom`. 79 | // Values MUST be arrays of strings (url or sceneid) pointing to a 80 | // Cloud Optimized dataset with bounds intersecting with the quadkey bounds. 81 | "tiles": { 82 | "030130": [ 83 | "s3://my-bucket/dir/file1.tif", 84 | "s3://my-bucket/dir/file2.tif", 85 | ] 86 | } 87 | } 88 | ``` 89 | -------------------------------------------------------------------------------- /0.0.1/example/dg_post_idai.json: -------------------------------------------------------------------------------- 1 | { 2 | "mosaicjson": "0.0.1", 3 | "name": "dg_post_idai", 4 | "description": "Digitalglobe post Idai cyclone data.", 5 | "version": "0.0.1", 6 | "attribution": "(c) Digitalglobe", 7 | "minzoom": 10, 8 | "maxzoom": 18, 9 | "bounds": [ 34.8046875, -20.3034175184893, 35.5078125, -19.31114335506464 ], 10 | "center": [ 35.15625, -19.80728043677697, 10 ], 11 | "tiles": { 12 | "3001322011": [ 13 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201110.tif", 14 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201111.tif", 15 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201112.tif", 16 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201113.tif", 17 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210000.tif", 18 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210002.tif" 19 | ], 20 | "3001322100": [ 21 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201113.tif", 22 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210000.tif", 23 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210001.tif", 24 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210002.tif", 25 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210003.tif" 26 | ], 27 | "3001322013": [ 28 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023310.tif", 29 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023311.tif", 30 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023312.tif", 31 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023313.tif", 32 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023330.tif", 33 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023331.tif", 34 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023332.tif", 35 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023333.tif", 36 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032200.tif", 37 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032202.tif", 38 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032220.tif", 39 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032222.tif", 40 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201110.tif", 41 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201111.tif", 42 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210000.tif" 43 | ], 44 | "3001322102": [ 45 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023311.tif", 46 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023313.tif", 47 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023331.tif", 48 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023333.tif", 49 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032200.tif", 50 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032201.tif", 51 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032202.tif", 52 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032203.tif", 53 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032220.tif", 54 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032221.tif", 55 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032222.tif", 56 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032223.tif", 57 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210000.tif", 58 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210001.tif" 59 | ], 60 | "3001322031": [ 61 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023310.tif", 62 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023311.tif", 63 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032200.tif" 64 | ], 65 | "3001322120": [ 66 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023311.tif", 67 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032200.tif", 68 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032201.tif" 69 | ] 70 | } 71 | } -------------------------------------------------------------------------------- /0.0.1/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MosaicJSON", 3 | "type": "object", 4 | "properties": { 5 | "mosaicjson": { 6 | "type": "string", 7 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 8 | }, 9 | "name": { 10 | "type": "string" 11 | }, 12 | "description": { 13 | "type": "string" 14 | }, 15 | "version": { 16 | "type": "string", 17 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 18 | }, 19 | "attribution": { 20 | "type": "string" 21 | }, 22 | "minzoom": { 23 | "minimum": 0, 24 | "maximum": 30, 25 | "type": "integer" 26 | }, 27 | "maxzoom": { 28 | "minimum": 0, 29 | "maximum": 30, 30 | "type": "integer" 31 | }, 32 | "bounds": { 33 | "type": "array", 34 | "items": { 35 | "type": "number" 36 | } 37 | }, 38 | "center": { 39 | "type": "array", 40 | "items": { 41 | "type": "number" 42 | } 43 | }, 44 | "tiles": { 45 | "type": "object", 46 | "patternProperties": { 47 | "[0-9]+": { 48 | "type": "array", 49 | "items": { 50 | "type": "string" 51 | } 52 | } 53 | } 54 | } 55 | }, 56 | "required": ["mosaicjson", "tiles", "minzoom", "maxzoom"] 57 | } -------------------------------------------------------------------------------- /0.0.2/Readme.md: -------------------------------------------------------------------------------- 1 | # MosaicJSON 0.0.2 2 | 3 | ## 1. Purpose 4 | 5 | This specification attempts to create a standard for representing 6 | metadata about a mosaic of Cloud-Optimized GeoTIFF (COG) files. 7 | 8 | ## 2. File format 9 | 10 | MosaicJSON is intentionally based on the TileJSON specification and uses 11 | the JSON format. 12 | 13 | Implementations MUST treat unknown keys as if they weren't present. 14 | However, implementations MUST expose unknown key/values in their API 15 | so that API users can optionally handle these keys. Implementations MUST 16 | treat invalid values for keys as if they weren't present. If the key is 17 | required and not valid or present, implementations MUST treat the entire 18 | MosaicJSON manifest file as invalid and refuse operation. 19 | 20 | 21 | ```javascript 22 | { 23 | // REQUIRED. A semver.org style version number. Describes the version of 24 | // the MosaicJSON spec that is implemented by this JSON object. 25 | "mosaicjson": "0.0.2", 26 | 27 | // OPTIONAL. Default: null. A name describing the tileset. The name can 28 | // contain any legal character. Implementations SHOULD NOT interpret the 29 | // name as HTML. 30 | "name": "compositing", 31 | 32 | // OPTIONAL. Default: null. A text description of the tileset. The 33 | // description can contain any legal character. Implementations SHOULD NOT 34 | // interpret the description as HTML. 35 | "description": "A simple, light grey world.", 36 | 37 | // OPTIONAL. Default: "1.0.0". A semver.org style version number. When 38 | // changes across files are introduced, the minor version MUST change. 39 | // This may lead to cut off labels. Therefore, implementors can decide to 40 | // clean their cache when the minor version changes. Changes to the patch 41 | // level MUST only have changes to tiles that are contained within one tile. 42 | // When tiles change significantly, the major version MUST be increased. 43 | // Implementations MUST NOT use tiles with different major versions. 44 | "version": "1.0.0", 45 | 46 | // OPTIONAL. Default: null. Contains an attribution to be displayed 47 | // when the map is shown to a user. Implementations MAY decide to treat this 48 | // as HTML or literal text. For security reasons, make absolutely sure that 49 | // this field can't be abused as a vector for XSS or beacon tracking. 50 | "attribution": "OSM contributors", 51 | 52 | // REQUIRED. 53 | // An integer specifying the minimum zoom level. 54 | "minzoom": 0, 55 | 56 | // REQUIRED. 57 | // An integer specifying the maximum zoom level. MUST be >= minzoom. 58 | "maxzoom": 11, 59 | 60 | // OPTIONAL. 61 | // The zoom value for the quadkey index. MUST be =< maxzoom. 62 | // If quadkey_zoom is > minzoom, then on each tile request from zoom between 63 | // minzoom and quadkey_zoom, the tiler will merge each quadkey asset lists. 64 | // The use of quadkey_zoom can be beneficial when dealing with a high number 65 | // of files and a large area. 66 | "quadkey_zoom": 0, 67 | 68 | // REQUIRED. Default: [-180, -90, 180, 90]. 69 | // The maximum extent of available map tiles. Bounds MUST define an area 70 | // covered by all zoom levels. The bounds are represented in WGS:84 71 | // latitude and longitude values, in the order left, bottom, right, top. 72 | // Values may be integers or floating point numbers. 73 | "bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ], 74 | 75 | // OPTIONAL. Default: null. 76 | // The first value is the longitude, the second is latitude (both in 77 | // WGS:84 values), the third value is the zoom level as an integer. 78 | // Longitude and latitude MUST be within the specified bounds. 79 | // The zoom level MUST be between minzoom and maxzoom. 80 | // Implementations can use this value to set the default location. If the 81 | // value is null, implementations may use their own algorithm for 82 | // determining a default location. 83 | "center": [ -76.275329586789, 39.153492567373, 8 ], 84 | 85 | // REQUIRED. A dictionary of per quadkey dataset in form of {quadkeys: [datasets]} pairs. 86 | // Keys MUST be valid quadkeys index with zoom level equal to mosaic `minzoom` (or `quadkey_zoom` if present). 87 | // Values MUST be arrays of strings (url or sceneid) pointing to a 88 | // Cloud Optimized dataset with bounds intersecting with the quadkey bounds. 89 | "tiles": { 90 | "030130": [ 91 | "s3://my-bucket/dir/file1.tif", 92 | "s3://my-bucket/dir/file2.tif", 93 | ] 94 | } 95 | } 96 | ``` 97 | -------------------------------------------------------------------------------- /0.0.2/example/dg_post_idai.json: -------------------------------------------------------------------------------- 1 | { 2 | "mosaicjson": "0.0.2", 3 | "name": "dg_post_idai", 4 | "description": "Digitalglobe post Idai cyclone data.", 5 | "version": "0.0.1", 6 | "attribution": "(c) Digitalglobe", 7 | "minzoom": 12, 8 | "maxzoom": 18, 9 | "quadkey_zoom": 10, 10 | "bounds": [ 34.8046875, -20.3034175184893, 35.5078125, -19.31114335506464 ], 11 | "center": [ 35.15625, -19.80728043677697, 10 ], 12 | "tiles": { 13 | "3001322011": [ 14 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201110.tif", 15 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201111.tif", 16 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201112.tif", 17 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201113.tif", 18 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210000.tif", 19 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210002.tif" 20 | ], 21 | "3001322100": [ 22 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201113.tif", 23 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210000.tif", 24 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210001.tif", 25 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210002.tif", 26 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210003.tif" 27 | ], 28 | "3001322013": [ 29 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023310.tif", 30 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023311.tif", 31 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023312.tif", 32 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023313.tif", 33 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023330.tif", 34 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023331.tif", 35 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023332.tif", 36 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023333.tif", 37 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032200.tif", 38 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032202.tif", 39 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032220.tif", 40 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032222.tif", 41 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201110.tif", 42 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0201111.tif", 43 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210000.tif" 44 | ], 45 | "3001322102": [ 46 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023311.tif", 47 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023313.tif", 48 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023331.tif", 49 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023333.tif", 50 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032200.tif", 51 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032201.tif", 52 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032202.tif", 53 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032203.tif", 54 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032220.tif", 55 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032221.tif", 56 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032222.tif", 57 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032223.tif", 58 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210000.tif", 59 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0210001.tif" 60 | ], 61 | "3001322031": [ 62 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023310.tif", 63 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023311.tif", 64 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032200.tif" 65 | ], 66 | "3001322120": [ 67 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0023311.tif", 68 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032200.tif", 69 | "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/0032201.tif" 70 | ] 71 | } 72 | } -------------------------------------------------------------------------------- /0.0.2/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MosaicJSON", 3 | "type": "object", 4 | "properties": { 5 | "mosaicjson": { 6 | "type": "string", 7 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 8 | }, 9 | "name": { 10 | "type": "string" 11 | }, 12 | "description": { 13 | "type": "string" 14 | }, 15 | "version": { 16 | "type": "string", 17 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 18 | }, 19 | "attribution": { 20 | "type": "string" 21 | }, 22 | "minzoom": { 23 | "minimum": 0, 24 | "maximum": 30, 25 | "type": "integer" 26 | }, 27 | "maxzoom": { 28 | "minimum": 0, 29 | "maximum": 30, 30 | "type": "integer" 31 | }, 32 | "quadkey_zoom": { 33 | "minimum": 0, 34 | "maximum": 30, 35 | "type": "integer" 36 | }, 37 | "bounds": { 38 | "type": "array", 39 | "items": { 40 | "type": "number" 41 | } 42 | }, 43 | "center": { 44 | "type": "array", 45 | "items": { 46 | "type": "number" 47 | } 48 | }, 49 | "tiles": { 50 | "type": "object", 51 | "patternProperties": { 52 | "[0-9]+": { 53 | "type": "array", 54 | "items": { 55 | "type": "string" 56 | } 57 | } 58 | } 59 | } 60 | }, 61 | "required": ["mosaicjson", "tiles", "minzoom", "maxzoom", "bounds"] 62 | } -------------------------------------------------------------------------------- /0.0.3/Readme.md: -------------------------------------------------------------------------------- 1 | # MosaicJSON 0.0.3 2 | 3 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://tools.ietf.org/html/rfc2119). 4 | 5 | # 1. Purpose 6 | 7 | This specification attempts to create a standard for representing 8 | metadata about a mosaic of Cloud-Optimized GeoTIFF (COG) files. 9 | 10 | # 2. File format 11 | 12 | MosaicJSON is intentionally based on the TileJSON specification and uses 13 | the JSON format. 14 | 15 | # 3. Structure 16 | 17 | The following describes the structure of a MosaicJSON object. Implementations MUST treat unknown keys as if they weren't present. However, implementations MUST expose unknown key value pairs so users can optionally handle these keys. Implementations MUST treat invalid values for keys as if they weren’t present. If the key is optional and the value is invalid, the default value MAY be applied. If the key is required, implementations MUST treat the entire MosaicJSON manifest file as invalid and refuse operation. 18 | 19 | The word "implementation" in the following sections refers to services or tools that serve, generate, or validate MosaicJSON objects. 20 | 21 | Ref: https://github.com/mapbox/tilejson-spec/blob/master/3.0.0/README.md#3-structure 22 | 23 | 24 | ## 3.1 `mosaicjson` 25 | 26 | REQUIRED. String. 27 | 28 | A semver.org style version number. Describes the version of the MosaicJSON spec that is implemented by this JSON object. 29 | 30 | ```JSON 31 | { 32 | "mosaicjson": "0.0.3" 33 | } 34 | ``` 35 | 36 | ## 3.2 `name` 37 | 38 | OPTIONAL. String. Default: null. 39 | 40 | A name describing the mosaic. The name can contain any legal character. Implementations SHOULD NOT interpret the name as HTML 41 | 42 | ```JSON 43 | { 44 | "name": "compositing" 45 | } 46 | ``` 47 | 48 | ## 3.3 `description` 49 | 50 | OPTIONAL. String. Default: null. 51 | 52 | A text description of the mosaic. The description can contain any legal character. Implementations SHOULD NOT interpret the description as HTML. 53 | 54 | ```JSON 55 | { 56 | "description": "A simple, light grey world." 57 | } 58 | ``` 59 | 60 | ## 3.4 `version` 61 | 62 | OPTIONAL. String. Default: "1.0.0". 63 | 64 | A [semver.org](https://semver.org/) style version number of the tiles. When changes across tiles are introduced the minor version MUST change. This may lead to cut off labels. Therefore, implementors can decide to clean their cache when the minor version changes. Changes to the patch level MUST only have changes to tiles that are contained within one tile. When tiles change significantly, such as updating a vector tile layer name, the major version MUST be increased. Implementations MUST NOT use tiles with different major versions. 65 | 66 | ```JSON 67 | { 68 | "version": "1.0.0" 69 | } 70 | ``` 71 | 72 | ## 3.5 `attribution` 73 | 74 | OPTIONAL. String. Default: null. 75 | 76 | Contains an attribution to be displayed when the map is shown to a user. Implementations MAY decide to treat this as HTML or literal text. For security reasons, make absolutely sure that this content can't be abused as a vector for XSS or beacon tracking. 77 | 78 | ```JSON 79 | { 80 | "attribution": "OSM contributors" 81 | } 82 | ``` 83 | 84 | ## 3.6 `minzoom` 85 | 86 | REQUIRED. Integer. 87 | 88 | An integer specifying the minimum zoom level. 89 | 90 | ```JSON 91 | { 92 | "minzoom": 0 93 | } 94 | ``` 95 | 96 | ## 3.7 `maxzoom` 97 | 98 | REQUIRED. Integer. 99 | 100 | An integer specifying the maximum zoom level. MUST be >= `minzoom`. 101 | 102 | ```JSON 103 | { 104 | "maxzoom": 11 105 | } 106 | ``` 107 | 108 | ## 3.8 `quadkey_zoom` 109 | 110 | OPTIONAL. Integer. MUST be =< maxzoom 111 | 112 | The zoom value for the quadkey index. If `quadkey_zoom` is > `minzoom`, then on each tile request from zoom between `minzoom` and `quadkey_zoom`, the tiler will merge each quadkey asset lists. 113 | 114 | The use of `quadkey_zoom` can be beneficial when dealing with a high number of files and a large area. 115 | 116 | ```JSON 117 | { 118 | "quadkey_zoom": 0 119 | } 120 | ``` 121 | 122 | ## 3.9 `bounds` 123 | 124 | OPTIONAL. Array. Default: [-180, -90, 180, 90]. 125 | 126 | The maximum extent of the mosaic. Bounds MUST define an area covered by all zoom levels. The bounds are represented in WGS 84 latitude and longitude values, in the order left, bottom, right, top. Values may be integers or floating point numbers. 127 | 128 | ```JSON 129 | { 130 | "bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ] 131 | } 132 | ``` 133 | 134 | ## 3.10 `center` 135 | 136 | OPTIONAL. Array. Default: null. 137 | 138 | The first value is the longitude, the second is latitude (both in WGS 84 values), the third value is the zoom level as an integer. Longitude and latitude MUST be within the specified bounds. The zoom level MUST be between minzoom and maxzoom. Implementations MAY use this center value to set the default location. If the value is null, implementations MAY use their own algorithm for determining a default location. 139 | 140 | ```JSON 141 | { 142 | "bounds": [ -76.275329586789, 39.153492567373, 8 ] 143 | } 144 | ``` 145 | 146 | ## 3.11 `tiles` 147 | 148 | REQUIRED. Object. 149 | 150 | A dictionary of per quadkey assets in form of `{quadkeys: [asset]}` pairs. Keys MUST be valid quadkeys index with zoom level equal to mosaic `minzoom` (or `quadkey_zoom` if present). 151 | 152 | Values MUST be arrays of strings (url or sceneid) pointing to an asset with bounds intersecting with the quadkey bounds. 153 | 154 | ```JSON 155 | { 156 | "tiles": { 157 | "030130": [ 158 | "file1.tif", 159 | "file2.tif", 160 | ] 161 | } 162 | } 163 | ``` 164 | 165 | ## 3.12 `asset_type` 166 | 167 | OPTIONAL. String. 168 | 169 | A string describing the type of the asset found in `tiles`. 170 | 171 | ```JSON 172 | { 173 | "asset_type": "COG" 174 | } 175 | ``` 176 | 177 | ## 3.13 `asset_prefix` 178 | 179 | OPTIONAL. String. 180 | 181 | A string describing the prefix to add to the `asset` string. 182 | 183 | ```JSON 184 | { 185 | "asset_prefix": "http://hostname.io/cog/" 186 | } 187 | ``` 188 | 189 | ## 3.14 `data_type` 190 | 191 | OPTIONAL. String. 192 | 193 | Asset's datatype info. 194 | 195 | One of: 196 | - `int8`: 8-bit integer 197 | - `int16`: 16-bit integer 198 | - `int32`: 32-bit integer 199 | - `int64`: 64-bit integer 200 | - `uint8`: unsigned 8-bit integer (common for 8-bit RGB PNG's) 201 | - `uint16`: unsigned 16-bit integer 202 | - `uint32`: unsigned 32-bit integer 203 | - `uint64`: unsigned 64-bit integer 204 | - `float16`: 16-bit float 205 | - `float32`: 32-bit float 206 | - `float64`: 64-big float 207 | - `cint16`: 16-bit complex integer 208 | - `cint32`: 32-bit complex integer 209 | - `cfloat32`: 32-bit complex float 210 | - `cfloat64`: 64-bit complex float 211 | - `other`: Other data type than the ones listed above (e.g. boolean, string, higher precision numbers) 212 | 213 | ```JSON 214 | { 215 | "data_type": "uint8" 216 | } 217 | ``` 218 | 219 | ## 3.15 `colormap` 220 | 221 | OPTIONAL. Object. 222 | 223 | GDAL like colormap in form of `{key: [r, g, b, a], ...}`. 224 | 225 | ```JSON 226 | { 227 | "colormap": { 228 | 0: [0, 0, 0, 0], 229 | ..., 230 | 255: [1, 1, 1, 255] 231 | } 232 | } 233 | ``` 234 | 235 | ## 3.16 `tilematrixset` 236 | 237 | OPTIONAL. Object. 238 | 239 | TileMatrixSet used for the `quadkey` definition. The TMS document should be compliant with the OGC TMS 2.0 specification (https://raw.githubusercontent.com/opengeospatial/2D-Tile-Matrix-Set/master/schemas/tms/2.0/json/tileMatrixSet.json) 240 | 241 | ```JSON 242 | { 243 | "tilematrixset": { 244 | "title": "LINZ NZTM2000Quad Map Tile Grid", 245 | "abstract": "See https://github.com/linz/NZTM2000TileMatrixSet", 246 | "id": "NZTM2000Quad", 247 | "crs": "urn:ogc:def:crs:EPSG::2193", 248 | "orderedAxes": [ 249 | "Y", 250 | "X" 251 | ], 252 | "tileMatrices": [ 253 | { 254 | "id": "0", 255 | "scaleDenominator": 139770566.007179, 256 | "pointOfOrigin": [ 257 | 10438190.1652, 258 | -3260586.7284 259 | ], 260 | "tileWidth": 256, 261 | "tileHeight": 256, 262 | "matrixWidth": 1, 263 | "matrixHeight": 1, 264 | "cellSize": 39135.75848201011 265 | }, 266 | ... 267 | { 268 | "id": "21", 269 | "scaleDenominator": 66.64779949530553, 270 | "pointOfOrigin": [ 271 | 10438190.1652, 272 | -3260586.7284 273 | ], 274 | "tileWidth": 256, 275 | "tileHeight": 256, 276 | "matrixWidth": 2097152, 277 | "matrixHeight": 2097152, 278 | "cellSize": 0.018661383858685546 279 | } 280 | ] 281 | } 282 | } 283 | ``` 284 | 285 | ## 3.17 `layers` 286 | 287 | OPTIONAL. Object. 288 | 289 | A set of `layer` configurations. Implementations MAY use the entries to define a set of available `layers` and use the configuration to create tiles. 290 | 291 | ```JSON 292 | { 293 | "layers": { 294 | "true_color": { 295 | "bidx": ["b1", "b2", "b3"], 296 | "color_formula": "Gamma RGB 3.5 Saturation 1.7 Sigmoidal RGB 15 0.35", 297 | }, 298 | "ndvi": { 299 | "expression": "(b4-b1)/(b4+b1)", 300 | "rescale": "-1,1", 301 | "colormap_name": "viridis" 302 | } 303 | } 304 | } 305 | ``` 306 | -------------------------------------------------------------------------------- /0.0.3/example/dg_post_idai.json: -------------------------------------------------------------------------------- 1 | { 2 | "mosaicjson": "0.0.2", 3 | "name": "dg_post_idai", 4 | "description": "Digitalglobe post Idai cyclone data.", 5 | "version": "0.0.1", 6 | "attribution": "(c) Digitalglobe", 7 | "minzoom": 12, 8 | "maxzoom": 18, 9 | "quadkey_zoom": 10, 10 | "bounds": [ 34.8046875, -20.3034175184893, 35.5078125, -19.31114335506464 ], 11 | "center": [ 35.15625, -19.80728043677697, 10 ], 12 | "tiles": { 13 | "3001322011": [ 14 | "0201110.tif", 15 | "0201111.tif", 16 | "0201112.tif", 17 | "0201113.tif", 18 | "0210000.tif", 19 | "0210002.tif" 20 | ], 21 | "3001322100": [ 22 | "0201113.tif", 23 | "0210000.tif", 24 | "0210001.tif", 25 | "0210002.tif", 26 | "0210003.tif" 27 | ], 28 | "3001322013": [ 29 | "0023310.tif", 30 | "0023311.tif", 31 | "0023312.tif", 32 | "0023313.tif", 33 | "0023330.tif", 34 | "0023331.tif", 35 | "0023332.tif", 36 | "0023333.tif", 37 | "0032200.tif", 38 | "0032202.tif", 39 | "0032220.tif", 40 | "0032222.tif", 41 | "0201110.tif", 42 | "0201111.tif", 43 | "0210000.tif" 44 | ], 45 | "3001322102": [ 46 | "0023311.tif", 47 | "0023313.tif", 48 | "0023331.tif", 49 | "0023333.tif", 50 | "0032200.tif", 51 | "0032201.tif", 52 | "0032202.tif", 53 | "0032203.tif", 54 | "0032220.tif", 55 | "0032221.tif", 56 | "0032222.tif", 57 | "0032223.tif", 58 | "0210000.tif", 59 | "0210001.tif" 60 | ], 61 | "3001322031": [ 62 | "0023310.tif", 63 | "0023311.tif", 64 | "0032200.tif" 65 | ], 66 | "3001322120": [ 67 | "0023311.tif", 68 | "0032200.tif", 69 | "0032201.tif" 70 | ] 71 | }, 72 | "asset_prefix": "s3://opendata.remotepixel.ca/dg_post_idai/2019_03_20/", 73 | "tilematrixset": { 74 | "id": "WebMercatorQuad", 75 | "title": "Google Maps Compatible for the World", 76 | "uri": "http://www.opengis.net/def/tilematrixset/OGC/1.0/WebMercatorQuad", 77 | "crs": "http://www.opengis.net/def/crs/EPSG/0/3857", 78 | "orderedAxes": ["X", "Y"], 79 | "wellKnownScaleSet": "http://www.opengis.net/def/wkss/OGC/1.0/GoogleMapsCompatible", 80 | "tileMatrices": [ 81 | { 82 | "id": "0", 83 | "scaleDenominator": 559082264.028717, 84 | "cellSize": 156543.033928041, 85 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 86 | "tileWidth": 256, 87 | "tileHeight": 256, 88 | "matrixWidth": 1, 89 | "matrixHeight": 1 90 | }, 91 | { 92 | "id": "1", 93 | "scaleDenominator": 279541132.014358, 94 | "cellSize": 78271.5169640204, 95 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 96 | "tileWidth": 256, 97 | "tileHeight": 256, 98 | "matrixWidth": 2, 99 | "matrixHeight": 2 100 | }, 101 | { 102 | "id": "2", 103 | "scaleDenominator": 139770566.007179, 104 | "cellSize": 39135.7584820102, 105 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 106 | "tileWidth": 256, 107 | "tileHeight": 256, 108 | "matrixWidth": 4, 109 | "matrixHeight": 4 110 | }, 111 | { 112 | "id": "3", 113 | "scaleDenominator": 69885283.0035897, 114 | "cellSize": 19567.8792410051, 115 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 116 | "tileWidth": 256, 117 | "tileHeight": 256, 118 | "matrixWidth": 8, 119 | "matrixHeight": 8 120 | }, 121 | { 122 | "id": "4", 123 | "scaleDenominator": 34942641.5017948, 124 | "cellSize": 9783.93962050256, 125 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 126 | "tileWidth": 256, 127 | "tileHeight": 256, 128 | "matrixWidth": 16, 129 | "matrixHeight": 16 130 | }, 131 | { 132 | "id": "5", 133 | "scaleDenominator": 17471320.7508974, 134 | "cellSize": 4891.96981025128, 135 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 136 | "tileWidth": 256, 137 | "tileHeight": 256, 138 | "matrixWidth": 32, 139 | "matrixHeight": 32 140 | }, 141 | { 142 | "id": "6", 143 | "scaleDenominator": 8735660.37544871, 144 | "cellSize": 2445.98490512564, 145 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 146 | "tileWidth": 256, 147 | "tileHeight": 256, 148 | "matrixWidth": 64, 149 | "matrixHeight": 64 150 | }, 151 | { 152 | "id": "7", 153 | "scaleDenominator": 4367830.18772435, 154 | "cellSize": 1222.99245256282, 155 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 156 | "tileWidth": 256, 157 | "tileHeight": 256, 158 | "matrixWidth": 128, 159 | "matrixHeight": 128 160 | }, 161 | { 162 | "id": "8", 163 | "scaleDenominator": 2183915.09386217, 164 | "cellSize": 611.49622628141, 165 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 166 | "tileWidth": 256, 167 | "tileHeight": 256, 168 | "matrixWidth": 256, 169 | "matrixHeight": 256 170 | }, 171 | { 172 | "id": "9", 173 | "scaleDenominator": 1091957.54693108, 174 | "cellSize": 305.748113140704, 175 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 176 | "tileWidth": 256, 177 | "tileHeight": 256, 178 | "matrixWidth": 512, 179 | "matrixHeight": 512 180 | }, 181 | { 182 | "id": "10", 183 | "scaleDenominator": 545978.773465544, 184 | "cellSize": 152.874056570352, 185 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 186 | "tileWidth": 256, 187 | "tileHeight": 256, 188 | "matrixWidth": 1024, 189 | "matrixHeight": 1024 190 | }, 191 | { 192 | "id": "11", 193 | "scaleDenominator": 272989.386732772, 194 | "cellSize": 76.4370282851762, 195 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 196 | "tileWidth": 256, 197 | "tileHeight": 256, 198 | "matrixWidth": 2048, 199 | "matrixHeight": 2048 200 | }, 201 | { 202 | "id": "12", 203 | "scaleDenominator": 136494.693366386, 204 | "cellSize": 38.2185141425881, 205 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 206 | "tileWidth": 256, 207 | "tileHeight": 256, 208 | "matrixWidth": 4096, 209 | "matrixHeight": 4096 210 | }, 211 | { 212 | "id": "13", 213 | "scaleDenominator": 68247.346683193, 214 | "cellSize": 19.109257071294, 215 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 216 | "tileWidth": 256, 217 | "tileHeight": 256, 218 | "matrixWidth": 8192, 219 | "matrixHeight": 8192 220 | }, 221 | { 222 | "id": "14", 223 | "scaleDenominator": 34123.6733415964, 224 | "cellSize": 9.55462853564703, 225 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 226 | "tileWidth": 256, 227 | "tileHeight": 256, 228 | "matrixWidth": 16384, 229 | "matrixHeight": 16384 230 | }, 231 | { 232 | "id": "15", 233 | "scaleDenominator": 17061.8366707982, 234 | "cellSize": 4.77731426782351, 235 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 236 | "tileWidth": 256, 237 | "tileHeight": 256, 238 | "matrixWidth": 32768, 239 | "matrixHeight": 32768 240 | }, 241 | { 242 | "id": "16", 243 | "scaleDenominator": 8530.91833539913, 244 | "cellSize": 2.38865713391175, 245 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 246 | "tileWidth": 256, 247 | "tileHeight": 256, 248 | "matrixWidth": 65536, 249 | "matrixHeight": 65536 250 | }, 251 | { 252 | "id": "17", 253 | "scaleDenominator": 4265.45916769956, 254 | "cellSize": 1.19432856695587, 255 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 256 | "tileWidth": 256, 257 | "tileHeight": 256, 258 | "matrixWidth": 131072, 259 | "matrixHeight": 131072 260 | }, 261 | { 262 | "id": "18", 263 | "scaleDenominator": 2132.72958384978, 264 | "cellSize": 0.597164283477939, 265 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 266 | "tileWidth": 256, 267 | "tileHeight": 256, 268 | "matrixWidth": 262144, 269 | "matrixHeight": 262144 270 | }, 271 | { 272 | "id": "19", 273 | "scaleDenominator": 1066.36479192489, 274 | "cellSize": 0.29858214173897, 275 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 276 | "tileWidth": 256, 277 | "tileHeight": 256, 278 | "matrixWidth": 524288, 279 | "matrixHeight": 524288 280 | }, 281 | { 282 | "id": "20", 283 | "scaleDenominator": 533.182395962445, 284 | "cellSize": 0.149291070869485, 285 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 286 | "tileWidth": 256, 287 | "tileHeight": 256, 288 | "matrixWidth": 1048576, 289 | "matrixHeight": 1048576 290 | }, 291 | { 292 | "id": "21", 293 | "scaleDenominator": 266.591197981222, 294 | "cellSize": 0.0746455354347424, 295 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 296 | "tileWidth": 256, 297 | "tileHeight": 256, 298 | "matrixWidth": 2097152, 299 | "matrixHeight": 2097152 300 | }, 301 | { 302 | "id": "22", 303 | "scaleDenominator": 133.295598990611, 304 | "cellSize": 0.0373227677173712, 305 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 306 | "tileWidth": 256, 307 | "tileHeight": 256, 308 | "matrixWidth": 4194304, 309 | "matrixHeight": 4194304 310 | }, 311 | { 312 | "id": "23", 313 | "scaleDenominator": 66.6477994953056, 314 | "cellSize": 0.0186613838586856, 315 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 316 | "tileWidth": 256, 317 | "tileHeight": 256, 318 | "matrixWidth": 8388608, 319 | "matrixHeight": 8388608 320 | }, 321 | { 322 | "id": "24", 323 | "scaleDenominator": 33.3238997476528, 324 | "cellSize": 0.0093306919293428, 325 | "pointOfOrigin": [-20037508.342789244,20037508.342789244], 326 | "tileWidth": 256, 327 | "tileHeight": 256, 328 | "matrixWidth": 16777216, 329 | "matrixHeight": 16777216 330 | } 331 | ] 332 | } 333 | } 334 | -------------------------------------------------------------------------------- /0.0.3/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MosaicJSON", 3 | "type": "object", 4 | "properties": { 5 | "mosaicjson": { 6 | "type": "string", 7 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 8 | }, 9 | "name": { 10 | "type": "string" 11 | }, 12 | "description": { 13 | "type": "string" 14 | }, 15 | "version": { 16 | "type": "string", 17 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 18 | }, 19 | "attribution": { 20 | "type": "string" 21 | }, 22 | "minzoom": { 23 | "minimum": 0, 24 | "maximum": 30, 25 | "type": "integer" 26 | }, 27 | "maxzoom": { 28 | "minimum": 0, 29 | "maximum": 30, 30 | "type": "integer" 31 | }, 32 | "quadkey_zoom": { 33 | "minimum": 0, 34 | "maximum": 30, 35 | "type": "integer" 36 | }, 37 | "bounds": { 38 | "type": "array", 39 | "items": { 40 | "type": "number" 41 | } 42 | }, 43 | "center": { 44 | "type": "array", 45 | "items": { 46 | "type": "number" 47 | } 48 | }, 49 | "tiles": { 50 | "type": "object", 51 | "patternProperties": { 52 | "[0123]{1,30}": { 53 | "type": "array", 54 | "items": { 55 | "type": "string" 56 | } 57 | } 58 | } 59 | }, 60 | "asset_type": { 61 | "type": "string" 62 | }, 63 | "asset_prefix": { 64 | "type": "string" 65 | }, 66 | "data_type": { 67 | "type": "string", 68 | "enum": [ 69 | "int8", 70 | "int16", 71 | "int32", 72 | "int64", 73 | "uint8", 74 | "uint16", 75 | "uint32", 76 | "uint64", 77 | "float16", 78 | "float32", 79 | "float64", 80 | "cint16", 81 | "cint32", 82 | "cfloat32", 83 | "cfloat64", 84 | "other" 85 | ] 86 | }, 87 | "colormap": { 88 | "type": "object", 89 | "patternProperties": { 90 | "^[0-9]+$": { 91 | "type": "array", 92 | "items": {"type": "number"}, 93 | "minItems": 4, 94 | "maxItems": 4 95 | } 96 | } 97 | }, 98 | "tilematrixset": { 99 | "description": "Tile matrix set definition", 100 | "$ref": "https://raw.githubusercontent.com/opengeospatial/2D-Tile-Matrix-Set/master/schemas/tms/2.0/json/tileMatrixSet.json" 101 | }, 102 | "layers": { 103 | "description": "A set of `layer` configurations", 104 | "type": "object" 105 | } 106 | }, 107 | "required": ["mosaicjson", "tiles", "minzoom", "maxzoom", "bounds"] 108 | } 109 | -------------------------------------------------------------------------------- /CHANGES.md: -------------------------------------------------------------------------------- 1 | # 0.0.3 (2023-05-31) 2 | 3 | - add `asset_type` to describe the type of asset (e.g COG or STAC) 4 | - add `asset_prefix` to use to construct a full asset url 5 | - add `data_type` 6 | - add `colormap`, which can be useful if the assets have the same internal colormap 7 | - add `tilematrixset` to support more than the default WebMercatorQuad TMS 8 | - add `layers` to define a set of configurations which can be used to create tiles 9 | 10 | #### Misc 11 | - added pre-commit to validate the JSON schema 12 | 13 | # 0.0.2 (2019-11-20) 14 | 15 | - add `bounds` as a required key (#4) 16 | - add `quadkey_zoom` as an optional key (#2) 17 | 18 | # 0.0.1 (2019-03-26) 19 | 20 | - Initial release 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Development Seed 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
5 | MosaicJSON is an open standard for representing 6 | metadata about a mosaic of Assets (e.g Cloud Optimized GeoTIFF). 7 |
8 | 9 | --- 10 | 11 | **Blog Post**: https://medium.com/devseed/cog-talk-part-2-mosaics-bbbf474e66df 12 | 13 | **Source Code**: https://github.com/developmentseed/mosaicjson-spec 14 | 15 | --- 16 | 17 | ## Description 18 | 19 |  20 | 21 | MosaicJSON can be seen as a Virtual raster (see GDAL's [VRT](https://gdal.org/drivers/raster/vrt.html)) enabling spatial and temporal processing for a list of **Assets**. 22 | 23 | ## Features 24 | 25 | - simple **JSON** format (enabling high ratio compression) 26 | - **quadkey** based file index 27 | 28 | ## Implementations 29 | 30 |  31 | [cogeo-mosaic](https://github.com/developmentseed/cogeo-mosaic) 32 | 33 | ## API Example 34 |