I have a database of polygon points as latitude, longitude pairs and I need to test if a given lat,lng point is inside any of the polygons.
There are several algorithms around including these but they don't work if the polygon straddles the antemeridian (off the coast of New Zealand, where longitude flips from +180 degrees East to -180 degrees West).
One solution I see is to detect if the polygon straddles the antemeridian and if so split it into two polygons, one on each side, then check each of them.