Page MenuHomePhabricator

Wrong rendering of <mapframe> on transition past 180 longitude due to inconsistency in longitude handling
Closed, DuplicatePublicBUG REPORT

Description

Please see https://en.wikipedia.org/wiki/Talk:Havre_Trough for example of issue.

There is inconsistency in how longitude transition at 180 degrees or -180 degrees is handled in the behind the scenes modules. This means that json that renders fine in the Kartographer extension itself is displayed incorrectly by the image translation software used in final displayed wikipedia pages not in preview mode. (ie preview differs from what you actually get).

An immediate fix would be to correct the image software to handle the issue as Kartographer does. This is likely the only solution without any potential for major breakage given the case experimentation shown on the example page and the clear faults in imaging rendering at the longitude transition. (images are rendered I understand to minimise server overhead)

However experimentation has shown that at this time template software using Kartographer will not render a map consistently if its center coordinates are shifted from say 179E to 179W. So there are other bugs and I can not exclude that they exist in Kartographer too or are only in Kartographer. Essentially my experimentation has to date suggested that the centered longitude coordinate if positive, you must supply coordinates in range 0 to 360 for correct rendering over 180 degree transition, and from 0 to -360 if the centered longitude is negative. Clearly the transition from minus to plus longitude around Greenwich is handled correctly or else the issue would have been detected well before now. Presumably bug affects on land only rendering in Siberia and Antarctica and any rendering in Pacific Ocean/Arctic that crosses 180 degrees.

I suspect coordinate translation logic in other templates and modules could vary in the logic to handle the transition and break in interesting ways as seen with the second image on the example page. While the Template:OSM Location map is partially down due to the disabled Graph module (PhabricatorTask T334940) I can not check this fully, but would assume any change in the 180 degree longitude to -180 degree transition logic of the Kartographer module could break such templates.

Other information

Fault could be described as the fall off the edge of a flat earth bug.

Event Timeline

Aklapper renamed this task from Bug in image rendering <mapframe> on transition past 180 longitude due to inconsistency in how longitude is handled in back door modules to Wrong rendering of <mapframe> on transition past 180 longitude due to inconsistency in longitude handling.Jun 22 2023, 7:51 AM

Another example to use when debugging any underlying code change is at https://en.wikipedia.org/wiki/Lau-Colville_Ridge