linz / topo-processor

:airplane: :camera: :earth_asia: :clipboard: Processing topographic data to create cloud optimised datasets with STAC metadata.
MIT License
11 stars 1 forks source link

Align LINZ's STAC Metadata extensions #56

Closed blacha closed 3 years ago

blacha commented 4 years ago

User Story

As a User I want to have standardised ways of using STAC metadata across LINZ's products

Acceptance Criteria

Add an Assignee, Milestone, Release and any relevant Labels.

blacha commented 4 years ago

@palmerj Said this as part of a pull request comment #55

I think we should try to use as many of the built in STAC fields as possible. e.g linz:date -> STAC item:created, Linz:camera -> STAC item:instruments. Also, rather than just packing everything into a "linz" extension, we could consider creating an Aerial Photography extension for certain field. Maybe some ideas could be taken from USGS https://lta.cr.usgs.gov/DD/nhap.html#frame. But some better searching might also be worth while.

blacha commented 4 years ago

I just found this, which looks to be a interesting way of mapping existing metadata to some stac extensions

https://github.com/stac-utils/stac-crosswalks

palmerj commented 4 years ago

Does look interesting. Pity ISO 19115 hasn't been done yet. But likely not too hard to do. For our LINZ metadata project that we are talking about in the S&I programme I think we really need to be considering how we are store our metadata and then map to other formats such as ISO 19115/19139

bencheng1990 commented 4 years ago

Datalake metadata extensions:

stac_extensions=["eo", "proj", "linz"]
    properties = {
        "created": d.isoformat("T") + "Z",
        "proj:epsg": int(layer.srs.GetAuthorityCode(None)),
        "eo:gsd": round(layer.resolution[0], 3),
        "eo:bands": [b.to_dict() for b in bands],
        "start_datetime": metadata["start_datetime"].isoformat("T", timespec="milliseconds") + "Z",
        "end_datetime": metadata["end_datetime"].isoformat("T", timespec="milliseconds") + "Z",
        "datetime": metadata["datetime"].isoformat("T", timespec="milliseconds") + "Z",
    }

from: https://github.com/linz/linz-data-lake/blob/master/data_lake/core/metadata/stac.py

bencheng1990 commented 4 years ago

Basemap metadata extensions:

        properties: {
            datetime: created,
            'checksum:multihash': await Hash.hash(outputTiffPath),
            'proj:epsg': tms.projection.code,
            'linz:gdal:version': await bm.gdalVersion,
        },
bencheng1990 commented 3 years ago

Mapping Database Fields to STAC Specification: https://confluence.linz.govt.nz/display/TOP/Mapping+Database+Fields+to+STAC+Specification

LINZ Common Practice for STAC: https://confluence.linz.govt.nz/display/TOP/LINZ+Common+Practice+for+STAC#LINZCommonPracticeforSTAC-summariesmap