[[TOC()]] = GEOS Geometries = == Background == === What is GEOS? === [http://geos.refractions.net/ GEOS] stands for '''G'''eometry '''E'''ngine - '''O'''pen '''S'''ource, and is a C++ port of the [http://www.jump-project.org/project.php?PID=JTS&SID=OVER Java Topology Suite], implementing the OpenGIS [http://www.opengeospatial.org/standards/sfs Simple Features for SQL] spatial predicate functions and spatial operators. === Why the new API? === 1. The GEOS SWIG wrapper is no longer maintained, and requires the installation of SWIG. * ''See'' Sean Gillies, ''[http://zcologia.com/news/150/geometries-for-python/ Geometries for Python]'' (blog post explaining rationale for abandoning GEOS support); ''see also'' Sean's message on the [http://geos.refractions.net/pipermail/geos-devel/2007-March/002851.html GEOS-Devel Mailing List] (Mar. 5, 2007). 2. The [http://trac.gispython.org/projects/PCL/browser/PCL/trunk/PCL-Core/cartography/geometry PCL implementation] is over 2K+ lines of C and would make PCL a requisite package for the GeoDjango application stack. 3. Cross-platform compatibility. Thus, the Python {{{ctypes}}} package was used to wrap the [http://geos.refractions.net/ro/doxygen_docs/html/geos__c_8h-source.html GEOS C API] to bring the rich capabilities of GEOS to Python and GeoDjango. === Related Work === == Geometry Objects == === Point === === LineString === === LinearRing === === Polygon === == Geometry Collections == === MultiPoint === === MultiLineString === === MultiPolygon === === GeometryCollection === == API == === Creation === === Spatial Predicate Properties === * empty * valid * simple * ring * hasz === Spatial Predicate Methods === * contains() * crosses() * disjoint() * equals() * equals_exact() * intersects() * overlaps() * relate_pattern() * within() === Topological Methods === * buffer() * difference() * intersection() * relate() * sym_difference() * union() === Topological Properties === * area * boundary * centroid * convex_hull * envelope * point_on_surface