Skip to content
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

FeatureCollection (xml) schema and streaming #234

Closed
jampukka opened this issue Jun 20, 2019 · 4 comments
Closed

FeatureCollection (xml) schema and streaming #234

jampukka opened this issue Jun 20, 2019 · 4 comments
Assignees
Labels
OGC API: Features Issue related to feature resources (see #190) Part 1: Core Issue related to Part 1 - Core

Comments

@jampukka
Copy link
Contributor

In core:SimpleFeatureCollectionType core:boundedBy, atom:link and core:member elements are required to appear in specific sequence.
This is problematic if a server doesn't have the information when it starts writing the response, for example when streaming the response.
Currently this results in the server not writing the information at all which is problematic, especially not having links which are required for paging.

@cportele cportele added Part 1: Core Issue related to Part 1 - Core OGC API: Features Issue related to feature resources (see #190) labels Jun 20, 2019
@cportele cportele added this to the Part 1, Second Draft Release milestone Jun 20, 2019
@cmheazel
Copy link
Contributor

@jampukka XML is based on a document model which makes streaming any XML difficult at best. It can be done (I've done it), but it requires careful construction of your XML data. This was not a requirement for API-Features (although it might be useful as an extension).
Note: I assume that by streaming you mean sending XML elements across a Web Socket connection (or something similar).

@pvretano
Copy link
Contributor

I think patching this issue is fairly straight forward...

(1) Remove the attribute group core:StandardResponseParameters
(2) Define a new element called summary that provides the same information as (1)
<xsd:element name="summary">
xsd:complexType
<xsd:element name="timeStamp" type="xsd:dataType"/>
<xsd:element name="numberMatched" type="xsd:nonNegativeInteger" minOccurs="0"/>
<xsd:element name="numberReturned" type="xsd:nonNegativeInteger" minOccurs="0"/>
</xsd:complexType>
</xsd:element>
(3) Change the element model of core:SimpleFeatureCollectionType from xsd:sequence to xsd:all
(4) Add the core:summary element to the core:SimpleFeatureCollectionType content model

So, the elements in the content model can appear in any order (because of the xsd:all) and core:summary can thus appear at the end after all the feature content has been transmitted.
I have made the changed to core.xsd in my copy of the git repo and will check it in once people have reviewed this response and are OK with the approach.

@cportele
Copy link
Member

cportele commented Jul 1, 2019

That fix does not work. Each child element of xsd:all can occur zero or one time, i.e. there could be only one core:member and one atom:link.

Options:

  • keep xsd:sequence, but put core:summary at the end
  • keep xsd:all and add wrappers around the features and the links
  • ???

I would prefer the first option.

@cportele
Copy link
Member

cportele commented Jul 1, 2019

Decision: See #150 which limits what we can do as the feature collection is specified by GMLSF. We can close the issue here.

@cportele cportele closed this as completed Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OGC API: Features Issue related to feature resources (see #190) Part 1: Core Issue related to Part 1 - Core
Projects
Development

No branches or pull requests

4 participants