Skipping Google Lens: geolocating an island with triangle geometry and a GPU
A solver tackled Sofia Santos’s ‘gralhix 004’ OSINT challenge — identify a resort island from a single photo — by refusing the obvious reverse-image-search shortcut and reconstructing the location from first principles instead. With the image stripped of any useful metadata (no EXIF, no GPS), the approach reduced the scene to a geometric fingerprint: the three visible landmasses form a triangle, and the relative distances, side lengths, and the angle at the smallest islet become a signature that can be matched anywhere on Earth, searched with a ±20% tolerance to absorb imprecise clicking.
The matching runs against OpenStreetMap’s 882 MB global coastline polygon set. A cascade of intuition-driven filters trims the search space — a tropical latitude band (141,131 polygons), a neighbor-density cap to exclude crowded reefs and archipelagos (51,576), and a clustering pass requiring at least three nearby points (23,500 clusters). Every three-point combination inside each cluster becomes a candidate triangle, producing roughly 80.7 million triples. Each is handed to a single CUDA thread on an RTX 3050, which sorts the points by area, uses a 2D cross-product sign to orient them, and checks the angle and ratio against the fingerprint — the whole kernel finishing in about 204 ms, with 158,784 passing.
Post-processing tightens the funnel further: deduplication collapses overlapping cluster hits to 8,915 unique triples, and an ‘open water’ test — projecting a rectangle on the empty side of the islet and rejecting any candidate with land intruding — cuts that to 948. A final shape stage scores each islet’s roundness via the Polsby-Popper compactness metric to isolate genuine coral cays. Beyond the specific answer, the writeup is a tidy demonstration of turning a reverse-image-search puzzle into a brute-force geometry problem that GPU parallelism makes tractable, built entirely on open geospatial data.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.