zlacker

[parent] [thread] 0 comments
1. ChrisM+(OP)[view] [source] 2025-05-21 01:31:40
Well, 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.

[go to top]