Bug report #12906
Spatial Query: silently do not select geometries with errors
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | C++ plugins/Spatial Query | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | wontfix |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 20996 |
Description
New description:
the spatial query tool silently do not select geometries with errors (or at least geometries with some kind of errors), this leads to wrong results and the user is not aware of them.
Old description:
I tired to select the intersecting polygon for the selected line object using intersects function in Spatial Query in QGIS 2.8.2 and also with 2.6.0
I noticed, it is unable to find the intersecting polygon object, if the referenced line object is completely with in the source polygon object.
Attached png is for reference and I believe this issue impacts the Join Attributes by Location functionality in Data Management Tools.
If this is not a relevant forum to report the issue, i kindly request to forward to the concern people/team as I'm new to QGIS and I usually use ArcGIS.
Thanks,
History
#1 Updated by Jukka Rahkonen over 9 years ago
I made a test with one polygon and one line which I digitized with QGIS 2.6.0 but I couldn't reproduce the issue. Could you copy just the one polygon that should get selected and the linestring and attach them to the ticket as WKT or shapefiles?
#2 Updated by Giovanni Manghi over 9 years ago
- Status changed from Open to Feedback
- Category set to C++ Plugins
#3 Updated by Giovanni Manghi over 9 years ago
I also cannot confirm. Attaching sample data would be very appreciated.
#4 Updated by Nag R over 9 years ago
- File New.png added
- File sample.rar added
Sample data is attached.
I reproduced the issue using this data set.
Thanks
#5 Updated by Giovanni Manghi over 9 years ago
Nag R wrote:
Sample data is attached.
I reproduced the issue using this data set.
Thanks
the polygon has some kind of geometry issue. If you clean it (I usually use v.clean in the Processing toolbox) then the the spatial query tool works. I would not call this a bug, eventually I would open a feature request asking qgis to be more forgiving with such geometries.
#6 Updated by Jukka Rahkonen over 9 years ago
Oh what a beautiful polygon! It has one self-intersection at
POINT (-125.25977653693093 48.92186621734039). I tried to correct the error by digitizing but it was not easy and I quit.
#7 Updated by Nag R over 9 years ago
- File Result_in_ArcGIS.png added
Yes, in my research most of the times i deal with this type of complex data sets and some times i see difficulty using QGIS.
Select by Location in ArcGIS working correctly for this data set.Attached snapshot is for reference.
It looks something really to be tuned in QGIS to handle this sort of issues.
Thanks,
#8 Updated by Giovanni Manghi over 9 years ago
- Status changed from Feedback to Open
- Affected QGIS version changed from 2.8.2 to master
- Subject changed from Spatial Query - Intersects Function to Spatial Query: silently do not select geometries with errors
It looks something really to be tuned in QGIS to handle this sort of issues.
I edited the title to better describe the issue.
#9 Updated by Jakob Hvitnov over 9 years ago
Using the QGIS geoalgorithm "Select by location" from the processing toolbox works as expected. As I understand it these algorithms are set to replace the ftools versions that are now accessible in the menus, so I am unsure whether this issue will be solved once ftools are no longer used.
Can anyone confirm this?
#10 Updated by Nag R over 9 years ago
- File Select_By_Location.png added
I tried with geoalgorithm "Select Bylocation" from processing toolbox and it doesn't work for this data set. Attached image is for reference.
Actually, i noticed the reported issue while I'm using "Join Attributes by Location" in data management tools. For some Lines it was not updated the attribute. I verified those lines using the intersects function in Spatial Query. It didn't work. I thought "Join Attributes by Location" function internally calling/using the intersects function in Spatial Query.
Thanks
#11 Updated by Jakob Hvitnov over 9 years ago
ok. I cannot confirm the issue using the attached dataset on 2.8.2 (ubuntu 14.04) and applying the algorithm from the processing toolbox. However I do see the issue when using ftools.
#12 Updated by Jürgen Fischer over 8 years ago
- Category changed from C++ Plugins to C++ plugins/Spatial Query
#13 Updated by Giovanni Manghi over 7 years ago
- Easy fix? set to No
- Regression? set to No
#14 Updated by Alexander Bruy over 6 years ago
- Status changed from Open to Closed
- Description updated (diff)
Spatial Query removed from master and Processing works fine. Please reopen if necessary.
#15 Updated by Giovanni Manghi over 6 years ago
- Resolution set to wontfix