Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from qgis.core import *
- from qgis.utils import *
- import os, sys
- QgsApplication.setPrefixPath("C:/OSGeo4W64/apps/qgis", True)
- app = QApplication([], True)
- QgsApplication.initQgis()
- sys.path.append('C:/OSGEO4~1/apps/qgis/python/plugins')
- from processing.core.Processing import Processing
- Processing.initialize()
- from processing.tools import *
- layer1 = "path/to/point_shapefile.shp"
- layer2 = "path/to/polygon_shapefile.shp"
- result = "path/to/output_shapefile.shp"
- general.runalg("qgis:joinattributesbylocation", layer1, layer2, u'intersects', 0, '', 1, result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement