2008-08-06 02:13:06 +08:00
|
|
|
"""
|
Refactored the GEOS interface. Improvements include:
* Geometries now allow list-like manipulation, e.g., can add, insert, delete vertexes (or other geometries in collections) like Python lists. Thanks, Aryeh Leib Taurog.
* Added support for GEOS prepared geometries via `prepared` property. Prepared geometries significantly speed up certain operations.
* Added support for GEOS cascaded union as `MultiPolygon.cascaded_union` property.
* Added support for GEOS line merge as `merged` property on `LineString`, and `MultiLineString` geometries. Thanks, Paul Smith.
* No longer use the deprecated C API for serialization to/from WKB and WKT. Now use the GEOS I/O classes, which are now exposed as `WKTReader`, `WKTWriter`, `WKBReader`, and `WKBWriter` (which supports 3D and SRID inclusion)
* Moved each type of geometry to their own module, eliminating the cluttered `geometries.py`.
* Internally, all C API methods are explicitly called from a module rather than a star import.
Fixed #9557, #9877, #10222
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-24 08:12:21 +08:00
|
|
|
The GeoDjango GEOS module. Please consult the GeoDjango documentation
|
2015-05-07 00:01:23 +08:00
|
|
|
for more details: https://docs.djangoproject.com/en/dev/ref/contrib/gis/geos/
|
2008-08-06 02:13:06 +08:00
|
|
|
"""
|
2015-06-16 02:07:31 +08:00
|
|
|
from .collections import ( # NOQA
|
|
|
|
GeometryCollection, MultiLineString, MultiPoint, MultiPolygon,
|
|
|
|
)
|
2015-08-12 20:42:01 +08:00
|
|
|
from .error import GEOSException # NOQA
|
2015-04-24 23:24:07 +08:00
|
|
|
from .factory import fromfile, fromstr # NOQA
|
2015-06-16 02:07:31 +08:00
|
|
|
from .geometry import GEOSGeometry, hex_regex, wkt_regex # NOQA
|
|
|
|
from .io import WKBReader, WKBWriter, WKTReader, WKTWriter # NOQA
|
2015-04-24 23:24:07 +08:00
|
|
|
from .libgeos import geos_version, geos_version_info # NOQA
|
2015-06-16 02:07:31 +08:00
|
|
|
from .linestring import LinearRing, LineString # NOQA
|
2015-04-24 23:24:07 +08:00
|
|
|
from .point import Point # NOQA
|
|
|
|
from .polygon import Polygon # NOQA
|
2013-10-18 19:25:30 +08:00
|
|
|
|
2013-05-11 11:08:45 +08:00
|
|
|
try:
|
2015-11-07 17:10:52 +08:00
|
|
|
HAS_GEOS = geos_version_info()['version'] >= '3.3.0'
|
2013-05-11 11:08:45 +08:00
|
|
|
except ImportError:
|
|
|
|
HAS_GEOS = False
|