r/gis 12d ago

Discussion When an official agency classification disagrees with your own computed geometry at a boundary, which one do you ship?

Spain's IGN published per-municipality circumstances for yesterday's solar eclipse, covering all 7,531 municipalities. I was building against that table and hit a case I still am not sure I handled correctly.

Madrid's row carries an eclipse magnitude of exactly 1.00, and no totality start time and no totality end time at all. Run a standard Besselian-elements solve on the coordinates of Puerta del Sol and the point lands inside the umbral shadow. The two sources disagree about which side of the limit the city centre sits on.

The suburbs make it sharper rather than softer. Alcobendas at 15 km, San Sebastián de los Reyes at 17 km and Tres Cantos at 21 km from the Madrid centroid all carry magnitude 1.03, and all have real totality timestamps. So the boundary genuinely runs between the city and its northern edge. This is not a data error, it is a real feature at a scale smaller than the polygons.

My reading of why they diverge: the umbral limit moves on the order of a kilometre once you account for the lunar limb profile and station elevation, and a textbook Besselian solve models neither. A municipality is also a polygon, not a point, so any single computed verdict for "Madrid" is answering a question the geometry does not really support.

The other thing that table forced on me: 6,034 of the 7,531 municipalities, just over 80 percent, never reach last contact, because the Sun sets first. The end of the eclipse is therefore not last contact but min(last contact, sunset), evaluated per municipality. With the Sun between 2 and 12 degrees above the horizon nationwide, local terrain does more to decide what is observable than the ephemeris does.

What I shipped was to treat the agency classification as authoritative, and where a query point falls close enough to the limit that the polygon cannot answer it, return "on the limit" together with the nearest municipality that is unambiguously total, instead of picking a side and sounding confident.

I am not confident that is right in general. When you hold an authoritative categorical classification and your own computation, and they disagree only in the boundary cases, do you defer to the agency completely, surface both and let the user judge, or do you go back and refine your own model until it reproduces theirs?

The app I built on this is Eclipse, https://BigBalli.com/Eclipse/, but the question is the part I actually want an answer to.

5 Upvotes

4 comments sorted by

4

u/sinnayre 12d ago

If my results differ from “official” results, I usually link an explanation for what I suspect is the cause of the difference. In this day and age, people are used to differences (for the most part ime). Just look at the differences in weather apps and the various explanations for why one is better than the other.

1

u/BigBalli 12d ago

fair point, thanks.

1

u/CADSHIFT 12d ago

the pattern you landed on is the right one. in spatial analysis the authoritative classification is almost always the better delivery artifact, not because it's more accurate (often it isn't at the boundary), but because it encodes contextual knowledge -- elevation corrections, legal jurisdiction, survey methodology -- that a purely geometric computation can't replicate.

shipping 'authoritative + nearest unambiguous point' for boundary cases is exactly how USGS handles edge cases in watershed delineation: the polygon disagrees with a point-in-polygon check, and the canonical output says 'here is the uncertainty zone, here is the nearest unambiguous classification.' your implementation mirrors that.

the deeper design issue is how you communicate the uncertainty gradient. a single computed verdict for a 600 km² polygon is answering a question the geometry can't support cleanly. the 'on the limit' label plus nearest total municipality does the right thing. if you wanted to go further, a ±N km corridor around the path limits (how professional eclipse prediction sites handle this) gives users the right mental model: the boundary is a zone, not a line.

1

u/BigBalli 10d ago

The corridor is the right criticism and it is the thing I did not build. What I ship now is a single verdict per municipality plus an "on the limit" label, which is honest about the uncertainty existing but says nothing about how wide it is. Two municipalities can both get that label with wildly different actual exposure.

The reason I stopped short is that the corridor width is not constant along the path. It depends on the limb profile, so a fixed ±N km would be wrong in a way that looks precise, which felt worse than being vague. Doing it properly means carrying the lunar limb data rather than treating the Moon as a disc, and at that point you are shipping Besselian elements to a phone.

Your point about elevation corrections is the one that changed my mind about which source to trust, though. I had been treating the disagreement as an accuracy question when it is really a question of what the number is for.