Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. processing.run("qgis:distancematrix",{ 'INPUT' : 'C:/Final Demand Allocation/centroid.shp', 'INPUT_FIELD' : 'HMINNODE', 'TARGET' : 'C:/Final Demand Allocation/Test/Proposed_Nodes.shp', 'TARGET_FIELD' : 'id', 'MATRIX_TYPE' : 0, 'NEAREST_POINTS' : 1, 'OUTPUT' : 'memory:' })
  2.  
  3. uri = "file:///C:/Final Demand Allocation/finalDistance.csv?delimiter=,&crs=epsg:4326"
  4. vlayer = QgsVectorLayer(uri,'finalDistance','delimitedtext')
  5. QgsProject.instance().addMapLayer(vlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement