How to get Memory layer dispalyed in Vector Panel List using Pyqgis?

by ps1   Last Updated May 15, 2019 21:22 PM

I have two point layer in my Project Centroid.shp and Nodes.shp.I have used Distance Matrix to find nearest Nodes point from Centroid Point. I have saved the output in FinalDistance.csv. The FinalDistance.csv contain centroid point number, node point number and distance. No other X and Y coordinates of any of the point layer is stored in csv file. but later I realized I need to do some Sql processing in this final distance, so I tried to save as memory layer. But I couldn't get this memory layer in my Layers Panel. However when I execute manually I always get "FinalDistance" named memory layer in panel. Or is there any way of importing csv file without having x and y cordiantes info in it.

   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:' })


Related Questions


Updated August 25, 2017 05:22 AM

Updated January 31, 2018 19:22 PM

Updated September 10, 2018 09:22 AM

Updated September 01, 2018 18:22 PM