[QGIS-Developer] QGIS vs GEOS validity check

Bourdon, Jean-François (DIF) Jean-Francois.Bourdon at mrnf.gouv.qc.ca
Tue Aug 1 09:07:14 PDT 2023


[Intranet logo]

Just for posterity, here is the link to the QGIS documentation explaining the various error messages that we can get when using the GEOS and QGIS methods for the validity checker: https://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#types-of-error-messages-and-their-meanings
Or for the current LTR: https://docs.qgis.org/3.28/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#types-of-error-messages-and-their-meanings


Jean-François Bourdon, ing.f.
Analyste en télédétection
Direction des inventaires forestiers
Ministère des Ressources naturelles et des Forêts
5700, 4e Avenue Ouest, local A-108
Québec (Québec) G1H 6R1
Téléphone : 418 627-8669, poste 704304
jean-francois.bourdon at mrnf.gouv.qc.ca
mrnf.gouv.qc.ca

-----Message d'origine-----
De : Bourdon, Jean-François (DIF)
Envoyé : 7 juin 2022 15:30
À : Jeff McKenna <jmckenna at gatewaygeomatics.com>
Cc : qgis-developer at lists.osgeo.org
Objet : RE: [QGIS-Developer] QGIS vs GEOS validity check

Thanks Jeff, I'll ask on the GEOS mailing list for their validity check. However, what about the QGIS specific validity check? Any hint on what is done differently?


Jean-François Bourdon, ing.f.
Analyste en télédétection
Direction des inventaires forestiers
Ministère des Forêts, de la Faune et des Parcs 5700, 4e Avenue Ouest, local A-108 Québec (Québec) G1H 6R1 Téléphone : 418 627-8669, poste 704304 jean-francois.bourdon at mffp.gouv.qc.ca
mffp.gouv.qc.ca

-----Message d'origine-----
De : QGIS-Developer <qgis-developer-bounces at lists.osgeo.org> De la part de Jeff McKenna via QGIS-Developer Envoyé : 4 juin 2022 06:34 À : qgis-developer at lists.osgeo.org Objet : Re: [QGIS-Developer] QGIS vs GEOS validity check

Hi JF,

Regarding GEOS, please consider asking for more details through the project's vibrant forum (subscribe at
https://lists.osgeo.org/mailman/listinfo/geos-devel ), I know there was a big release made yesterday and some chatter (project home:
https://libgeos.org/ )  GEOS is one of those core libraries, who would greatly appreciate your direct feedback.

PS. hello from the east coast

Thanks,

-jeff



--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training co-founder of FOSS4G
http://gatewaygeo.com/



On 2022-06-03 4:25 p.m., Bourdon, Jean-François (DIF) via QGIS-Developer
wrote:
> Intranet logo
>
> Hi Devs,
>
> I had a surprising issue with a specific vector layer and a clip
> operation. Validity check of the geometries seem to be done
> differently if native:clip is used inside a processing script or
> manually through the GUI as a vector layer containing a linestring
> with duplicate node like LINESTRING ((0 0, 1 0, 1 0))  won't cause an
> issue when the clip is done with the GUI but will halt if done inside
> a processing script (on QGIS 3.22.6).
>
> Also, if I run */qgis:checkvalidity/* with the *GEOS* method, no error
> is found, but if I run it with the *QGIS* method, it finds one error
> (/line 1 contains 2 duplicate nodes starting at vertex 2/). So here
> are my questions: what exactly is checked when using the GEOS method
> and what is checked using the QGIS method? Also, do all processing
> tools
> (qgis: and native: ones) use the same kind of check?
>
> I didn't find anywhere the details of what would be considered an
> error according to the "QGIS spec". Is it documented somewhere or do I
> need to look for hints inside the source code? As for the GEOS method,
> I only found some error examples in the PostGIS documentation and in a
> FME page
> (https://com/
> munity.safe.com%2Fs%2Farticle%2Finvalid-ogc-geometry-examples&data
> =05%7C01%7Cjean-francois.bourdon%40mffp.gouv.qc.ca%7C334dac66b1924017a
> d1b08da4615caf3%7C8705e97737814f4790e1c84c8b884da1%7C0%7C0%7C637899356
> 658306764%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi
> LCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=iAvp2%2FdNUCB
> jYFdhKug6dNgJSEYn495pZUPbjv9RUdA%3D&reserved=0
> <https://community.safe.com/s/article/invalid-ogc-geometry-examples>).
> Is there an official documentation of what geometries are invalid
> regarding GEOS?
>
> Thanks a lot for any pointer
>
> *Jean-François Bourdon, ing.f.*
>
> *Analyste en télédétection*
> *Direction des inventaires forestiers* *Ministère des Forêts, de la
> Faune et des Parcs* 5700, 4^e Avenue Ouest, local A-108 Québec
> (Québec) G1H 6R1 Téléphone : 418 627-8669, poste 704304
> *_jean-francois.bourdon at mffp.gouv.qc.ca_*
> *mffp.gouv.qc.ca* <http://www.mffp.gouv.qc.ca/accueil.jsp>
>
>



_______________________________________________
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


More information about the QGIS-Developer mailing list