[QGIS-Developer] Loading WFS layers from GeoServer

Andrea Aime andrea.aime at geo-solutions.it
Fri Nov 27 07:32:59 PST 2020


Hi Paul,
the preview does not need to do paging. Paging without a sort key is
allowed only if there is a "natural sorting", that is, a key column
that can be used to ensure the paging is stable (e.g, you don't get the
same feature twice while going through pages).
Go to your SQL view definition and make one or more columns as the source
of the unique identifier

Cheers
Andrea


On Fri, Nov 27, 2020 at 4:14 PM Paul Wittle <
paul.wittle at dorsetcouncil.gov.uk> wrote:

> Hi,
>
> I was using the 32 bit version (don't ask) but I've just tried it in the
> 64bit version (although 3.10) with the network logger installed and the
> errors read:
>
> java.lang.RuntimeException: Failed to get property: {
> http://www.opengis.net/wfs/2.0}boundedBy Failed to get property: {
> http://www.opengis.net/wfs/2.0}boundedBy java.io.IOExceptionCannot do
> natural order without a primary key, please add it or specify a manual sort
> over existing attributes
>
> The datasource is GeoServer but GeoServer is connecting to a view in SQL
> Server where the first table in the view is a table with a primary key and
> spatial index.
>
> However I don't really understand because requesting the data in the
> GeoServer layer preview works fine so I assume QGIS is asking something the
> layer preview does not?
>
> Thanks,
> Paul
>
> -----Original Message-----
> From: Richard Duivenvoorde <rdmailings at duif.net>
> Sent: 27 November 2020 15:00
> To: Paul Wittle <P.Wittle at dorsetcc.gov.uk>; qgis-developer at lists.osgeo.org
> Subject: Re: [QGIS-Developer] Loading WFS layers from GeoServer
>
> Hi Paul,
>
> QGIS 3.16 (well, since ... I don not know exactly) has s
> NetworkLogger/Debugger.
> If you hit the F12 button, you will see all WFS-requests that QGIS is
> firing to the server.
> You can 'replay' these in a browser, and see if it returns valid GML (as
> in: save it to disk and then try to open it as vector data).
> Normally QGIS starts with a GetCapabilities request, then a DescribeLayer
> and then a GetFeature. You need that last one.
> In the Network Debugging window you can also see if the server maybe
> returns an error code (as: not 200).
>
> Does the Geoserver-layer preview work? As in can you see the layers there?
>
> Normally WFS/WMS from Geoserver play pretty well together with QGIS.
> Is there something special to the data? (curves, nonvalid geometries, ???)
>
> Regards,
>
> Richard Duivenvoorde
>
>
>
> On 11/27/20 3:48 PM, Paul Wittle wrote:
> > Hi,
> >
> >
> >
> > So the WFS layers do now return correctly from GeoServer in both WMS and
> all WFS formats and I’ve improved various indexes.
> >
> >
> >
> > I also found a plugin called WFS 2.0 Client and tried that; it returned
> the features successfully.
> >
> >
> >
> > Unfortunately that seems to be a one off download method rather than
> adding a live linked layer so it didn’t fix the issue but did prove that
> the GeoServer can return features.
> >
> >
> >
> > I’m still having the same trouble when trying to add the layers to QGIS
> 3.10 though; it just adds a layer with the image icon but of course it
> can’t draw the layer and it loads as a bad layer if you save it in the
> project.
> >
> >
> >
> > Does anyone have any suggestions of what might be the issue?
> >
> >
> >
> > The server does require authentication.
> >
> >
> >
> > Thanks,
> > Paul
> >
> >
> >
> >
> >
> > *From:*Ian Turton <ijturton at gmail.com>
> > *Sent:* 27 November 2020 09:59
> > *To:* Paul Wittle <P.Wittle at dorsetcc.gov.uk>
> > *Cc:* qgis-developer at lists.osgeo.org
> > *Subject:* Re: [QGIS-Developer] Loading WFS layers from GeoServer
> >
> >
> >
> >
> >
> >
> >
> > On Fri, 27 Nov 2020 at 09:48, Paul Wittle <
> paul.wittle at dorsetcouncil.gov.uk <mailto:paul.wittle at dorsetcouncil.gov.uk>>
> wrote:
> >
> >     Hi,
> >
> >
> >
> >     I’m trying to load some WFS layers from my internal GeoServer into
> QGIS 3.10 and 3.16. The datastore in GeoServer is based on a view in a SQL
> Server database but it does have a primary key on the spatial table at
> least.
> >
> >
> >
> >     When I load it in 3.10 it comes in as the image icon (i.e. doesn’t
> load) so I thought I’d try it in the latest version and in that version
> QGIS just disappears (completely crashes).
> >
> >
> >
> >     Has anyone else had a similar problem and can help me work out how
> to get the layers to load? I suspect the issue is the way the view is
> configured in SQL Server however I also wonder if I need to investigate the
> 3.16 crash and potentially log that as a bug as it is not handling the
> crash with the normal message the application just closes without warning?
> >
> >
> >
> >
> >
> > Can you check if GeoServer is returning GML or an error message when you
> make a WFS request? But I don't think that QGis should crash no matter what
> is in the response.
> >
> >
> >
> > Ian
> >
> >
> >
> > This e-mail and any files transmitted with it are intended solely for
> > the use of the individual or entity to whom they are addressed. It may
> > contain unclassified but sensitive or protectively marked material and
> > should be handled accordingly. Unless you are the named addressee (or
> > authorised to receive it for the addressee) you may not copy or use
> > it, or disclose it to anyone else. If you have received this
> > transmission in error please notify the sender immediately. All
> > traffic may be subject to recording and/or monitoring in accordance
> > with relevant legislation. Any views expressed in this message are
> > those of the individual sender, except where the sender specifies and
> > with authority, states them to be the views of Dorset Council. Dorset
> > Council does not accept service of documents by fax or other
> > electronic means. Virus checking: Whilst all reasonable steps have
> > been taken to ensure that this electronic communication and its
> > attachments whether encoded, encrypted or otherwise supplied are free
> > from computer viruses, Dorset Council accepts no liability in respect
> > of any loss, cost, damage or expense suffered as a result of accessing
> > this message or any of its attachments. For information on how Dorset
> > Council processes your information, please see
> > www.dorsetcouncil.gov.uk/416433
> >
> > _______________________________________________
> > QGIS-Developer mailing list
> > QGIS-Developer at lists.osgeo.org
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
>
> This e-mail and any files transmitted with it are intended solely for the
> use of the individual or entity to whom they are addressed. It may contain
> unclassified but sensitive or protectively marked material and should be
> handled accordingly. Unless you are the named addressee (or authorised to
> receive it for the addressee) you may not copy or use it, or disclose it to
> anyone else. If you have received this transmission in error please notify
> the sender immediately. All traffic may be subject to recording and/or
> monitoring in accordance with relevant legislation. Any views expressed in
> this message are those of the individual sender, except where the sender
> specifies and with authority, states them to be the views of Dorset
> Council. Dorset Council does not accept service of documents by fax or
> other electronic means. Virus checking: Whilst all reasonable steps have
> been taken to ensure that this electronic communication and its attachments
> whether encoded, encrypted or otherwise supplied are free from computer
> viruses, Dorset Council accepts no liability in respect of any loss, cost,
> damage or expense suffered as a result of accessing this message or any of
> its attachments. For information on how Dorset Council processes your
> information, please see www.dorsetcouncil.gov.uk/416433
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>


-- 

Regards, Andrea Aime

== GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf
Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa
(LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549
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.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20201127/d7452365/attachment-0001.html>


More information about the QGIS-Developer mailing list