Re:Stop Using Zip Codes for Geospatial Analysis (2019)
by ajfriend on Friday February 07, 2025 @12:40PM
(#42975313)
It depends on if you want to model a point or an area. lat/lng gives you a point, but you often want an area to, for example, count how many people are in that area. A spatial index like H3 provides a grid of area units.
Re:Stop Using Zip Codes for Geospatial Analysis (2019)
by HappMacDonald on Friday February 07, 2025 @01:37PM
(#42975945)
But so do lat long ranges.
Re:Stop Using Zip Codes for Geospatial Analysis (2019)
by ajfriend on Friday February 07, 2025 @04:08PM
(#42977499)
You can use those if they work for your application. One downside would be that you're storing 4 numbers compared to a single `int64` index with H3.
You also have to decide how you'll do that binning. Can bins overlap? What do you do at the poles? H3 provides some reasonable default choices for you so don't have to worry about that part of your solution design.
Re:Stop Using Zip Codes for Geospatial Analysis (2019)
by ww520 on Friday February 07, 2025 @02:08PM
(#42976259)
Lat/lon is in a spherical coordinate. It’s more complicated to do calculation.
Btw. I have a need recently to compute the shortest distance from a point to a line defined by two points, all in lat/lon. Anyone has any lead on how to do it?
Use Addresses Use Census Units Use your own Spatial Index
Why not lat, long?