I-GUIDE / data-catalog-archive

The IGUIDE data catalog
3 stars 3 forks source link

Create a SchemaOrg Geopackage Example #3

Closed Castronova closed 1 year ago

Castronova commented 2 years ago

Explore how SchemaOrg properties can be used to describe a simple Geopackage. The outcomes of this task will be:

  1. A document containing: a. A plaintext description of the recommended metadata for a Geopackage in text/table format b. A JSON+LD example implementation for a basic Geopackage

  2. A Jupyter notebook that demonstrates how the JSON+LD can be generated from a Geopackage stored in HydroShare

aaraney commented 2 years ago

I am assuming the metadata describes the contents of the geopackage and where the geopackage can be retrieved, however, this metadata will not include information about who created or maintains the geopackage. So, put more simply, I am assuming this metadata focuces on the what and where not the who.

With the above in mind, I recommend usage of a schema.org MediaObject to describe a geopackage. Below ive listed the fields that I think are most applicable.

property name description schema.org type number of fields
contentSize size of file in bytes Text 1
contentUrl URL of geopackage URL 0,1
endcodingFormat IANA mime type; application/geopackage+sqlite3; see Text 1
sha256 hash of geopackage content Text 0,1
uploadData date content was uploaded Date 0, 1
contentLocation place name(s) of geopackage features (e.g. Memphis, Tn) Place 0+
isPartOf likely the dataset this is a part of CreativeWork or URL 0+
spatialCoverage spatial information of content (i.e. bounding box) Place 0, 1
temporalCoverage time period content applies to DateTime or Text or URL 0, 1

fields that may also be applicable, but I left out and would like to discuss:

author, citation, contributor, correction, creditText, dateCreated, datePublished, funding, keywords, maintainer, publication, usageInfo, description, image, name.

I think we will want to use hasPart in the future if we want to describe for example, a feature within a geopackage, but at this point working out those details to that seems futile.

aaraney commented 2 years ago

Below is an example in json-ld

    <script type="application/ld+json">
    {
        "@context": "https://schema.org",
        "@type": "MediaObject",
        "contentUrl": "http://some.place/memphis.gpkg",
        "contentSize": "1024",
        "encodingFormat": "application/geopackage+sqlite3",
        "sha256": "c10bfc86ddeb9c2db15229dd9f3c50354d537b55b59b2eb507df62c7154d3c70",
        "uploadDate": "1970-01-01T00:00:42Z",
        "contentLocation": {
            "@type": "City", // City is covariant(as useful as) in Place, so it came be used here. 
            "name": "Memphis, TN",
            "slogan": "Home of Blues, Soul & Rock 'n' Roll"
        },
        "spatialCoverage": {
            "@type": "Place", // could use City here again
            "name": "Memphis, TN",
            "geo": {
                "@type": "GeoShape",
                "box": "34.9941 -90.3030 35.2639 -89.6371" // schema.org docs are unclear about format. using https://developers.google.com/search/docs/advanced/structured-data/dataset#space as reference
            }
        }
    }
    </script>

Below is a screenshot showing the above passes schema.org's validator. Unfortunately, the validator uses a POST request, so I can't create a shareable link. Feel free to drop the above in the validator yourself though.

schema org validation of above json-ld