Hi,
Just by way of finality:
The CRS of the polygon SHP was not what it was purported to be.
I found that the .prj file was invalid when opening it in QGIS - maybe
next time I will first look at the maps I am given, rather than just
dive into python scripting.
All working as expected, now.
T
So as updated plan-of-attack as below.
lyr_poly = QgsVectorLayer(poly_shp, '', 'Ogr') lyr_poly_si =
QgsSpatialIndex(lyr_poly.getFeatures(),
flags=QgsSpatialIndex.FlagStoreFeatureGeometries) # EPSG:4326 point =
QgsPointXY(lon, lat)
point_rect = QgsGeometry.fromPointXY(point).
Ah - bad explanation on my part. [apologies]
I have the coordinates from a spreadsheet and I am busy making the Point
SHP (but wanting some attribute values from underlying polygons)
On 2024/08/25 18:47, oisin.kelly.wild--- via QGIS-User wrote:
For the point layer create a calculated field usi
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 writes:
Hi,
I'm doing my "once a year need to do s
For the point layer create a calculated field using overlay_within() function.
Oisin
07570 977449
Get BlueMail for Android
On 25 Aug 2024, 16:07, at 16:07, Greg Troxel via QGIS-User
wrote:
>Zoltan Szecsei via QGIS-User writes:
>
>> Hi,
>> I'm doing my "once a year need to do something in p
Zoltan Szecsei via QGIS-User 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 qu
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 underl