-
Notifications
You must be signed in to change notification settings - Fork 82
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
Ability to set no null/empty geometry in returned response #16
Comments
The idea so far is to add a capability to exclude feature properties (including the geometry) from the response in a future part and not require that every implementation supports this. |
Of course, intermediaries can cache as needed. So can the client. @ThomasG77 in the case of just returning a table, for instance, aren't we just talking about a different representation? |
For one of our APIs, we do something like that: Default: JSON Optional: GeoJSON: Optional: GeoJSON + geometry choice You can also choose fields you want to be returned: Work also for collections… Fast and efficient ;) |
👍 @jdesboeufs but it would be awesome if those "Optional" resource representations could be included in the "Default" response. |
@jvanulde About "aren't we just talking about a different representation?" @jvanulde, your proposition remains better for response size. GeoJSON
Flat JSON table
|
@cportele I suppose you are speaking about something similar as the previous WFS versions implementation where The main difference seems that you are thinking about using exclusion in the logic instead of inclusion in previous WFS versions. Sorry for some noise, as it's always difficult to figure if a suggestion should be in the core or the future additional parts and mandatory or not. |
@ThomasG77 I was thinking about the same style as in the "projection clause" in the current WFS, i.e. listing explicitly the feature properties to include in the response. Don't worry about "noise", we are looking for developer feedback and welcome the input and thoughts! The general idea is to keep the mandatory Core small so that it is not hard to implement a useful server. A capability to subset the returned properties (the "projection clause" in WFS 2.0) is clearly useful for clients in some use cases (see also my issue #13), but so far we felt that it is better to make it an optional capability. |
Another example of requesting properties - http://jsonapi.org/format/#fetching-sparse-fieldsets |
Agreement on 2018-02-01: Defer to an extension. (But keep the discussion going.) |
@cportele I saw your comment about I think it makes sense to include this in the extension specifying |
@jerstlouis - I fully agree, there should be a single extension for what WFS called "projection". With respect to naming, in our implementation we just came up with |
@cportele Cool. speaking of naming, I think I've mentioned before that I really dislike the choice of the In addition to an obvious confusion in the geospatial domain about what this extension is about, I still fail to see which definition of the term https://www.merriam-webster.com/dictionary/projection The data is not transformed or projected onto a different plane or anything, you are simply asking for a subset of the full available information. To me this is a subsetting of the properties... Very similar in fact to the |
I don't think we need to spend our time debating the term "projection", there likely is consensus not to use that term in the OGC API context :) |
@cportele Ah okay. I did find this on Wikipedia ( https://en.wikipedia.org/wiki/Projection_(mathematics), as an extension of the general mathematical concept to relational databases.
I thought projection was the proposed name for the Features extension. Thanks for the clarification. |
Yes, this is where the term came from. |
@jerstlouis @cportele I used the term projection because my early background was in relational databases and the part of the query that indicates which properties to include in a response is called the projection clause just like the part that selects which records are in a response is called the selection clause. The name I was proposing to use for the features extension was OGC API - Features - Part X: Property Selection. That is from TB14: https://docs.opengeospatial.org/per/18-045.html#property_selection_extension. If we have a projection capability why exactly do we need a skip/omitGeometry thing? |
@pvretano I like Property selection. Does this really have to be a whole new extension? Couldn't it be an extra conformance class of a future revision of Core? We need something like |
In addition to what @jerstlouis said, what is the property name of the geometry? In a GML encoding (where it would just one of the properties) it would likely be something else that in a GeoJSON (where geometry has special treatment and is not one of the "properties"). I think we can find a convention one way or the other, but geometry will also always be something special, also because the geometry is often the most significant part of the feature size, and it may be easier for API users to have special treatment for the geometry.
Yes. No. Core is and should always be restricted to the capabilities that every implementation has to support. That is why it is called "Core". Everything else is an extension. And keeping extensions small with a focussed scope is a good thing, too, although the OGC processes do not really support that well. |
Is that really the case though? Core defines GeoJSON and HTML conformance classes, but an implementation doesn't necessarily have to implement both or even either of these, or is that not the case? Common Core defines the OAS3 conformance class, but it was agreed that an API description could be provided in an alternate API description language instead and still conform to Common Core.
That's why I thought conformance classes might be the more granular units that can be conveniently grouped in an extension (making the process easier for the SWGs), where supporting an extension does not necessarily imply supporting all conformance classes defined in it. I think that does apply to Simple Transactions where PATCH for example is optional. I think we will need to review the implications of this for Coverages as well... |
@cportele ok about the geometry although I would have assumed that the projection clause for JSON-encoded feature would reference the keys so if the projection clause was specified and included the "geometry" key then the geometry would be presented; otherwise it would not. @jerstlouis @cportele I supposed we could "gather" a bunch of small extensions into a single document although I agree with @cportele I don't really see a problem with having lots of small and concise extensions; after all these are supposed to be LEGOs! ;) |
@pvretano The document boilerplate and process overhead associated with extensions is far from small and concise though. I would see the conformance classes as LEGOs, and the extensions as LEGO boxsets containing the blocks to build something cool. You don't have to use all the blocks in the set, you just pick the ones you want. to use. :) |
@jerstlouis the entire effort for writing an extension is mostly 1 clause; the rest -- as you say -- is boilerplate. It would be good if the boiler plate were a lot smaller but it is not that onerous. I have always wanted OGC to put most of the boilerplate into some persistent location and then extensions could simple include a link. Also, @cportele wrote a leaner template for 1-conformance class extensions that makes the process easier; its located somewhere in the features repo. As for the LEGO analogy, sure! ;) |
Conformance classes should not be bundled in a single document, unless they are closely related and implemented together in many/most cases. It is easier for those not knowing the standards by heart to read and implement everything from a short document than to find and read a chapter in a large document, understand the context and relationship with the other chapters and then implement just that chapter. |
Waking this thread up ahead of the November 2021 sprint as we are implementing support for this. I am guessing the proposal should now be kebab-cased |
@jerstlouis perhaps a |
@jvanulde Yes that is how it's already done, but the use case for |
The I view the |
@pvretano Yes I think (To clarify, we already implement |
Meeting 2024-06-03: The general capability is supported by the current draft of Part 6. @cportele will review the disucssion to see, if there are additional aspects not yet covered/discussed and otherwise close the issue as completed. |
Most of the data consumers from WFS need the geometry but sometimes, the service can provide data for charts or HTML tables where geometry would slow down the data retrieval due to geometry size in response.
I'm not sure if the specification implicitly manage this use case as I didn't found a way to do it from my understanding of the current Core spec.
The text was updated successfully, but these errors were encountered: