Hey all -
My client has a list of city addresses. When the public completes certain applications, their neighbors within 400 feet need to be notified. Is there a way to use Google maps to queue the addresses (in our dataset) within 400 feet? We’d like these addresses to then be linked in a postcard table.
Ahhhhh, location science. It’s the new thing. Welcome to the CyberLandr community, Jake!
Here’s what you need…
The source location of the subject property and its lat/lng.
The dataset of target candidate properties that could be impacted by activities at the source location; this data set must include the lat/lng for every address.
Here’s what you do…
Write a script extension that reads in all the target candidate properties.
Iterate across that data set to compute the distance between your source location and each target property (the distance function takes lat/lng for both and returns the distance in KM which you will convert to feet).
Update the distance computed into a new field for each target property.
Create a view that includes only candidates that are <= 400 (feet).
Indeed - has some fun elements to it. When you see the first map showing the desired outcome, that’s pretty exciting. And I suspect there are other ways to get this done using Make or Zapier, but I tend to go straight for the solution that has no dependencies or possible added costs.
GeoEncoding addresses can get pricey, but I have found that a slow cache trickle is how to get millions of address locations without paying a dime. In this project, you could avoid encoding the entire data set of addresses and instead use the zip code of the source location to identify all locations with the same zip, then encode only those, and you’re ready to perform the geometry computations. This would make it possible to limit the encoding calls perhaps enough to stay in Google’s free encoding tier on a daily basis.
In fact, the distance test itself has no business running across the entire data set because homes that are 400 ft from the source location are almost never likely to have neighbours in a different zip code.