Timeline for Check if polygon intersects with coordinates in a .csv file with PyQGIS standalone script
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 13, 2020 at 16:27 | vote | accept | DGIS | ||
Jul 13, 2020 at 16:18 | comment | added | DGIS | Thanks, I will look into it. Your first suggestion works fine and I think its fast enough actually. I'll still check the QgsRectangle option though. | |
Jul 13, 2020 at 16:17 | vote | accept | DGIS | ||
Jul 13, 2020 at 16:26 | |||||
Jul 13, 2020 at 14:57 | comment | added | Germán Carrillo | Well, you could also read each file, parse its coordinates (or perhaps just use the numpy method you mentioned), then make sure you create a proper extent (QgsRectangle) for your csv points, and finally check the intersection. In fact, you could also test the intersection against the BBOX of your polygon to make things a bit faster (that could be done even without a csv BBOX, just dealing with numbers). How to build a QgsRectangle is described here, if that's what you were looking for initially. | |
Jul 13, 2020 at 14:32 | comment | added | DGIS | Thanks for the advice, I will try that. However, do we know anything about the time cost it takes to convert text to QgsVectorLayer objects? I was hoping to keep the text format to keep computation time as low as possible. | |
Jul 13, 2020 at 13:54 | history | answered | Germán Carrillo | CC BY-SA 4.0 |