Hexagon Geospatial
MENU

WebGIS

Need a push in the right direction when configuring WebMap, Portal or SDI services? Looking for hints and tips, or just looking for Ideas and information? The WebGIS discussion board is where you start those discussions, connect and share information.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 49
Registered: ‎10-27-2015

Is it possible to order results returned by WFSG in Geospatial Portal

[ Edited ]

Hi All,

 

I was wondering if it is possible to order results of a search returned by WFS-G(s) in Geospatial Portal?

Maybe there is a hidden parameter I could use or an event I could listen to?

 

Thank you in advance.


Denis

Technical Evangelist
Posts: 990
Registered: ‎09-11-2015

Re: Is it possible to order results returned by WFSG in Geospatial Portal

Hi Denis,

 

I've tested WebMap's WFS and it is able to sort the results if you provide another parameter called sortBy. However this parameter does not work for WebMap's WFS-G. If it would then you have to:

 

  1. Create serviceQuirk to force the Portal to use GET mode for this WFS-G
  2. Create custom Capabilities XML document (placed somewhere in IIS) and in this Capabilities rewire the GetFeature request adding sortBy parameter to the end
    <ows:Operation name="GetFeature">
       <ows:DCP>
          <ows:HTTP>
              <ows:Get xlink:href="http://62.159.72.88/WFSG-Moscow/service.svc/get?sortBy=mySortAttribute"/>
    ...

This would work for plain WFS. But WFS-G seems to be limited.

 

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

hbm
Staff
Posts: 292
Registered: ‎11-05-2015

Re: Is it possible to order results returned by WFSG in Geospatial Portal

For whatever reason, the WFSG does not implement sorting at all.

One possible solution service-side would be to either proxy over the WFSG and have some logic in place to manipulate the result GML by some criteria. This could also be a custom pipe plugged into the WFSG pipechain directly Smiley Wink

I also wonder if it could be done by having the WFSG to use a DB view as its source feature class and have the view declare an ORDER BY clause.

Technical Evangelist
Posts: 990
Registered: ‎09-11-2015

Re: Is it possible to order results returned by WFSG in Geospatial Portal

Lukasz, the DB view sounds as the simplest and elegant. But are we sure that WebMap does not use "SORT BY <ID>" already?

 

Thanks,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

hbm
Staff
Posts: 292
Registered: ‎11-05-2015

Re: Is it possible to order results returned by WFSG in Geospatial Portal

I've grepped the WFSG source code for any "sort" occurrences. Not one was found Smiley Sad

Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: Is it possible to order results returned by WFSG in Geospatial Portal

Using an ORDER BY statement in the database View does order the results of the WFS-G so this is technically an option.

However, the customer's dataset is a 30 million row address dataset so they've raised concerns about performance having an ORDER BY statement in the View.

 

I will mark @hbm's post as a solution.

Technical Evangelist
Posts: 990
Registered: ‎09-11-2015

Re: Is it possible to order results returned by WFSG in Geospatial Portal

Hi Colin,

 

You are right but you will get the performance hit anyway when expecting sorting the data in other way than the database's default.

 

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Regular Contributor
Posts: 246
Registered: ‎10-26-2015

Re: Is it possible to order results returned by WFSG in Geospatial Portal

Yes but the customer's opinion is our application should be performing the sort of the results from querying the View as that should be a smaller amount of rows to sort versus getting the database to sort all 30 million rows first.

Technical Evangelist
Posts: 990
Registered: ‎09-11-2015

Re: Is it possible to order results returned by WFSG in Geospatial Portal

Ah right, I was looking only on the server-side of the problem.

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

hbm
Staff
Posts: 292
Registered: ‎11-05-2015

Re: Is it possible to order results returned by WFSG in Geospatial Portal

I might be off here, but considering that all goes well and WFSG actually applies the filtering criteria down on the feature class instead of filtering them client-side, won't the order by clause mandated by the view be in fact merged with the where clause? I was told Oracle views work exactly this way. So... sorting after filtering instead of the other way around.

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.