USPS Location Caching & Fallback Proof of Concept#7790
USPS Location Caching & Fallback Proof of Concept#7790allthesignals wants to merge 10 commits intomainfrom
Conversation
There was a problem hiding this comment.
We should set up a batch geocoding interface for this instead, to save on network requests.
There was a problem hiding this comment.
We should have it lookup locations by unique combo of address/city/state/zip before geocoding those addresses.... "Upsert" behavior in order to track updates to location hours etc.
There was a problem hiding this comment.
Might be very tricky detecting removed locations. In a given cluster, it could convert to polygons and query for intersecting points, then drop missing points. 🤷
There was a problem hiding this comment.
This is wrong... need to use st_within and st_buffer
There was a problem hiding this comment.
@mitchellhenke yeah, I think so, but it's not included on arel_table as a convenience method. I think writing postgis queries directly is probably the easiest way, but would like to see if i can't leverage those convenience methods:
There was a problem hiding this comment.
interesting, I would have hoped it is!
There was a problem hiding this comment.
Yeah, I think most people probably just do it directly as SQL queries. Not sure what else I get from using these named methods.
3aea376 to
fc2862a
Compare
fc2862a to
a9a7826
Compare
| include RenderConditionConcern | ||
| include UspsInPersonProofing | ||
| include EffectiveUser | ||
| include UspsInPersonProofing |
There was a problem hiding this comment.
This is listed twice.....
f8f8ab3 to
9599826
Compare
There was a problem hiding this comment.
So this is neat and works pretty well... will update when dupe is found based on these constraints.
There was a problem hiding this comment.
Unclear if this makes the uniqueness constraint I added to the migration unnecessary...
There was a problem hiding this comment.
a post office doesn't have an identifier?
There was a problem hiding this comment.
sadly it does not
1553daa to
069f051
Compare
069f051 to
454e636
Compare
0e158bd to
a3300ca
Compare
a3300ca to
e90a619
Compare
| lonlat::geography, | ||
| 'SRID=#{WGS84_SRID};POINT(#{longitude} #{latitude})'::geography, |
There was a problem hiding this comment.
We may want to consider an index along the lines of
CREATE INDEX idx_usps_ipp_cached_locations_lonlat_gist ON
usps_ipp_cached_locations USING GIST (geography(lonlat));
|
Is this prototype still in progress? If not, can we close it out to have fewer open PRs? (we can always re-open later if/when we choose to pick it back up) |
- Code that leveraged this never landed on main (#7790) * Comment out postgis extension migration because postgis was removed from CI image changelog: Internal, Source code, Remove PostGIS references

LG-8508