ramazanalic / kml-samples

Automatically exported from code.google.com/p/kml-samples
0 stars 0 forks source link

Display problem with KML Polygons crossing the -180° meridian #234

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
(possibly connected to or duplicate of defect 227)

Which products are affected?

Google Earth , I think also Google Maps

What steps will reproduce the problem?

Open this KML file :
http://bbs.keyhole.com/ubb/ubbthreads.php?ubb=download&Number=373536&filename=83
8107-PATH.KML
And the problem can be seen immediately.

What is the expected output or behavior? What do you see instead?

A Polygon in a KML file that crosses the 180° meridian is displayed wrong.
The connection between two points at longitude +179 and -179 is drawn
across the whole planet (358°) instead of the short way (2°). However, it
works perfectly with Lines instead of a Polygon.

What application versions (if any) are you using?

Google Earth
5.0.11337.1968 (beta)
(But it was also wrong in earler versions)

Please provide any additional information (code snippets/links) below.

I have written about this issue before in the Google Earth community:
http://bbs.keyhole.com/ubb/ubbthreads.php?ubb=showflat&Number=646692#Post646692

Original issue reported on code.google.com by Roland.O...@inode.at on 3 Feb 2009 at 10:23

GoogleCodeExporter commented 8 years ago
Although the test case isn't exactly the same, I'm going to group all anti 
meridian
bugs as one issue.

Original comment by api.roman.public@gmail.com on 13 Feb 2009 at 1:15

GoogleCodeExporter commented 8 years ago
While issue 227 was set to state fixed, this one here is definitely not yet 
fixed in version 5.2.1.1588. So can we un-merge it again or something?

Original comment by Roland.O...@inode.at on 18 Sep 2010 at 11:04

GoogleCodeExporter commented 8 years ago
I'm not a developer - just using some tools that use GMaps. What I'm seeing:
- polygons that go from positive to negative (eg, 170 to -170) show the box in 
the right place in Google Maps, but the centroid in the wrong spot (at 0, in 
this instance)
- such polygons display as wrapping across the whole planet in Google Earth

Example: http://goo.gl/maps/a2Za

If you instead exceed 180 (eg, 170 to 190), I see:
- in Google Maps, the box is truncated (ie, shows from 170 to 180), with the 
centroid off centre (ie, correctly located as if the box was 170 to 190, but 
off centre for the truncated box)
- in Google Earth, it displays correctly

Example: http://goo.gl/maps/W64e

Original comment by Stevage on 20 Sep 2010 at 7:29