<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="gis-geometry-class-hierarchy">
      </a>
      13.4.2.1 The Geometry Class Hierarchy
     </h4>
    </div>
   </div>
  </div>
  <p>
   The geometry classes define a hierarchy as follows:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       Geometry
      </code>
      (noninstantiable)
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         <code class="literal">
          Point
         </code>
         (instantiable)
        </p>
       </li>
       <li class="listitem">
        <p>
         <code class="literal">
          Curve
         </code>
         (noninstantiable)
        </p>
        <div class="itemizedlist">
         <ul class="itemizedlist" style="list-style-type: square; ">
          <li class="listitem">
           <p>
            <code class="literal">
             LineString
            </code>
            (instantiable)
           </p>
           <div class="itemizedlist">
            <ul class="itemizedlist" style="list-style-type: disc; ">
             <li class="listitem">
              <p>
               <code class="literal">
                Line
               </code>
              </p>
             </li>
             <li class="listitem">
              <p>
               <code class="literal">
                LinearRing
               </code>
              </p>
             </li>
            </ul>
           </div>
          </li>
         </ul>
        </div>
       </li>
       <li class="listitem">
        <p>
         <code class="literal">
          Surface
         </code>
         (noninstantiable)
        </p>
        <div class="itemizedlist">
         <ul class="itemizedlist" style="list-style-type: square; ">
          <li class="listitem">
           <p>
            <code class="literal">
             Polygon
            </code>
            (instantiable)
           </p>
          </li>
         </ul>
        </div>
       </li>
       <li class="listitem">
        <p>
         <code class="literal">
          GeometryCollection
         </code>
         (instantiable)
        </p>
        <div class="itemizedlist">
         <ul class="itemizedlist" style="list-style-type: square; ">
          <li class="listitem">
           <p>
            <code class="literal">
             MultiPoint
            </code>
            (instantiable)
           </p>
          </li>
          <li class="listitem">
           <p>
            <code class="literal">
             MultiCurve
            </code>
            (noninstantiable)
           </p>
           <div class="itemizedlist">
            <ul class="itemizedlist" style="list-style-type: disc; ">
             <li class="listitem">
              <p>
               <code class="literal">
                MultiLineString
               </code>
               (instantiable)
              </p>
             </li>
            </ul>
           </div>
          </li>
          <li class="listitem">
           <p>
            <code class="literal">
             MultiSurface
            </code>
            (noninstantiable)
           </p>
           <div class="itemizedlist">
            <ul class="itemizedlist" style="list-style-type: disc; ">
             <li class="listitem">
              <p>
               <code class="literal">
                MultiPolygon
               </code>
               (instantiable)
              </p>
             </li>
            </ul>
           </div>
          </li>
         </ul>
        </div>
       </li>
      </ul>
     </div>
    </li>
   </ul>
  </div>
  <p>
   It is not possible to create objects in noninstantiable
          classes. It is possible to create objects in instantiable
          classes. All classes have properties, and instantiable classes
          may also have assertions (rules that define valid class
          instances).
  </p>
  <p>
   <code class="literal">
    Geometry
   </code>
   is the base class. It is an
          abstract class. The instantiable subclasses of
   <code class="literal">
    Geometry
   </code>
   are restricted to zero-, one-, and
          two-dimensional geometric objects that exist in
          two-dimensional coordinate space. All instantiable geometry
          classes are defined so that valid instances of a geometry
          class are topologically closed (that is, all defined
          geometries include their boundary).
  </p>
  <p>
   The base
   <code class="literal">
    Geometry
   </code>
   class has subclasses for
   <code class="literal">
    Point
   </code>
   ,
   <code class="literal">
    Curve
   </code>
   ,
   <code class="literal">
    Surface
   </code>
   , and
   <code class="literal">
    GeometryCollection
   </code>
   :
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       Point
      </code>
      represents zero-dimensional
              objects.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Curve
      </code>
      represents one-dimensional
              objects, and has subclass
      <code class="literal">
       LineString
      </code>
      ,
              with sub-subclasses
      <code class="literal">
       Line
      </code>
      and
      <code class="literal">
       LinearRing
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Surface
      </code>
      is designed for two-dimensional
              objects and has subclass
      <code class="literal">
       Polygon
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       GeometryCollection
      </code>
      has specialized
              zero-, one-, and two-dimensional collection classes named
      <code class="literal">
       MultiPoint
      </code>
      ,
      <code class="literal">
       MultiLineString
      </code>
      , and
      <code class="literal">
       MultiPolygon
      </code>
      for modeling geometries
              corresponding to collections of
      <code class="literal">
       Points
      </code>
      ,
      <code class="literal">
       LineStrings
      </code>
      , and
      <code class="literal">
       Polygons
      </code>
      , respectively.
      <code class="literal">
       MultiCurve
      </code>
      and
      <code class="literal">
       MultiSurface
      </code>
      are introduced as abstract
              superclasses that generalize the collection interfaces to
              handle
      <code class="literal">
       Curves
      </code>
      and
      <code class="literal">
       Surfaces
      </code>
      .
     </p>
    </li>
   </ul>
  </div>
  <p>
   <code class="literal">
    Geometry
   </code>
   ,
   <code class="literal">
    Curve
   </code>
   ,
   <code class="literal">
    Surface
   </code>
   ,
   <code class="literal">
    MultiCurve
   </code>
   , and
   <code class="literal">
    MultiSurface
   </code>
   are defined as noninstantiable
          classes. They define a common set of methods for their
          subclasses and are included for extensibility.
  </p>
  <p>
   <code class="literal">
    Point
   </code>
   ,
   <code class="literal">
    LineString
   </code>
   ,
   <code class="literal">
    Polygon
   </code>
   ,
   <code class="literal">
    GeometryCollection
   </code>
   ,
   <code class="literal">
    MultiPoint
   </code>
   ,
   <code class="literal">
    MultiLineString
   </code>
   , and
   <code class="literal">
    MultiPolygon
   </code>
   are instantiable classes.
  </p>
 </div>
 <br/>
</div>
