3 ms·
The international dateline; or more precisely the antemeridian. It's a nontrivial problem, that even plagues the more famous gis applications (such as Google Ea
by wlievens 17y ago
The international dateline; or more precisely the antemeridian. It's a nontrivial problem, that even plagues the more famous gis applications (such as Google Earth, which cannot render a polygon that crosses the antemeridian properly).
- Groxx 17y agoReally? ((loc + 180) % 360) - 180 = loc, wrapped past the antemeridian, for any value. Just detect sign changes, and reverse the range on the reversing side. Seems to me graphics people have been doing this sort of thing for years. A similar, but more complicated problem: painting the texture on a 3D model (literally onto the rendered model), even across seams. That's general-cased, wrapping on a sphere is a rather trivial special case by comparison. Granted, I haven't made any GIS systems, and the underlying structure may make it more difficult than this. But this is definitely a solved problem, are they just reluctant to modify their system?
- wlievens 17y agoThe real problem is that you can't tell inside from outside in a polygon that wraps the antemeridian.
- Groxx 17y agoAaah, yeah, that's harder. Hm. Personally, I'd just find the points that edges intersect the antemeridian, and define two polygons, ORing the results. Know if there's a reason that isn't done?
- wlievens 17y agoThat's the workaround, but that process is left to the user. Google Earth doesn't do that for you (since it can't know how to split the polygon, because it doesn't know the inside!).