Is there a way of actually just loading a known set of files using the
processing script function in QGIS 3.x?  For my task, it isn't simply a
matter of saving a QGIS file and starting up from where I left off.  Every
day (actually twice a day) with QGIS 2.x I would run my start-up script
which would grab our climate model data off the FTP server, convert the
model output files into GeoTIFFs, load those onto a basemap, then grab a
point file that contained observed meteorological data with which I could
create a nudging layer to assimilate into the climate model.

My QGIS 2.x script dialogue box had two entries, one for the beginning
date-time of the model run and another for entering the ending-time.
Trying to grok the new 3.x method of processing scripts, it seems like I'll
have to create a dialogue box entry in the initAlgorithm() function for
every single file I want loaded onto my map document.  Then I have to pipe
each QgsRasterLayer and QgsVectorLayer into a feature sink? Is that correct
or is there a method of simply loading the files?

QgsProject.instance().addMapLayers([xxx,xxx.xxx]) does nothing when the
script I'm working on runs.  The only thing I've managed to load so far is
a vector file, but only by feeding each feature of the vector into
QgsFeatureSink.  That's fine for classroom vectors, but when you start
dealing with millions of polylines or points, that seems like an additional
slow down.

Of all the good that QGIS 3 brings OSGEO, this seems like a really big step
back into user friendliness and clean code. Although, if I'm completely off
base, I will gladly take that back.
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to