pygeoapi icon indicating copy to clipboard operation
pygeoapi copied to clipboard

JSON-LD UI enhancements (HTML pages)

Open avillar opened this issue 2 months ago • 3 comments

Overview

This PR depends on GH-2171. It provides a series of UI components to enhance the HTML views of feature and stac items when a JSON-LD context is available, by mapping the object properties (and linked data values) to their corresponding semantic terms, resolving the terms, and retrieving a human-friendly label and description.

Additional information

Arrow functions are used, so ES6 is required. They could be replaced and the code made fully ES5 compatible, though.

<script src="..."> dependencies is to rdflib.js and to jsonld-ui-utils are included in the HTML.

Dependency policy (RFC2)

  • [X] I have ensured that this PR meets RFC2 requirements

Updates to public demo

  • [X] I have ensured that breaking changes to the pygeoapi master demo server have been addressed
    • [X] https://github.com/geopython/demo.pygeoapi.io/blob/master/services/pygeoapi_master/local.config.yml

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • [X] I'd like to contribute feature "JSON-LD UI enhancements (HTML pages)" to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • [X] I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

avillar avatar Dec 01 '25 17:12 avillar

an example in action can be seen here: https://defs-dev.opengis.net/bblocks-pygeoapi/collections/ogc.bbr.examples.observation.vectorObservationFeature/items/vector-obs-1

rob-metalinkage avatar Dec 01 '25 21:12 rob-metalinkage

also here: https://defs-dev.opengis.net/bblocks-pygeoapi/collections/ogc.osc.geodcat-stac-earthcode.experiments/items/polarwarp

in this case you will notice that much of the STAC and records element mapping is not fully realised as Linked Data - but that is why this capability is very important as part of a testing regime.

rob-metalinkage avatar Dec 01 '25 21:12 rob-metalinkage

How does this interact with #916

it supercedes it, however the SEO issue is a related concern that just be addressed in a less ad-hoc way than the current JSON-LD implementation

and #1954?

this needs further analysis to determine the exact requirements left unsatisfied. It would appear this is a general UI contract around use of JSON-links vs static defined properties with object link values. Strongly recommend getting the basics in place with this PR before support for such extended cases are designed, however is this analysis can be done in a timely fashion it could help with the review.

This is an implementation of #1678, right?

yes

rob-metalinkage avatar Dec 05 '25 01:12 rob-metalinkage