from qgis.core import *
from qgis.utils import *
from qgis.analysis import QgsNativeAlgorithms
from PyQt5.QtCore import QVariant
from qgis.core import QgsApplication, QgsProcessingFeedback, QgsRasterLayer
import sys
sys.path.append('/usr/lib/qgis')
sys.path.append('/usr/share/qgis/python/plugins')
os.environ["QT_QPA_PLATFORM"] = "offscreen"
QgsApplication.setPrefixPath(r'/usr/bin/qgis', True)
qgs = QgsApplication([], False)
qgs.initQgis()
import processing
from processing.core.Processing import Processing
Processing.initialize()
QgsApplication.processingRegistry().addProvider(QgsNativeAlgorithms())
feedback = QgsProcessingFeedback()
processing.run("native:joinattributesbylocation", {'INPUT':r'/home/gis/budynki_opolskie/budynki_opolskie/bdot10k_bubd_a_opolskie.gpkg|layername=bubd_a',
'JOIN':r'/home/gis/adresypolska/PRG_PunktyAdresowe_POLSKA.shp',
'PREDICATE':[1,5],
'JOIN_FIELDS':['PNA','SIMC_id','SIMC_nazwa','ULIC_nazwa','Numer'],
'METHOD':0,
'DISCARD_NONMATCHING':True,
'PREFIX':'',
'OUTPUT':r'/home/gis/zlaczoneopolskie.shp'})
import sys
from qgis.core import *
from qgis.utils import *
from qgis.analysis import QgsNativeAlgorithms
from PyQt5.QtCore import QVariant
from qgis.core import QgsApplication, QgsProcessingFeedback, QgsRasterLayer
sys.path.append('/usr/lib/qgis')
sys.path.append('/usr/share/qgis/python/plugins')
os.environ["QT_QPA_PLATFORM"] = "offscreen"
QgsApplication.setPrefixPath(r'/usr/bin/qgis', True)
qgs = QgsApplication([], False)
qgs.initQgis()
import processing
from processing.core.Processing import Processing
Processing.initialize()
QgsApplication.processingRegistry().addProvider(QgsNativeAlgorithms())
feedback = QgsProcessingFeedback()
processing.run("native:joinattributesbylocation", {
'INPUT': r'/home/gis/budynki_opolskie/budynki_opolskie/bdot10k_bubd_a_opolskie.gpkg|layername=bubd_a',
'JOIN': r'/home/gis/adresypolska/PRG_PunktyAdresowe_POLSKA.shp',
'PREDICATE': [1,5],
'JOIN_FIELDS': ['PNA','SIMC_id','SIMC_nazwa','ULIC_nazwa','Numer'],
'METHOD': 0,
'DISCARD_NONMATCHING': True,
'PREFIX': '',
'OUTPUT': r'/home/gis/zlaczoneopolskie.shp'
})