Hi Devs,
I'm trying to get values from an x,y from a mesh layer via PyQGIS.
But I fail to SEE the results. Debugging in QtCreator, I see that there
are results, but apparently they are dropped somewhere?
The code I'm using:
results = [] # iterator 'reference'?
context = QgsIdentifyContext()
context.setTemporalRange(QgsDateTimeRange(begin=QDateTime(2022,11,7,7,0,0),end=QDateTime(2022,11,7,8,0,0)))
# make sure the mesh layer is active layer
# note that the coordinates used are MapCanvas coordinates (???)
# returns QgsMapToolIdentify False in case of NO layer
print(QgsMapToolIdentify(iface.mapCanvas()).identifyMeshLayer(results,
iface.mapCanvas().currentLayer(), QgsPointXY(470208.66, 6766348.44),
context ))
print(results)
This always returns [] (empty list), while debugging c++ in QtCreator I
see there are results.
Am I doing something wrong?
Thanks for any Pointers.
Regards,
Richard Duivenvoorde
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer