aldenwels / kml-samples

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

Polygon follows rhumb line only if filled #375

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Which products are affected?

Google Earth

What steps will reproduce the problem?
1. Draw a polygon with a major east/west edge, such as along the United States 
and Canada border, which follows the 49th parallel.
2. Using the "edit polygon" window in Google Earth, make sure the Altitude is 
"Clamped to Ground"
3. Set the polygon area to "filled".  Observe that the east/west edge follows 
the 49th parallel.
3. Set the polygon area to "outlined".  Observe that the east/west edge does 
not follow the 49th parallel.  Rather, it follows the great circle route 
between the eastern and western points.

What is the expected output or behavior? What do you see instead?
According to the documentation at 
http://code.google.com/apis/kml/documentation/kmlreference.html#polygon
if the altitudeMode is clampToGround, then the polygon edges will follow rhumb 
lines. However, the actual behaviour is that that if the area fill is turned 
off, the polygon edges follow great circle routes insted.  The expected 
behaviour is that the polygon edges should follow rhumb lines regardless of the 
area fill settings.

What application versions (if any) are you using?
All Google Earth versions

Which operating systems (and/or relevant web browsers) are affected?
Windows, not tested on others

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

In the following code "fill" is set to 1.  Polygon follows rhumb line

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" 
xmlns:gx="http://www.google.com/kml/ext/2.2" 
xmlns:kml="http://www.opengis.net/kml/2.2" 
xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
    <name>KmlFile</name>
    <Placemark>
        <name>Test Polygon</name>
        <Style>
            <LineStyle>
                <width>2</width>
            </LineStyle>
            <PolyStyle>
                <outline>1</outline>
                <fill>1</fill>
            </PolyStyle>
        </Style>
        <Polygon>
            <tessellate>1</tessellate>
            <outerBoundaryIs>
                <LinearRing>
                    <coordinates>
                        -102,49,0 -117,49,0 -111,47,0 -102,49,0 
                    </coordinates>
                </LinearRing>
            </outerBoundaryIs>
        </Polygon>
    </Placemark>
</Document>
</kml>

In the following code, "fill" is set to 0. Polygon follows great circle route.  
It should follow rhumb line regardless of fill.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" 
xmlns:gx="http://www.google.com/kml/ext/2.2" 
xmlns:kml="http://www.opengis.net/kml/2.2" 
xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
    <name>KmlFile</name>
    <Placemark>
        <name>Test Polygon</name>
        <Style>
            <LineStyle>
                <width>2</width>
            </LineStyle>
            <PolyStyle>
                <outline>1</outline>
                <fill>0</fill>
            </PolyStyle>
        </Style>
        <Polygon>
            <tessellate>1</tessellate>
            <outerBoundaryIs>
                <LinearRing>
                    <coordinates>
                        -102,49,0 -117,49,0 -111,47,0 -102,49,0 
                    </coordinates>
                </LinearRing>
            </outerBoundaryIs>
        </Polygon>
    </Placemark>
</Document>
</kml>

Original issue reported on code.google.com by bill.cl...@earthpoint.us on 28 Feb 2011 at 5:01

GoogleCodeExporter commented 8 years ago
Why is Google Earth not consistent with its rendering of polygons? As already 
noted for this issue; if you fill the polygon it follows rhumb lines, and if 
you set it as outline it follows the great circle route.

We have an issue where we want to fill the polygon and have it follow the great 
circle route. See the attached file; basically we want the polygon shape as per 
"Test Polygon - Outline", but it looks like "Test Polygon - Fill" when filled 
which is NOT what we want.

Original comment by nmc...@gmail.com on 6 Nov 2014 at 12:55

Attachments: