Hi,

This is interesting, but is not clear to me to which parts of the code you are referring too: are you using GeoServer integrated with GeoTools ? are you referring to GeoTools WFS client ? are you referring to GeoTools WFS data store ?

A WFS 2.0.0 GetFeature operation send to GeoServer with the startIndex parameters works as expected:
https://demo.geo-solutions.it/geoserver/tiger/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=tiger%3Atiger_roads&startIndex=3

Regards,

Nuno Oliveira

On 09/12/2018 09:22 AM, Nick Griffiths wrote:

Hi list,

I've been looking at paging through features from a WFS server using the
gt-wfs-ng plugin (v0.19.2) as well as geoserver 2.13.1.  I've hit some
issues, so I guess I'm looking for some kind of "Yeah, we know, patches
welcome" or "You're doing it wrong" or some other kind of statement
before I start patching things all over the shop.

I set up a test to page through some features, adding the feature ids to
both a set and a list, to check whether it was paging through properly
(a mismatch in collection size would mean the ids aren't unique and
something is fishy).

The first issue I came across, after skimming through the specs, blog
posts, and eventually the source, was that there's no support for
startIndex in the WFS 2.0 strategy and surrounding code.  This was
easily fixed, and seemed to sort things on the client side - I can see
the startIndex and count going through in the GetFeatures request over
the wire.

Once that was sorted, I had issues with trying to page through a large
shapefile (2 million rows), so I imported this in to postgis, as I
assumed this would be more suited to this kind of operation.   This
seemed seemed to fix things, although I was initially getting a mismatch
in size between collections, possibly down to the haphazard way I added
the layer in to geoserver -  My initial import didn't add a primary key,
I added one after publishing the layer.  A geoserver restart stopped
this from happening again, so I've put this down to a possible bug in
the feature type reloading code.  Moving on, but a little but worrying.
I might try and turn on some logging somewhere to validate the SQL
that's being generated (or try and get a breakpoint in there).

So if this all sounds plausible, I'll prepare a patch for the startIndex
support on the WFS client code, and I'd also like to submit some docs on
'how to' and touch on some of the issues I came across, to ease the path
of other weary travellers - I just need to know where to put it!

Cheers,
Nick

PS Sorry if this is rambling, it's getting late...




--
Regards,
Nuno Oliveira
==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.
==

Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati
personali (Reg. UE 2016/679 - Regolamento generale sulla
protezione dei dati “GDPR”), si precisa che ogni
circostanza inerente alla presente email (il suo contenuto,
gli eventuali allegati, etc.) è un dato la cui conoscenza
è riservata al/i solo/i destinatario/i indicati dallo
scrivente. Se il messaggio Le è giunto per errore, è
tenuta/o a cancellarlo, ogni altra operazione è illecita.
Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to
which it is addressed and may contain information that
is privileged, confidential or otherwise protected from
disclosure. We remind that - as provided by European
Regulation 2016/679 “GDPR” - copying, dissemination or
use of this e-mail or the information herein by anyone
other than the intended recipient is prohibited. If you
have received this email by mistake, please notify
us immediately by telephone or e-mail.



_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to