0

The example I am showing is a VERY simplified version of my dataset which actually represents 100's of points. I have point A representing a building (centroid of the building polygon), but no other relative attribute info. Point B contains the address attribute information for that building.

enter image description here

Looking at the simplified table info, there isn't anything relatable between the two layers, other than they are fairly close to each other. Is there a spatial query I can create that would join these two tables, maybe somehow based on the X coordinates being with a few hundreds in distance from each other or maybe create a buffer in GIS? I don't really know much about creating SQL queries, so honestly I really don't know where to start.

enter image description here

2
  • 2
    You stated that the points were in the polygons. Surely that would qualify as a Within relationship. What have you tried? Where are you stuck? Please Edit the Question.
    – Vince
    Commented Dec 10, 2023 at 3:58
  • 1
    Need more information, does every point have a relation? If so you could join by nearest
    – ferus89
    Commented Dec 10, 2023 at 12:23

1 Answer 1

0

With a few hints from the comments, here is what I did to solve the task: enter image description here

Starting with the two original layers: (1) Buildings = polygons, which have no other project related data, but do have osm_id. (2) Addresses, which hold relivant project data, but are in point format enter image description here

From the Processing Tools, I used Join attributes by nearest and used the 2 layers above for the 2 required inputs. This created a new layer named 'Joined layer'

This gave me all the attribute data, but in point form on the map, so I did a join for the Building (polygon) layer to the newly created 'Joined layer', using the osm_id attribute for each layer as a primary key enter image description here

Which resulted in the original Buildings, shown as polygons, now having address information associated with them

enter image description here enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.