Artifact [300fb3e88c]
Not logged in

Artifact 300fb3e88cefc9a32ff47e606864dd39e3bb546f:

Wiki page [Sample Planet Earth] by sandro 2020-09-12 10:51:13.
D 2020-09-12T10:51:13.281
L Sample\sPlanet\sEarth
P b6d1a6c58a2fcf86fe9747194f2a9472389b9f3a
U sandro
W 9442
<h1>Quick How-To Guide for the Planet Earth sample</h1>
In this tutorial we'll assume that you've already studied and understood the tutorials about the <b>Giglio sample</b><br>
Now we'll examine the <b>Planet Earth sample</b> which will allow us to delve further into new details that we previously ignored.
<br><br>
The following table summarizes for quick reference all Coverages contained into the <b>Planet Earth</b> sample database:<br><br>
<table border="1" bgcolor="f0fff0" cellpadding="8" cellspacing="4">
<tr><th bgcolor="#d0d0d0">Coverage name</td><td bgcolor="#d0d0d0">Type</th><th bgcolor="#d0d0d0">Description</th></tr>
<tr><td>etopo1</td><td bgcolor="#f0c0a0">Raster</td><td>Global DEM - Digital Elevation Model</td></tr>
<tr><td>true_marble</td><td bgcolor="#f0c0a0">Raster</td><td>Natural colors - RGB low-resolution mosaic of Landsat imagery</td></tr>
<tr><td>countries</td><td bgcolor="#a0c0f0">Vector</td><td>2D Polygons - National Boundaries</td></tr>
<tr><td>countries_vw</td><td bgcolor="#a0c0f0">Vector</td><td>Spatial View derived from <b>countries</b></td></tr>
<tr><td>topo_states</td><td bgcolor="#a0c0f0">Vector</td><td>Topology derived from <b>countries</b></td></tr>
</table>
<br><br>
All datasets are based on <b><i>open data</i></b> available at the following URLs:
<ul>
<li><b>ETOPO1</b>: <a href="https://www.ngdc.noaa.gov/mgg/global/">NOAA</a></li>
<li><b>True Marble</b>: <a href="https://academictorrents.com/details/b9b284d9c0074846fee28e78aac4440fd7c0f51c">Unearthed Outdoors</a></li>
<li><b>Countries</b>: <a href="https://www.naturalearthdata.com/">Natural Earth</a></li>
</ul>
<br><br><hr><br><br>
<table width="100%" border="1" bgcolor="ffffe8" cellpadding="8" cellspacing="4">
<tr><th bgcolor="#c0ffc0" colspan="2"><h1>Step #1 - General Introduction</h1></th></tr>
<tr><td>
<table bgcolor="#80ffd0" cellpadding="14"><tr><td>
In this first contact with <b>Planet Earth</b> we'll simply test the basic rendering capabilities of the Map.<br><br>
You are simply expected to test the <b>pan</b> and <b>zoom</b> tools while switching on and off the various map layers.
</td></tr></table>
<br><hr>
<h3>Step #1.1 - Testing the ETOPO1 background</h3>
The side figure shows how the Map will be when applying the following layers selection:
<ul>
<li><b>ETOPO1</b> background</li>
<li><b>Countries</b> (<i>National Boundaries - red lines</i>) with labels corresponding to each Nation.
<ul>
<li><b>Note</b>: labels will be printed only if they fit inside the <b>MBR</b> of the corresponding <b>Polygon</b></li>
</ul></li>
</ul> 
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig_ex_dem.png" alt="fig_ex_dem">
</td></tr>
<tr><td>
<h3>Step #1.2 - Testing the True Marble background</h3>
The side figure shows how the Map will be when applying the following layers selection:
<ul>
<li><b>True Marble</b> background</li>
<li><b>Countries</b> (same as above).
</ul>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig_ex_tm.png" alt="fig_ex_tm">
</td></tr>
<tr><td>
<h3>Step #1.3 - Testing the Political Map</h3>
The side figure shows how the Map will be when applying the following layers selection:
<ul>
<li><b>Countries (view)</b> background
<ul>
<li><b>Note</b>: Each Country is internally filled with a different color, in such a way that confining Nations will never share the same color.</li>
</ul></li>
<li><b>Countries</b> (same as above).
</ul>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig_ex_pol.png" alt="fig_ex_pol">
</td></tr>
<tr><td>
<h3>Step #1.4 - Testing Topology</h3>
The side figure shows how the Map will be when applying the following layers selection:
<ul>
<li><b>topo_states (Topology)</b> alone. All Topology Primitives are represented as follows:
<ul>
<li><b>Nodes</b>: red circles.</li>
<li><b>Edges</b>: blue lines.</li>
<li><b>Faces</b>: pale yellow polygons.</li>
<li><b>Face Seeds</b>: yellow stars.</li>
<li><b>Edge Seeds</b>: yellow diamonds.</li>
</ul></li>.
</ul>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig_ex_topo.png" alt="fig_ex_topo">
</td></tr>
<tr><th bgcolor="#c0ffc0" colspan="2"><h1>Step #2 - Creating, populating and styling the Raster Coverages</h1></th></tr>
<tr><td>
<h3>Step #2.1 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig1.png" alt="fig1">
</td></tr>
<tr><td>
<h3>Step #2.1 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig2.png" alt="fig2">
</td></tr>
<tr><td>
<h3>Step #2.1 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig3.png" alt="fig3">
</td></tr>
<tr><td>
<h3>Step #2.1 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig33.png" alt="fig33">
</td></tr>
<tr><th bgcolor="#c0ffc0" colspan="2"><h1>Step #3 - Creating, populating and styling a Vector Coverage based on a Spatial Table</h1></th></tr>
<tr><td>
<h3>Step #3.1 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig31.png" alt="fig31">
</td></tr>
<tr><td>
<h3>Step #3.2 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig32.png" alt="fig32">
</td></tr>
<tr><th bgcolor="#c0ffc0" colspan="2"><h1>Step #4 - Creating, populating and styling a Vector Coverage based on a Spatial View</h1></th></tr>
<tr><td>
<h3>Step #4.1 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<verbatim>
CREATE VIEW countries_vw AS
SELECT pk_uid AS rowid, name AS name,
    CASE mapcolor7
        WHEN 1 THEN '#FF0000'
        WHEN 2 THEN '#00FF00'
        WHEN 3 THEN '#0000FF'
        WHEN 4 THEN '#FFFF00'
        WHEN 5 THEN '#FF00FF'
        WHEN 6 THEN '#00FFFF'
        ELSE '#808080'
    END color, geometry AS geom
