2

To add AdressIDs from a point feature layer to noise immission point features (Target, green points)), I need to spatially join immission points (IPs) to addresses (Join Features, red points). The adresses need to share an ID with the (IPs) and be the closest at the same time, because:

  • Joining only based on the shared ID (building ID) will result in faulty joins, since several addressess can have the same ID if a building (blue) has more than one address.
  • Joining based only on the spatial relationship will result in faulty joins, since IPs might be closer to addressess of neighbouring buildings, thus joining with those.

So I need to combine both the spatial and attribute-based join. I found the tool "Join Features (GeoAnalytics)" in this ESRI community thread and it seems perfect. But the tool does not allow for "closest" (The feature in the join features that is closest to a target feature is matched) as match option. However, other any options would, again, result in faulty joins. E.g. "Near" would assign multiple addresses (including different AdressIDs) to IPs with the same building ID. I need "closest" in order to get one unambiguous AdressID per IP.

Can you help me with that challenge?

Screenshot showing a part of the data/maph

2
  • It's difficult to understand the problem, just to clarify am I correct in saying: your blue polygons are buildings (with a building ID), the red points are address with address ID's and you want to attach to each green emission point the the address ID of the nearest red point, whilst constrained by the building polygon?
    – Hornbydd
    Commented Jul 14, 2021 at 16:01
  • @Hornbydd Yes, you are absolutely right. And the solution would be something like the "Join Feature" tool but with a "closest" option for the spatial relationship.
    – jpg
    Commented Jul 15, 2021 at 6:57

1 Answer 1

2

So here is your data with labels so it is easier to understand, for example:

e11 should be attached with address 90 for building 2 and not the nearer 100 in building 3.

Data

A fairly simple model would achieve what you are seeking, here is the main logic:

Model

You loop over the buildings and use that to select the address points and emission points. The spatial join runs on that selection creating a dataset with the new emission points with the closest address point.

Currently the model is dumping these new datasets into a temporary geodatabase and it would be up to you to merge them all back into a single layer. If you don't want the hassle of doing the merge then you need to do a bit of sub-modelling collecting the feature classes and then in a master model simply call the merge tool. Don't know what sub-models are? Time to read the help file!

Final results are:

Results

8
  • 1
    This is great! Thanks @Hornbydd for that procedure. I used the modelbuilder for the first time and built the model. I am currently running it but it takes a while, since I have 30k buildings, 40k adressess and 400k immission points. I will let you know whether it worked. Fingers crossed!
    – jpg
    Commented Jul 15, 2021 at 21:02
  • A trick you could employ is to run another instance of ArcPro and allow 1 ArcPro to process buildings say in the left of your city and the other running on the right of your city, so you are processing in parallel. You just need to select 15K buildings in the first ArcPro and the other 15K in the other ArcPro session. Remember that the iterator will work on existing selections too. Also ensure you data are in file geodatabases and not shapefiles as you get a performance boost with spatial indexing.
    – Hornbydd
    Commented Jul 15, 2021 at 23:29
  • Also if you feel my answer was the solution you should tick as solved, lets others know that a solution was found.
    – Hornbydd
    Commented Jul 15, 2021 at 23:33
  • Its running on a different computer via remote access, so time is not an issue. But I ll keep your trick in mind! Inspired by your model, I am now running a slightly different model with a field value iterator and then "select layer by attribute". I am hoping this could be faster than the selection by location.
    – jpg
    Commented Jul 16, 2021 at 20:29
  • 1
    I ended up making a new model without spatial join. I just snapped the noise point features to the addresses. I selected a subset of addresses prior to running the model. I had to run it 8 times + a ninth time for all noise points, when I discovered that some had miraculously not been snapped despite sharing the right ID.
    – jpg
    Commented Aug 4, 2021 at 6:08

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.