<!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>GEOS: C++ interface</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li class="current"><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> </div> <div class="header"> <div class="headertitle"> <h1>C++ interface </h1> </div> </div> <div class="contents"> <h2><a class="anchor" id="Overview"></a> Overview</h2> <p>Main class is <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">geos::geom::Geometry</a>, from which all geometry types derive.</p> <p>Construction and destruction of Geometries is done using <a class="el" href="classgeos_1_1geom_1_1GeometryFactory.html" title="Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...">geos::geom::GeometryFactory</a>.</p> <p>You'll feed it <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html" title="The internal representation of a list of coordinates inside a Geometry.">geos::geom::CoordinateSequence</a> for base geometries or vectors of geometries for collections.</p> <p>If you need to construct geometric shaped geometries, you can use geos::geom::GeometricShapeFactory.</p> <p>GEOS version info (as a string) can be obtained using <a class="el" href="namespacegeos_1_1geom.html#acdb90e29e8ba4eeeb5860f2bb0bb9b0f" title="Return current GEOS version.">geos::geom::geosversion()</a>. The JTS version this release has been ported from is available throu <a class="el" href="namespacegeos_1_1geom.html#ac0f658bdb01fb543cd247febca7ab10c" title="Return the version of JTS this GEOS release has been ported from.">geos::geom::jtsport()</a>.</p> <h2><a class="anchor" id="io_sect"></a> Input / Output</h2> <p>For WKT input/output you can use <a class="el" href="classgeos_1_1io_1_1WKTReader.html" title="WKT parser class; see also WKTWriter.">geos::io::WKTReader</a> and <a class="el" href="classgeos_1_1io_1_1WKTWriter.html" title="Outputs the textual representation of a Geometry. See also WKTReader.">geos::io::WKTWriter</a></p> <p>For WKB input/output you can use <a class="el" href="classgeos_1_1io_1_1WKBReader.html" title="Reads a Geometry from Well-Known Binary format.">geos::io::WKBReader</a> and <a class="el" href="classgeos_1_1io_1_1WKBWriter.html" title="Writes a Geometry into Well-Known Binary format.">geos::io::WKBWriter</a></p> <h2><a class="anchor" id="exc_sect"></a> Exceptions</h2> <p>Internal exceptions are thrown as instances <a class="el" href="classgeos_1_1util_1_1GEOSException.html" title="Base class for all GEOS exceptions.">geos::util::GEOSException</a> or derived classes. GEOSException derives from std::exception.</p> <p>Note that prior to version 3.0.0, GEOSException were thrown by pointer, and did not derive from std::exception. </p> </div> <hr class="footer"/><address class="footer"><small>Generated on Thu Jul 22 2010 for GEOS by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address> </body> </html>