Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 7fd7c575020aa78a8e2e309ea8909f43 > files > 310

gdal-1.6.2-6.fc13.i686.rpm

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>GDAL Grid Tutorial</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.2-20100208 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="contents">


<h1><a class="anchor" id="grid_tutorial">GDAL Grid Tutorial </a></h1><h2><a class="anchor" id="grid_tutorial_intro">
Introduction to Gridding</a></h2>
<p>Gridding is a process of creating a regular grid (or call it a raster image) from the scattered data. Typically you have a set of arbitrary scattered over the region of survey measurements and you would like to convert them into the regular grid for further processing and combining with other grids.</p>
<div align="center">
<img src="gridding.png" alt="gridding.png"/>
<p><strong>Scattered data gridding</strong></p></div>
 This problem can be solved using data interpolation or approximation algorithms. But you are not limited by interpolation here. Sometimes you don't need to interpolate your data but rather compute some statistics or data metrics over the region. Statistics is valuable itself or could be used for better choosing the interpolation algorithm and parameters.</p>
<p>That is what GDAL Grid API is about. It helps you to interpolate your data (see <a class="el" href="grid__tutorial.html#grid_tutorial_interpolation">Interpolation of the Scattered Data</a>) or compute data metrics (see <a class="el" href="grid__tutorial.html#grid_tutorial_metrics">Data Metrics Computation</a>).</p>
<p>There are two ways of using this interface. Programmatically it is available through the GDALGridCreate C function; for end users there is a <a class="el" href="gdal__grid.html">gdal_grid</a> utility. The rest of this document discusses details on algorithms and their parameters implemented in GDAL Grid API.</p>
<h2><a class="anchor" id="grid_tutorial_interpolation">
Interpolation of the Scattered Data</a></h2>
<h3><a class="anchor" id="grid_tutorial_interpolation_invdist">
Inverse Distance to a Power</a></h3>
<p>The Inverse Distance to a Power gridding method is a weighted average interpolator. You should supply the input arrays with the scattered data values including coordinates of every data point and output grid geometry. The function will compute interpolated value for the given position in output grid.</p>
<p>For every grid node the resulting value <img class="formulaInl" alt="$Z$" src="form_0.png"/> will be calculated using formula:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ Z=\frac{\sum_{i=1}^n{\frac{Z_i}{r_i^p}}}{\sum_{i=1}^n{\frac{1}{r_i^p}}} \]" src="form_1.png"/>
</p>
<p>where </p>
<ul>
<li>
<img class="formulaInl" alt="$Z_i$" src="form_2.png"/> is a known value at point <img class="formulaInl" alt="$i$" src="form_3.png"/>, </li>
<li>
<img class="formulaInl" alt="$r$" src="form_4.png"/> is a distance from the grid node to point <img class="formulaInl" alt="$i$" src="form_3.png"/>, </li>
<li>
<img class="formulaInl" alt="$p$" src="form_5.png"/> is a weighting power, </li>
<li>
<img class="formulaInl" alt="$n$" src="form_6.png"/> is a number of points in <a class="el" href="grid__tutorial.html#grid_tutorial_ellipse">search</a> ellipse". </li>
</ul>
<p>In this method the weighting factor <img class="formulaInl" alt="$w$" src="form_7.png"/> is</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ w=\frac{1}{r^p} \]" src="form_8.png"/>
</p>
<p>See GDALGridInverseDistanceToAPowerOptions for the list of GDALGridCreate parameters and <a class="el" href="gdal__grid.html#gdal_grid_algorithms_invdist">invdist</a> for the list of <a class="el" href="gdal__grid.html">gdal_grid</a> options.</p>
<h3><a class="anchor" id="grid_tutorial_interpolation_average">
Moving Average</a></h3>
<p>The Moving Average is a simple data averaging algorithm. It uses a moving window of elliptic form to search values and averages all data points within the window. <a class="el" href="grid__tutorial.html#grid_tutorial_ellipse">Search ellipse</a> can be rotated by specified angle, the center of ellipse located at the grid node. Also the minimum number of data points to average can be set, if there are not enough points in window, the grid node considered empty and will be filled with specified NODATA value.</p>
<p>Mathematically it can be expressed with the formula:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ Z=\frac{\sum_{i=1}^n{Z_i}}{n} \]" src="form_9.png"/>
</p>
<p>where </p>
<ul>
<li>
<img class="formulaInl" alt="$Z$" src="form_0.png"/> is a resulting value at the grid node, </li>
<li>
<img class="formulaInl" alt="$Z_i$" src="form_2.png"/> is a known value at point <img class="formulaInl" alt="$i$" src="form_3.png"/>, </li>
<li>
<img class="formulaInl" alt="$n$" src="form_6.png"/> is a number of points in search <a class="el" href="grid__tutorial.html#grid_tutorial_ellipse">search ellipse</a>. </li>
</ul>
<p>See GDALGridMovingAverageOptions for the list of GDALGridCreate parameters and <a class="el" href="gdal__grid.html#gdal_grid_algorithms_average">average</a> for the list of <a class="el" href="gdal__grid.html">gdal_grid</a> options.</p>
<h3><a class="anchor" id="grid_tutorial_interpolation_nearest">
Nearest Neighbor</a></h3>
<p>The Nearest Neighbor method doesn't perform any interpolation or smoothing, it just takes the value of nearest point found in grid node search ellipse and returns it as a result. If there are no points found, the specified NODATA value will be returned.</p>
<p>See GDALGridNearestNeighborOptions for the list of GDALGridCreate parameters and <a class="el" href="gdal__grid.html#gdal_grid_algorithms_nearest">nearest</a> for the list of <a class="el" href="gdal__grid.html">gdal_grid</a> options.</p>
<h2><a class="anchor" id="grid_tutorial_metrics">
Data Metrics Computation</a></h2>
<p>All the metrics have the same set controlling options. See the GDALGridDataMetricsOptions.</p>
<h3><a class="anchor" id="grid_tutorial_metrics_min">
Minimum Data Value</a></h3>
<p>Minimum value found in grid node <a class="el" href="grid__tutorial.html#grid_tutorial_ellipse">search ellipse</a>. If there are no points found, the specified NODATA value will be returned.</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ Z=\min{(Z_1,Z_2,\ldots,Z_n)} \]" src="form_10.png"/>
</p>
<p>where </p>
<ul>
<li>
<img class="formulaInl" alt="$Z$" src="form_0.png"/> is a resulting value at the grid node, </li>
<li>
<img class="formulaInl" alt="$Z_i$" src="form_2.png"/> is a known value at point <img class="formulaInl" alt="$i$" src="form_3.png"/>, </li>
<li>
<img class="formulaInl" alt="$n$" src="form_6.png"/> is a number of points in <a class="el" href="grid__tutorial.html#grid_tutorial_ellipse">search</a> ellipse". </li>
</ul>
<h3><a class="anchor" id="grid_tutorial_metrics_max">
Maximum Data Value</a></h3>
<p>Maximum value found in grid node <a class="el" href="grid__tutorial.html#grid_tutorial_ellipse">search ellipse</a>. If there are no points found, the specified NODATA value will be returned.</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ Z=\max{(Z_1,Z_2,\ldots,Z_n)} \]" src="form_11.png"/>
</p>
<p>where </p>
<ul>
<li>
<img class="formulaInl" alt="$Z$" src="form_0.png"/> is a resulting value at the grid node, </li>
<li>
<img class="formulaInl" alt="$Z_i$" src="form_2.png"/> is a known value at point <img class="formulaInl" alt="$i$" src="form_3.png"/>, </li>
<li>
<img class="formulaInl" alt="$n$" src="form_6.png"/> is a number of points in <a class="el" href="grid__tutorial.html#grid_tutorial_ellipse">search</a> ellipse". </li>
</ul>
<h3><a class="anchor" id="grid_tutorial_metrics_range">
Data Range</a></h3>
<p>A difference between the minimum and maximum values found in grid node <a class="el" href="grid__tutorial.html#grid_tutorial_ellipse">search ellipse</a>. If there are no points found, the specified NODATA value will be returned.</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ Z=\max{(Z_1,Z_2,\ldots,Z_n)}-\min{(Z_1,Z_2,\ldots,Z_n)} \]" src="form_12.png"/>
</p>
<p>where </p>
<ul>
<li>
<img class="formulaInl" alt="$Z$" src="form_0.png"/> is a resulting value at the grid node, </li>
<li>
<img class="formulaInl" alt="$Z_i$" src="form_2.png"/> is a known value at point <img class="formulaInl" alt="$i$" src="form_3.png"/>, </li>
<li>
<img class="formulaInl" alt="$n$" src="form_6.png"/> is a number of points in <a class="el" href="grid__tutorial.html#grid_tutorial_ellipse">search</a> ellipse". </li>
</ul>
<h2><a class="anchor" id="grid_tutorial_ellipse">
Search Ellipse</a></h2>
<p>Search window in gridding algorithms specified in the form of rotated ellipse. It is described by the three parameters:</p>
<ul>
<li>
<img class="formulaInl" alt="$radius_1$" src="form_13.png"/> is the first radius (<img class="formulaInl" alt="$x$" src="form_14.png"/> axis if rotation angle is 0), </li>
<li>
<img class="formulaInl" alt="$radius_2$" src="form_15.png"/> is the second radius (<img class="formulaInl" alt="$y$" src="form_16.png"/> axis if rotation angle is 0), </li>
<li>
<img class="formulaInl" alt="$angle$" src="form_17.png"/> is a search ellipse rotation angle (rotated counter clockwise). </li>
</ul>
<div align="center">
<img src="ellipse.png" alt="ellipse.png"/>
<p><strong>Search ellipse</strong></p></div>
 Only points located inside the search ellipse (including its border line) will be used for computation.</p>
 
<p>
$Id: grid_tutorial.dox 14579 2008-05-30 15:41:30Z dron $
</p>
 </div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr>

Generated for GDAL by 
<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.6.2-20100208.
</body>
</html>