Dear Klaus,

Unfortunately looks like that what you need is currently unsupported. I
gave a quick tests and the WFS sortBy work only when sorting on property
names that are pointing to a root attribute, while specifying a sortBy on a
chained feature attribute seems to not produce any sorting.
A part from this, looks to me that even assuming to have a sortBy working
on nested attributes it will not descend automatically that also the nested
features (AirRoutLink if I got your use case) will be sorted.

Best regards,
Marco Volpini



Il giorno mar 23 mar 2021 alle ore 13:13 Bart Zwemmer | GIS Specialisten <
b...@gisspecialisten.nl> ha scritto:

> Hi Klaus,
>
>
>
> Thanks for the extra information. The problem is much cleared now.
> However, I don’t know if I can offer you a solution. The only directions to
> solve this I can think of is applying a CQL filter to the layer to order
> the output based on the net:direction property. I found a brief example
> here, that might be of help:
>
>
> http://gxt.mangosystem.com/community/ogc_standards/filter_encoding/index.html#sortby
>
>
>
> ---
>
> Met vriendelijke groet / Kind regards,
>
>
>
> *Bart Zwemmer*
>
> Technical Manager <https://www.linkedin.com/in/bzwemmer/>
>
>
>
> *M:* +31(0)642 343 9111
>
> *E: *b...@gisspecialisten.nl
>
>
>
> Geo-as-a-Service | GeoService.cloud
> <https://gisspecialisten.us4.list-manage.com/track/click?u=113f5f268deebb4e057734fe1&id=ecaf5147d3&e=16c25326a4>
>
>
>
>
> *From:* Gäbler Klaus <klaus.gaeb...@austrocontrol.at>
> *Sent:* Tuesday, March 23, 2021 12:02 PM
> *To:* Bart Zwemmer | GIS Specialisten <b...@gisspecialisten.nl>; '
> geoserver-users@lists.sourceforge.net' <
> geoserver-users@lists.sourceforge.net>
> *Subject:* AW: AppSchema: how to retrieve an ordered list in feature
> chaining
>
>
>
> Hi Bart,
>
> What I’m trying is to serve the correct complex feature for
> AirLinkSequence as WFS, containing an ordered list of AirRouteLink elements
> – see the following snippet:
>
>
>
> Featuretype AirLinkSequence (this is, what GS brings up as WFS:
>
> <wfs:member>
>
>        <tn-a:AirLinkSequence
> gml:id="AT.0012.6bed1778-d6bf-11e8-9f8b-f2801f1b9fd1.tn-a.AirLinkSequence.108">
>
>              <gml:metaDataProperty xlink:href="
> https://inspire.austrocontrol.at/AT.0012.6bed1778-d6bf-11e8-9f8b-f2801f1b9fd1
> "/>
>
>              <gml:identifier codeSpace="
> http://inspire.jrc.ec.europa.eu/ids";>
> https://inspire.austrocontrol.at/AT.0012.6bed1778-d6bf-11e8-9f8b-f2801f1b9fd1/tn-a.AirLinkSequence.108</gml:identifier
> >
>
>
> <net:beginLifespanVersion>2016-07-21T00:00:00Z</net:beginLifespanVersion>
>
>              <net:inspireId>
>
>                     <base:Identifier>
>
>
> <base:localId>tn-a.AirLinkSequence.108</base:localId>
>
>                            <base:namespace>
> https://inspire.austrocontrol.at/AT.0012.6bed1778-d6bf-11e8-9f8b-f2801f1b9fd1/</base:namespace
> >
>
>                            <base:versionId>2016-07-21</base:versionId>
>
>                     </base:Identifier>
>
>              </net:inspireId>
>
>              <net:inNetwork xlink:href="
> https://inspire.austrocontrol.at/AT.0012.243b6e36-d14a-11e8-a8d5-f2801f1b9fd1/tn.TransportNetwork.1
> "/>
>
>              <net:link>
>
>                     <net:DirectedLink>
>
>                            <net:direction>+</net:direction>
>
>                                   <net:link xlink:href="
> https://inspire.austrocontrol.at/AT.0012.6bed1778-d6bf-11e8-9f8b-f2801f1b9fd1/tn-a.AirRouteLink.716
> "/>
>
>                                   <net:link xlink:href="
> https://inspire.austrocontrol.at/AT.0012.6bed1778-d6bf-11e8-9f8b-f2801f1b9fd1/tn-a.AirRouteLink.715
> "/>
>
>                     </net:DirectedLink>
>
>              </net:link>
>
>              <tn:geographicalName nilReason="
> http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown";
> xsi:nil="true"/>
>
>              <tn:validFrom nilReason="
> http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown";
> xsi:nil="true"/>
>
>        </tn-a:AirLinkSequence>
>
> </wfs:member>
>
>
>
> According to the specification the element “net:DirectedLink” should be an
> ordered list of AirRouteLink elements (for this we have a sequence
> attribute in our base table).
>
> Suppose the ordered list of AirRouteLink should be (according to our
> sequence attribute in the base table) AirRouteLink.715 - AirRouteLink.716
> (and not as shown above), I need a possibility to bring the AirRouteLink in
> this order into the AirLinkSequence (and unfortunately there is no primary
> key, which I can use!!).
>
>
>
> Here is the AppSchema for interim dataType <net:DirectedLink> and the
> <tn-a:AirLinkSequence>. To my understanding the ordering should happen in
> the interim <net:DirectedLink>:
>
>
>
>         <FeatureTypeMapping>
>
>             <sourceDataStore>dataStore</sourceDataStore>
>
>             <sourceType>insp_linkreference</sourceType>
>
>             <targetElement>net:DirectedLink</targetElement>
>
>             <attributeMappings>
>
>                 <AttributeMapping>
>
>                     <targetAttribute>FEATURE_LINK</targetAttribute>
>
>                     <sourceExpression>
>
>                         <OCQL>property_gml_id</OCQL>
>
>                     </sourceExpression>
>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
>                     <targetAttribute>net:direction</targetAttribute>
>
>                     <sourceExpression>
>
>                         <OCQL>direction</OCQL>
>
>                     </sourceExpression>
>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
>                     <targetAttribute>net:link</targetAttribute>
>
>                     <encodeIfEmpty>true</encodeIfEmpty>
>
>                     <ClientProperty>
>
>                         <name>xlink:href</name>
>
>                         <value>element_href</value>
>
>                     </ClientProperty>
>
>                 </AttributeMapping>
>
>             </attributeMappings>
>
>         </FeatureTypeMapping>
>
>         <FeatureTypeMapping>
>
>             <sourceDataStore>dataStore</sourceDataStore>
>
>             <sourceType>insp_airlinksequence</sourceType>
>
>             <targetElement>tn-a:AirLinkSequence</targetElement>
>
>             <attributeMappings>
>
>                 <AttributeMapping>
>
>                     <targetAttribute>gml:metaDataProperty</targetAttribute>
>
>                     <encodeIfEmpty>true</encodeIfEmpty>
>
>                     <ClientProperty>
>
>                         <name>xlink:href</name>
>
>                         <value>metadataproperty</value>
>
>                     </ClientProperty>
>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
>
> <targetAttribute>net:beginLifespanVersion</targetAttribute>
>
>                     <sourceExpression>
>
>                         <OCQL>beginlifespanversion</OCQL>
>
>                     </sourceExpression>
>
>                     <ClientProperty>
>
>                         <name>xsi:nil</name>
>
>                         <value>if_then_else(isNull(beginlifespanversion),
> 'true', Expression.NIL)</value>
>
>                     </ClientProperty>
>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
>                     <targetAttribute>tn:geographicalName</targetAttribute>
>
>                     <encodeIfEmpty>true</encodeIfEmpty>
>
>                     <ClientProperty>
>
>                         <name>nilReason</name>
>
>                         <value>'
> http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'</value>
>
>                     </ClientProperty>
>
>                     <ClientProperty>
>
>                         <name>xsi:nil</name>
>
>                         <value>if_then_else(isNull('
> http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'),
> Expression.NIL, 'true')</value>
>
>                     </ClientProperty>
>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
>                     <targetAttribute>tn-a:AirLinkSequence</targetAttribute>
>
>                     <idExpression>
>
>                         <OCQL>gml_id</OCQL>
>
>                     </idExpression>
>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
>                     <targetAttribute>gml:identifier</targetAttribute>
>
>                     <sourceExpression>
>
>                         <OCQL>gml_identifier</OCQL>
>
>                     </sourceExpression>
>
>                     <ClientProperty>
>
>                         <name>codeSpace</name>
>
>                         <value>gml_identifier_codespace</value>
>
>                     </ClientProperty>
>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
>                     <targetAttribute>net:inNetwork</targetAttribute>
>
>                     <encodeIfEmpty>true</encodeIfEmpty>
>
>                     <ClientProperty>
>
>                         <name>xlink:href</name>
>
>                         <value>innetwork_guid_link</value>
>
>                     </ClientProperty>
>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
>
> <targetAttribute>net:inspireId/base:Identifier/base:localId</targetAttribute>
>
>                     <sourceExpression>
>
>                         <OCQL>localid</OCQL>
>
>                     </sourceExpression>
>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
>
> <targetAttribute>net:inspireId/base:Identifier/base:namespace</targetAttribute>
>
>                     <sourceExpression>
>
>                         <OCQL>inspireid_namespace</OCQL>
>
>                     </sourceExpression>
>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
>                     <targetAttribute>tn:validFrom</targetAttribute>
>
>                     <encodeIfEmpty>true</encodeIfEmpty>
>
>                     <ClientProperty>
>
>                         <name>nilReason</name>
>
>                         <value>'
> http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'</value>
>
>                     </ClientProperty>
>
>                     <ClientProperty>
>
>                         <name>xsi:nil</name>
>
>                         <value>if_then_else(isNull('
> http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown'),
> Expression.NIL, 'true')</value>
>
>                     </ClientProperty>
>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
>
> <targetAttribute>net:inspireId/base:Identifier/base:versionId</targetAttribute>
>
>                     <sourceExpression>
>
>                         <OCQL>versionid</OCQL>
>
>                     </sourceExpression>
>
>                     <ClientProperty>
>
>                         <name>xsi:nil</name>
>
>                         <value>if_then_else(isNull(versionid), 'true',
> Expression.NIL)</value>
>
>                     </ClientProperty>
>
>                 </AttributeMapping>
>
>                 <AttributeMapping>
>
>                     <targetAttribute>net:link</targetAttribute>
>
>                     <sourceExpression>
>
>                         <OCQL>gml_id</OCQL>
>
>                         <linkElement>net:DirectedLink</linkElement>
>
>                         <linkField>FEATURE_LINK</linkField>
>
>                     </sourceExpression>
>
>                 </AttributeMapping>
>
>             </attributeMappings>
>
>         </FeatureTypeMapping>
>
>
>
> Hope that clarifies my problem and maybe somebody has a good solution ;-)
>
> Thanks in advance!
>
> Klaus
>
>
>
> *Von:* Bart Zwemmer | GIS Specialisten <b...@gisspecialisten.nl>
> *Gesendet:* Dienstag, 23. März 2021 10:32
> *An:* Gäbler Klaus <klaus.gaeb...@austrocontrol.at>; '
> geoserver-users@lists.sourceforge.net' <
> geoserver-users@lists.sourceforge.net>
> *Betreff:* RE: AppSchema: how to retrieve an ordered list in feature
> chaining
>
>
>
> Dear Klaus,
>
>
>
> I am not 100% clear on what you are doing. Is it a WFS request? In a WFS
> request, the SORTBY parameter is used to specify a list of property names
> whose values should be used to order (upon presentation) the set of feature
> instances that satisfy the query. The value of the SORTBY parameter shall
> have the form “PropertyName [A|D][,PropertyName [A|D],…]” where the letter
> A is used to indicate an ascending sort and the letter D is used to
> indicate a descending sort. In your case, the property would then be
> AirRouteLink, if I understand the question correctly.
>
>
>
> Also, id AirRouteLink is your primary key, this is not exposed by default
> in a service. For that to happen, you need to check the box next to “expose
> primary key” in the datastore configuration.
>
>
>
> Sources:
>
>
> https://gis.stackexchange.com/questions/257669/how-to-sortby-a-getfeature-wfs-request-by-featureid-fid-in-xml
>
>
> https://gis.stackexchange.com/questions/43973/why-does-geoserver-not-serve-my-primary-key-id
>
>
>
> ---
>
> Met vriendelijke groet / Kind regards,
>
>
>
> *Bart Zwemmer*
>
> Technical Manager <https://www.linkedin.com/in/bzwemmer/>
>
>
>
> *M:* +31(0)642 343 9111
>
> *E: *b...@gisspecialisten.nl
>
>
>
> Geo-as-a-Service | GeoService.cloud
> <https://gisspecialisten.us4.list-manage.com/track/click?u=113f5f268deebb4e057734fe1&id=ecaf5147d3&e=16c25326a4>
>
>
>
>
> *From:* Gäbler Klaus <klaus.gaeb...@austrocontrol.at>
> *Sent:* Monday, March 22, 2021 8:05 AM
> *To:* 'geoserver-users@lists.sourceforge.net' <
> geoserver-users@lists.sourceforge.net>
> *Subject:* [Geoserver-users] AppSchema: how to retrieve an ordered list
> in feature chaining
>
>
>
> Dear all,
>
> for Inspire we need to retrieve an ordered list of elements using feature
> chaining. Is there any possibility to do this in GS 2.18.2?
>
> The relevant schema is Transport Network Air, the feature is
> AirRouteSequence which should contain an ordered list of AirRouteLink
> elements.
>
> I’ve already ordered elements in my source table, but GS doesn’t bring
> that up in the AppSchema.
>
> Any hints how to do this?
>
> Thanks in advance!
>
> Kind regards
>
> Klaus
>
> *Wichtiger Hinweis:* Diese E-Mail Nachricht kann Betriebs- oder
> Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten.
> Wenn Sie nicht der Adressat sind und diese Nachricht irrtümlich erhalten
> haben, ist Ihnen eine Verwendung des Inhalts, eine Vervielfältigung oder
> Weiter-gabe dieser Nachricht ausdrücklich untersagt. Bitte benachrichtigen
> Sie uns und vernichten Sie die empfan-gene Nachricht. Vielen Dank.
>
> *Please Note:* This e-mail message may contain trade secrets or
> privileged, undisclosed or otherwise confidential information. If you are
> not the intended recipient and have received this message in error or by
> mistake any unauthorized use, reproduction or distribution of this message
> is strictly prohibited. Please notify us immediately and destroy the
> original transmittal. Thank you for your cooperation.
>
> *Austro Control Österreichische Gesellschaft für Zivilluftfahrt mit
> beschränkter Haftung*
> Sitz/Registered address: Wien/ Vienna; Registriert unter/registered under:
> FN 71000m Com-petent court/Firmenbuchgericht: HG Wien/commercial court
> Vienna; Rechtsform/legal form: GmbH Post-anschrift/postal address: Wagramer
> Straße 19 - 1220 Wien/Vienna DVR: 0447277
>
> *Disclaimer*
> De informatie in dit e-mailbericht, inclusief eventuele bijlage(s) is
> vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n). Gebruik van
> deze informatie door anderen dan de geadresseerde(n) is niet toegestaan.
> Openbaarmaking, verspreiding en/of verstrekking van deze informatie aan
> derden wordt niet gepermitteerd. Wanneer u dit bericht ten onrechte heeft
> ontvangen, dient u de afzender hiervan per e-mail op de hoogte te brengen
> en dit bericht te verwijderen.
>
> *Wichtiger Hinweis:* Diese E-Mail Nachricht kann Betriebs- oder
> Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten.
> Wenn Sie nicht der Adressat sind und diese Nachricht irrtümlich erhalten
> haben, ist Ihnen eine Verwendung des Inhalts, eine Vervielfältigung oder
> Weiter-gabe dieser Nachricht ausdrücklich untersagt. Bitte benachrichtigen
> Sie uns und vernichten Sie die empfan-gene Nachricht. Vielen Dank.
>
> *Please Note:* This e-mail message may contain trade secrets or
> privileged, undisclosed or otherwise confidential information. If you are
> not the intended recipient and have received this message in error or by
> mistake any unauthorized use, reproduction or distribution of this message
> is strictly prohibited. Please notify us immediately and destroy the
> original transmittal. Thank you for your cooperation.
>
> *Austro Control Österreichische Gesellschaft für Zivilluftfahrt mit
> beschränkter Haftung*
> Sitz/Registered address: Wien/ Vienna; Registriert unter/registered under:
> FN 71000m Com-petent court/Firmenbuchgericht: HG Wien/commercial court
> Vienna; Rechtsform/legal form: GmbH Post-anschrift/postal address: Wagramer
> Straße 19 - 1220 Wien/Vienna DVR: 0447277
>
> *Disclaimer*
> De informatie in dit e-mailbericht, inclusief eventuele bijlage(s) is
> vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n). Gebruik van
> deze informatie door anderen dan de geadresseerde(n) is niet toegestaan.
> Openbaarmaking, verspreiding en/of verstrekking van deze informatie aan
> derden wordt niet gepermitteerd. Wanneer u dit bericht ten onrechte heeft
> ontvangen, dient u de afzender hiervan per e-mail op de hoogte te brengen
> en dit bericht te verwijderen.
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to