FROM countries;

INSERT INTO views_geometry_columns VALUES
    ('countries_vw', 'geom', 'rowid', 'countries', 'geometry', 1);
</verbatim>
</td></tr>
<tr><td>
<h3>Step #4.2 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig4.png" alt="fig4">
</td></tr>
<tr><td>
<h3>Step #4.3 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<pre>
<?xml version="1.0" encoding="UTF-8"?>
<PolygonSymbolizer version="1.1.0"
    xsi:schemaLocation="http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/Symbolizer.xsd"
    xmlns="http://www.opengis.net/se" xmlns:ogc="http://www.opengis.net/ogc"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    uom="http://www.opengeospatial.org/se/units/pixel">
    <Name><font color="red" size="+2"><b>countries_col</b></font></Name>
    <Description>
        &lt;Title><font color="red" size="+2"><b>Countries - Political Map</b></font>&lt;/Title>
        <Abstract><font color="red" size="+2"><b>A Style setting its Fill color from a Column Value</b></font></Abstract>
    </Description>
    <Fill>
        <SvgParameter name="fill"><font color="red" size="+2"><b>@color@</b></font></SvgParameter>
        <SvgParameter name="fill-opacity">1.00</SvgParameter>
    </Fill>
    <Stroke>
        <SvgParameter name="stroke">#000000</SvgParameter>
        <SvgParameter name="stroke-opacity">1.00</SvgParameter>
        <SvgParameter name="stroke-width">1.00</SvgParameter>
        <SvgParameter name="stroke-linejoin">round</SvgParameter>
        <SvgParameter name="stroke-linecap">round</SvgParameter>
    </Stroke>
</PolygonSymbolizer>
</pre>
</td></tr>
</td></tr>
<tr><th bgcolor="#c0ffc0" colspan="2"><h1>Step #5 - Creating, populating and styling a Vector Coverage based on a Topology</h1></th></tr>
<tr><td>
<h3>Step #5.1 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig5.png" alt="fig5">
</td></tr>
<tr><td>
<h3>Step #5.2 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig6.png" alt="fig6">
</td></tr>
<tr><td>
<h3>Step #5.3 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<verbatim>
SELECT TopoGeo_FromGeoTableNoFaceExt('topo_states', NULL, 'countries', NULL, 'dustbin', 'dustbin_view', 512);

SELECT TopoGeo_Polygonize('topo_states'); 

SELECT TopoGeo_UpdateSeeds('topo_states');
</verbatim>
</td></tr>
<tr><td>
<h3>Step #5.4 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig7.png" alt="fig7">
</td></tr>
<tr><td>
<h3>Step #5.5 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig8.png" alt="fig8">
</td></tr>
<tr><td>
<h3>Step #5.6 - Preparing to load the Coverages in MapPanel</h3>
</td><td>
<img src="https://www.gaia-gis.it/gaia-sins/MapPanelPics/PlanetEarth/fig9.png" alt="fig9">
</td></tr>
</table>
Z 2334fccc74c3057b6ffc379a3be945ac