[Qgis-user] Python code to select polygon at location

Zoltan Szecsei zoltans at geograph.co.za
Sun Aug 25 08:10:26 PDT 2024


It's part of a much longer python script doing a bunch of other stuff, 
so to now change the flow to incorporate postgis is not really an option.
(but thanks)


On 2024/08/25 18:07, Greg Troxel via QGIS-User wrote:
> Zoltan Szecsei via QGIS-User <qgis-user at lists.osgeo.org> writes:
>
>> Hi,
>> I'm doing my "once a year need to do something in python with QGIS" :-/
>> Using QGIS 3.38 and PyCharm.
>>
>> I have a SHP file with 28000 polygons.
>> Another SHP file with 22000 Points
>> Both in EPSG:4326
>>
>> Without using QGIS processing, what is the quickest way to, for each
>> point 1 by 1, find the underlying polygon and read the attribute field
>> values of that polygon?
> Load it into postgis and write a select statement?
> _______________________________________________
> QGIS-User mailing list
> QGIS-User at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

-- 

=============================================
Zoltan Szecsei GPrGISc 0031
Director, Geograph (Pty) Ltd.
GIS and Photogrammetric Services

Cape Town, South Africa.

Mobile: +27-83-6004028 (Signal, not WhatsApp)
         +974-5058-8729
         +36-20-4808362

www.geograph.co.za
=============================================



More information about the QGIS-User mailing list