Sunday, 4 March 2018

How to ignore invalid geometries in performing spatial join in QGIS 3.0?



I am attempting to perform a very simple join attributes by location between two shapefiles in the same projection. When I run it, I get an error message indicating that the algorithm could not be run because of errors in geometry. It further states that I can ignore errors by choosing that option. But I don't see that option in the window to run spatial join.


Error message [running a French QGIS here]:



L'entité (1771) a une géométrie non valide. Veuillez réparer la géométrie ou modifier le paramètre de traitement dans l'option "Ignorer les fonctionnalités d'entrée non valides". Execution failed after 2.58 seconds



Screenshot of options for running join by location:



enter image description here


One of the shapefiles (the target shapefile) has features where one polygon is located inside the other polygon. (When I run validate geometry, the error messages look like this: Le polygone 2 est à l'intérieur du polygone 0 [Polygon 2 is inside polygon 0].) This isn't an geographical "error" in the sense that a single feature in the database has some smaller polygons within larger polygons that should be considered a single feature and should not be considered as two separate features in the data table. Thus, I can't "fix" the geometry error without creating a database error. As mentioned in this post, this is common in my file and difficult to work around.



Answer



From Settings -> Options -> Processing tab, expand out the General setting.


Look for "Invalid features filtering" and set it to "Do not filter"


enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...