-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Don't register a separate media type #129
Comments
Meeting 2024-05-27: This is a good point. Whether a separate media type is helpful or not depends on the use case. A separate media type helps in a content negotiation scenario where an API can provide GeoJSON (without JSON-FG extension), JSON-FG (with or without the GeoJSON compatibility mode). In the case of a weblink with the "type" attribute, a GeoJSON media type would be more helpful for a GeoJSON-aware software (which does not know JSON-FG). Since we cannot do both at the same time, the question which is which is the more important use case. This would be simpler, if the GeoJSON media type would support parameters to express extensions, but this is not the case. Additional input is welcome. |
If servers support JSON FG and GeoJSON, what would be a reason to not deliver JSON FG by default so that content negotiation would be required? |
Meeting 2024-08-19: We are leaning towards not registering a new media type. Clients can use to "conformsTo" member to determine that the content is JSON-FG. However, this would require that we also allow to include non-WGS84 coordinates in "geometry" to conform to OGC API Features Part 2 when the GeoJSON geometry is requested in a non-WGS84 CRS. We need to find a way that does not make the split between "geometry" and "place" even more complex/confusing. We should create a table that lists all the different cases and see, if we can provide guidance what to create when. Maybe this can be accommodated using additional API building blocks. Maybe we can use the "profile" query parameter, because all the variations are valid for the GeoJSON media type. |
- Share same media type with FG-JSON - NOTE: There is an on-going discussion for FG-JSON to potentially share media type with GeoJSON, so this is a first step in that potential direction. See opengeospatial/ogc-feat-geo-json#129 - New `geometry` parameter to distinguish FG-JSON from DGGS-FG-JSON instead of media type - Declare examples to conform to FG-JSON - Use `dggsPlace` instead of `place` for quantized geometry NOTE: The reason we choose this instead of defining new feature type is because it really is the referencing by coordinates which is replaced by referencing by DGGRS+parent-zoneId+sub-zone indices. Any feature type defined in FG-JSON or extensions is thus automatically supported by DGGS-FG-JSON as long as it uses a `coordinates` array. - geometry=quantized selects DGGS-FG-JSON (requirement for DGGS-FG-(UB)JSON) - Recommendations for GeoJSON and FG-JSON: - geometry=zone-centroid for selecting rasterized zone centroid Point geometry - geometry=zone-region for selecting rasterized zone region (Multi)Polygon or Polyhedron - geometry=vectorized for selecting (non-quantized) vectorized feature geometries - default is to return native representation
I think that we can and should use the
"rfc7946" should be the default since this is the current behavior, if "application/geo+json" is requested. Existing APIs may also continue to support the current draft media types for backwards compatibility. We should add a discussion about this in the clause on media types. In addition, JSON-FG should formally define the profiles and the values for the HTTP query parameter |
Meeting 2024-09-30: @cportele will implement this in the current pull request. |
- As outlined in opengeospatial#46 (comment) - This addresses concerns about duplicated content in separate requirement classes raised by Carl Reed during OAB review - This reflects the decision in opengeospatial/ogc-feat-geo-json#129 to not define a media type for FG-JSON separate from application/geo+json - GeoJSON / FG-JSON requirement classes for zone data and zone lists were merged, with support for FG-JSON now a recommendation - The `profile` parameter is introduced to negotiate the FG-JSON and DGGS-FG-JSON profiles of GeoJSON, which replaces the `geometry=quantized` and `geometry=quantized-zoneids` to select DGGS-FG-JSON.
- As outlined in opengeospatial#46 (comment) - This addresses concerns about duplicated content in separate requirement classes raised by Carl Reed during OAB review - This reflects the decision in opengeospatial/ogc-feat-geo-json#129 to not define a media type for FG-JSON separate from application/geo+json - GeoJSON / FG-JSON requirement classes for zone data and zone lists were merged, with support for FG-JSON now a recommendation - The `profile` parameter is introduced to negotiate the FG-JSON and DGGS-FG-JSON profiles of GeoJSON, which replaces the `geometry=quantized` and `geometry=quantized-zoneids` to select DGGS-FG-JSON.
- As outlined in opengeospatial#46 (comment) - This addresses concerns about duplicated content in separate requirement classes raised by Carl Reed during OAB review - This reflects the decision in opengeospatial/ogc-feat-geo-json#129 to not define a media type for FG-JSON separate from application/geo+json - GeoJSON / FG-JSON requirement classes for zone data and zone lists were merged, with support for FG-JSON now a recommendation - The `profile` parameter is introduced to negotiate the FG-JSON and DGGS-FG-JSON profiles of GeoJSON, which replaces the `geometry=quantized` and `geometry=quantized-zoneids` to select DGGS-FG-JSON.
Meeting 2024-11-25:
This only applies, if the API supports that profile. If only JSON-FG is supported, the API will use another profile as the default. |
@jerstlouis - To follow-up on our discussion in the call, the profile of the response will be expressed using a link with |
I'm not sure I understand how a rel="profile" in a link relates to media types? |
|
@cportele from a quick glance at RFC 6906 (I did not read the whole thing in detail), it's not immediately obvious was this means, may also be what @m-mohr is not sure about. My guessed-understanding is that an FG-JSON response to a GET request would include a link response header like this:
Is this correct? Thanks. (i.e., it's not the link relation type used to link to the FG-JSON resource -- that would still be I do find this use of a link relation type quite confusing (is that the primary purpose of RFC 6906, or a side-purpose of it?). |
It should be something like:
Profiles should be registered with the Naming Authority. There are, for example, profiles registered for the GML Simple Features profiles. The one for Level 0 is: http://www.opengis.net/def/profile/ogc/2.0/gml-sf0.
It is the primary purpose. The title of the RFC is: "The 'profile' Link Relation Type". I find it pretty straightforward. A profile is a concept identified by a URI. The link relation type allows to add links to a resource that state that the resource representation conforms to the referenced profiles. This is no different to a "license" link to states a license that applies to the resource. |
@cportele Thanks for the clarifications.
I guess a question related to my confusion (relating to how that profile link relation type is used) is whether the profile link should (shall?) be in the |
In the JSON-FG case it SHALL be in the "links" array of the document and when returned from an OGC Web API it SHOULD also be in the headers. See OGC API Features Part 5 Requirement 26 and Recommendation 3. |
In Requirement 25:
I'm curious what's the plan to make this To me it's quite ambigious what selected resources mean (not sure what that would translate to in the still-missing ATS either). Would this (also does not really make sense to rely on Part 5 to support an FG-JSON representation of Part 1 resources). Thanks. |
This really should be discussed in OGC API Features as it is not related to JSON-FG. JSON-FG will not depend on OGC API Features. In JSON-FG we will add a requirement for the profile link in the JSON content. This is unrelated to the query parameter "profile" used in an API (unless you request JSON-FG via the API).
I don't understand. Requirements Class "Profile query parameter" is the basic requirements class for the "profile" parameter without identifying the resources to which is applies. This is the job of additional requirements classes depending of this requirements class. The Requirements Class "Profiles for feature references" is an example, which defines the parameter for the Features and Feature resources. I am not aware that we are using the parameter on Schema resources yet.
It might be an option to move the basic, general requirements class for the "profile" parameter to Part 1. |
Right, sorry this is turning into a side discussion. Not sure we need to open a new issue though...
My bad, sorry, somehow I had the impression that this section 14 was changing the profile of the schema rather than the features... (this has been confusing me since the start of the Part 5 discussions, most likely because the ability to profile the items/features resources would feel natural to be something in Part 1. I'm not sure the specific feature references aspect is actually that closely related to the Schema definition? Since it's clear that the schema is logical, it implies that profiles can do things such as changing how features are referenced, but that should not be tied to the schema definition.).
I guess for me I see "Section 13" as a ModSpec "Requirement Module" which is like an abstract requirement class (not tied to particular resource paths), in this case for a web API query parameter building block (which can be defined on the building block register -- if that's still a thing), which really does not need to be defined as a requirement class at all, but instead can be re-used and tailored for specific resources, like Section 14 does for i.e., the abstract requirement module not attached to particular resources does not need to be a req. class in any OGC Standard document or have its own URI (unless there's a Web API query parameter building block URI). Sorry for the digression -- let's open a new issue in Features if we need to discuss further. |
I still don't get it, sorry. Let's say I have a STAC Item and want to link to it:
Let's assume that STAC Item is also a valid JSON-FG and I want to express that through the media type, how would I do that? I guess it somehow works that the item.json from the example would include the Note: I'm fine with not having a separate media type, that was the main target of the issue. But this "compromise"(?) seems to be confusing to me. Maybe due to a lack of examples? PS: IANA seems to be a bit of a burden. Why don't they just allow profiles for all media types? It just leads to situations where people just do what they want, e.g. for the COG media type. The community added parameters to "image/tiff" and it's very commonly used, although not registered with IANA. |
You cannot have it both ways. The original comment was that "./item.json" in JSON-FG should declare its media type as "application/geo+json" and not a JSON-FG media type since it is also GeoJSON, which we agreed to. There is no way that I know to express in the same link that it is also JSON-FG (unless we introduce OGC-specific extensions to links). What you can do is to add another link with an anchor to state the profile of the anchor resource: {
"href": "http://www.opengis.net/def/profile/ogc/0/json-fg",
"anchor": "./item.json",
"rel": "profile"
} |
@cportele Seems like it would be a lot cleaner (and easier for clients) to embed the profile information in a |
Okay, understood. That anchor thing seems heavily breaking to me. The actual href should be item.json and then you don't have a rel to describe the purpose. I think this is a bad idea honestly. If at all, this should probably be something like:
Otherwise you break semantics of the rel type and also the usability of an href. |
It would be good to decide on what the values of those
But the examples provided so far use In addition to that, I am still utterly confused whether the most official shorthand for Features & Geometry JSON is FG-JSON or JSON-FG or both (and this repo is extremely difficult to find as Looking at the latest spec I guess the correct thing is We would like to reflect all this as properly as made possible by the timing in the Candidate DGGS API. P.S.: Shouldn't the shorthand form match the order of the full name of the candidate Standard and be changed to Alternatively the full title could be changed to something like OGC JSON encoding for Features & Geometry? :) |
"anchor" is a standard link parameter (like "rel"), see RFC 8288. I do not understand what would be broken by using "anchor" in a link, this is just using the standard web conventions for links and their semantics. I understand that parsing two links can be more complex for clients. Inventing a link target attribute "profile" is another approach. However, this information would only be understood by OGC-aware clients as it introduces OGC-specific semantics that nobody else uses (AFAIK). |
RFC 8288 doesn't really describe a JSON encoding of links, so it'a bit of a stretch to argue with it. But from a practical perspective, what I see usually is that clients expect a href to be the actual resolvable link to follow. So it eventually ends up in html as e.g. |
Meeting 2024-12-09:
|
Question: Let's say we want to use this profile property outside of OGC spec (e.g. openEO and STAC), can we make use of it although we don't register our profiles to the OGC NA due to not being OGC standards / having no access to OGC NA? Or do we need our "custom_profile" property (which seems like a bad idea)? |
The value of "profile" won't be restricted to OGC URIs. That is, openEO and STAC can mint their own URIs for profiles. |
Sorry to bring this back again, but since we're trying to finalize OGC API - DGGS and its DGGS-JSON-FG encoding, would the SWG consider changing the title of the Standard to "OGC JSON encoding for Features & Geometry", to avoid the confusion on the acronym being "JSON-FG" rather than "FG-JSON"? The current title really continuously have us confused that the acronym is "FG-JSON". |
@jerstlouis How is this related to media types? |
@m-mohr Only tangentially, as it is somewhat related to the order of json and fg appearing in the name of the media type or profile ;) I could file a new issue, but brought this up earlier in the discussion |
@jerstlouis - The SWG has always used JSON-FG and there are no plans to change that. Whoever uses FG-JSON has invented his/her own acronym. |
@cportele That might well be me (sorry), but I do recall that it was used a lot in the earlier Testbed discussions (again perhaps only by us). We just fixed everything to be JSON-FG for DGGS-JSON-FG. (It also was how the media type But would the SWG be willing to consider renaming the title of the candidate Standard to OGC JSON encoding for Features & Geometry so that the acronym letters appear in order in the title? Should I file a separate issue to discuss that? Thanks. |
JSON FG is meant to be an extension to GeoJSON, a primary goal seems to be that it's a drop-in replacement with added functionality.
The standard is mostly written in a way that a GeoJSON client can easily read JSON FG.
Unfortunately, this is not quite consistent when it comes to the planned new media type (and .jsonfg file extension).
Existing clients will have issues to identify GeoJSON if it's advertised as JSON FG.
The intended media type
application/fg+json
is not compatible in any way with theapplication/geo+json
having in mind that many implementations just check equality of media type strings.I'd like to propose to not register a separate media type for JSON FG and also remove the
.jsonfg
file extension.Instead as media type
application/geo+json
orapplication/json
shall be used and.json
or.geojson
should be used as file extensions.This would greatly improve the compatibility with existing clients.
For example, all existing STAC clients I've checked of would not support reading the GeoJSON part of JSON FG due to the new media type. That will likely be the same in other ecosystems.
The text was updated successfully, but these errors were encountered: