From 7548aa8ffd46eb6e0f73730d1b2eb515ba581f95 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 2 Nov 2013 13:12:09 -0700 Subject: More attacking E302 violators --- django/contrib/gis/gdal/geometries.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'django/contrib/gis/gdal/geometries.py') diff --git a/django/contrib/gis/gdal/geometries.py b/django/contrib/gis/gdal/geometries.py index 98ae5a1108..a331053eeb 100644 --- a/django/contrib/gis/gdal/geometries.py +++ b/django/contrib/gis/gdal/geometries.py @@ -522,6 +522,7 @@ class OGRGeometry(GDALBase): """ return self._geomgen(capi.geom_union, other) + # The subclasses for OGR Geometry. class Point(OGRGeometry): @@ -550,6 +551,7 @@ class Point(OGRGeometry): return (self.x, self.y, self.z) coords = tuple + class LineString(OGRGeometry): def __getitem__(self, index): @@ -605,10 +607,12 @@ class LineString(OGRGeometry): if self.coord_dim == 3: return self._listarr(capi.getz) + # LinearRings are used in Polygons. class LinearRing(LineString): pass + class Polygon(OGRGeometry): def __len__(self): @@ -654,6 +658,7 @@ class Polygon(OGRGeometry): capi.get_centroid(self.ptr, p.ptr) return p + # Geometry Collection base class. class GeometryCollection(OGRGeometry): "The Geometry Collection class." @@ -700,13 +705,16 @@ class GeometryCollection(OGRGeometry): return tuple(self[i].tuple for i in xrange(self.geom_count)) coords = tuple + # Multiple Geometry types. class MultiPoint(GeometryCollection): pass + class MultiLineString(GeometryCollection): pass + class MultiPolygon(GeometryCollection): pass -- cgit v1.2.1