I have generated random points in qgis and would like to assign the value of their geometry to a unique column in another table. I would like to do this in qgis or postgres or spatialite. Table A contains the random points and geometry. Table B contains non spatial data and an atrribute ogc_fid which is unique. I would love to assign for each unique ogc_fid the geom of one particular feature in Table A. Any ideas of how to do this. I am comfotable with sql
1 Answer
You could add row numbers to the points and then join points and non-spatial table based on row number and ogc_fid (assuming ogc_fid starts with 1).
-
Unfortunatelly the ogc_fid does not start at 1 and is not sequantial. It is a derived column based on postgres window function. Apr 25, 2015 at 14:53
-
-
-
Since table B is a derived one it has more values but the unique features equal the number in random points. Apr 25, 2015 at 20:02