I think that converting data into SpatiaLite in this case may be a good idea, even shapefiles do support simple BBOX queries with spatial index if spatial index is created (the .qix or .sbn/.sbx files) and you can run your query with ogr2ogr also against the shapefile by using the SQLite SQL dialect. https://gdal.org/user/sql_sqlite_dialect.html.
You should ...
Index the shapefile with:
ogrinfo -sql 'CREATE SPATIAL INDEX ON "layername"' shapefile.shp
To get the layer name, if you don't know it, use:
1: 2019 Lines (Line String)
This means the first layer in the file is "2019 lines" and it's a linestring. The query is run on the layer, not the file. The file is ...
I would do it like that :
Don't charge the layers in your project. It will save you a lot of time.
Use the tool mergevectorlayer to merge all the geojson layer. You can select a folder directly to make this quick. If there is a bug due to the number of layer try to split the work in different folders.
Save your result on a layer in shp file or geopackage. (...
The GDAL library (available in QGIS) can give you a GeoTransform from a file. Apply it to your x,y data. Example below.
A function in a loop is probably what you are looking for.
import shapely.wkt as wkt
from shapely import affinity
from osgeo import gdal, ogr, osr
# make the transform parameters and ...