1

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

asked Apr 25, 2015 at 14:17

1 Answer 1

1

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).

answered Apr 25, 2015 at 14:35
4
  • Unfortunatelly the ogc_fid does not start at 1 and is not sequantial. It is a derived column based on postgres window function. Commented Apr 25, 2015 at 14:53
  • Then add a row number in postgres Commented Apr 25, 2015 at 15:02
  • Are there more points in table a than table b or equal numbers? Commented Apr 25, 2015 at 19:00
  • Since table B is a derived one it has more values but the unique features equal the number in random points. Commented Apr 25, 2015 at 20:02

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.