I have around 6000 geoJson files that I would like to import each, change the feature colors and background color, and export as just images (png/jpeg/etc doesn't matter).
So some pseudocode
for geoJsonFile in geoJsonDir loadIntoQGIS(geoJsonFile) changeSomeFeatures() exportAsPNG()
I found the exportAsPNG() but I get an AttributeError that QgsApplication does not have exportItemsPNG()...so I guess it's not actually in the standard API?
Here is my basic code I have right now to try and load one geoJSON and save it...
from qgis.core import * # create a reference to the QgsApplication, setting the # second argument to False disables the GUI qgs = QgsApplication(, False) # load providers qgs.initQgis() vlayer = QgsVectorLayer("my_geojson.geojson","my_geojson_vector","ogr") qgs.exportItemsPNG() qgs.exitQgis() print("I guess it worked?")