Im a complete newbie to postgis. I have the following problem:
Got two tables:
- "mp_power_lines_new" -> contains lines of an electricity grid
- "uw.new"-> contains polygons of all substations in this grid
What I need are the osm_id of the substations which are touching each line.
- Go to the first line in "mp_power_lines_new"
- see which substations touch this line
- fill the osm_id of the substation which touches the line in the first column UW_1
- fill the second touching substation in column UW_2 and then UW_3 if there is a third one
- Do this for all rows (lines) in the table "mp_power_lines_new"
Has anyone done something similar or knows a solution?
Aucun commentaire:
Enregistrer un commentaire