<!--
osgEarth Sample

This one demonstrates how to read polygon data from a shapefile and "drape" it
on the map using the overlay technique.

It also shows the "selector" technique of using SQL queries to selectively style
the feature data.
-->
<map name="Feature Polygons">
    <GDALImage name="Imagery">
        <url>../data/world.tif</url>
    </GDALImage>
    <FeatureModel name="Countries" features="world-data" opacity="0.9">
        <styles>
            <style type="text/css">
                base {
                   render-depth-offset-auto: true;
                   render-max-tess-angle: 0.5;
                   altitude-offset: 2500.0;
                }                
                p1 : base {
                   fill: #ffff80;
                }       
                p2 : base {
                   fill: #80ffff;
                }   
                p3 : base {
                   fill: #ff80ff;
                }       
                p4 : base {
                   fill: #ff8080;
                }     
                p5 : base {
                   fill: #80ff80;
                }                                      
            </style>
            <selector class="p1">
                <query>
                    <expr><![CDATA[ POP <= 14045470 ]]></expr>
                </query>
            </selector>
            <selector class="p2">
                <query>
                    <expr><![CDATA[ POP > 14045470 and POP <= 43410900 ]]></expr>
                </query>
            </selector>
            <selector class="p3">
                <query>
                    <expr><![CDATA[ POP > 43410900 and POP <= 97228750 ]]></expr>
                </query>
            </selector>
            <selector class="p4">
                <query>
                    <expr><![CDATA[ POP > 97228750 and POP <= 258833000 ]]></expr>
                </query>
            </selector>
            <selector class="p5">
                <query>
                    <expr><![CDATA[ POP > 258833000 ]]></expr>
                </query>
            </selector>
        </styles>
    </FeatureModel>
    <OGRFeatures name="world-data">
        <url>../data/world.shp</url>
        <filters>
            <resample max_length="5.0"/>
            <buffer distance="-0.05"/>
        </filters>
    </OGRFeatures>
</map>
