2 ms·
I recently had this issue with an Android app I made, it was surprisingly difficult to resolve. I ended up going with some OpenStreetMap mirror endpoint for my
by OsrsNeedsf2P 1y ago
I recently had this issue with an Android app I made, it was surprisingly difficult to resolve. I ended up going with some OpenStreetMap mirror endpoint for my solution
- ChrisMarshallNY 1y agoWell, I looked at all kinds of “clever” approaches, and kept coming back to needing to use a map. I found a project that is under active development, that generates a very precise shapefile, and figured out how to use it. I load a database, as opposed to doing shapefile parsing on the fly, for performance reasons. The magic juice is the domain rect. It’s a superfast triage, that gets us into the ballpark, and then I use a fast winding number test, to get precise. I think that I could probably do a whole lot to optimize it, but PHP/SQL is not my forte, so I kept it simple. It works great for the manner in which I use it. The unit tests have a lot of points, close together, on either side of a TZ boundary. The edges are where the Devil lives.