I'm trying to spatial join bus stops and census block groups. However, these are a bit tricky with walking distance. Many bus stops are right on the borders of census block groups or within walking distance of others, as shown below.

enter image description here

I've buffered them 1320 feet (the proper coordinate system is being used) so that each bus stop circle is large enough to touch or cover every census block group that is within walking distance. See below. enter image description here

I want to figure out how to do a one to many spatial join or the equivalent so that, for each census block group, I have a record of each bus stop inside of it or within walking distance of it. I've tried all sorts of combinations within "Join Attributes by Location" and none seem to work. The bus stop layers have individual stopID's and each census block has a GeoID. I'm trying to either get an output that has each census block that is within or intersecting (I think these are the right terms) a bus stop or vice versa. Maybe something else would work better?

Here are parts of the attribute tables for block groups and bus stops respectively. The lon and lat for bus stops are the original points, but they are buffered. enter image description here enter image description here

Update: I tried using field calculator and got this, which still fails.enter image description here

closed as unclear what you're asking by underdark Feb 15 at 18:59

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Maybe this will help you...gis.stackexchange.com/questions/149831/… ? – blabbath Jul 7 '18 at 14:10
  • I'm having trouble figuring out exactly what code to use in the Virtual layer. Editing my post now to include parts of the attribute table – Roc Jul 7 '18 at 14:15
  • Done! I should mention that I'm self taught and have only been using QGIS for 2 months – Roc Jul 7 '18 at 14:20
  • I added in my failed field calculator code – Roc Jul 7 '18 at 15:40
  • From the screenshot you are QGIS 3 user. Is it QGIS 3.0.x? Can you use the latest QGIS 3.2? Join attributes by location has been remodeled to allow one-to-many. – Kazuhito Jul 7 '18 at 20:48