PageRenderTime 102ms CodeModel.GetById 70ms app.highlight 13ms RepoModel.GetById 17ms app.codeStats 1ms

/django/contrib/gis/db/models/manager.py

https://code.google.com/p/mango-py/
Python | 103 lines | 67 code | 33 blank | 3 comment | 0 complexity | 3801932bac0d4cc16cdd53a21a2fb4a4 MD5 | raw file
  1from django.db.models.manager import Manager
  2from django.contrib.gis.db.models.query import GeoQuerySet
  3
  4class GeoManager(Manager):
  5    "Overrides Manager to return Geographic QuerySets."
  6
  7    # This manager should be used for queries on related fields
  8    # so that geometry columns on Oracle and MySQL are selected
  9    # properly.
 10    use_for_related_fields = True
 11
 12    def get_query_set(self):
 13        return GeoQuerySet(self.model, using=self._db)
 14
 15    def area(self, *args, **kwargs):
 16        return self.get_query_set().area(*args, **kwargs)
 17
 18    def centroid(self, *args, **kwargs):
 19        return self.get_query_set().centroid(*args, **kwargs)
 20
 21    def collect(self, *args, **kwargs):
 22        return self.get_query_set().collect(*args, **kwargs)
 23
 24    def difference(self, *args, **kwargs):
 25        return self.get_query_set().difference(*args, **kwargs)
 26
 27    def distance(self, *args, **kwargs):
 28        return self.get_query_set().distance(*args, **kwargs)
 29
 30    def envelope(self, *args, **kwargs):
 31        return self.get_query_set().envelope(*args, **kwargs)
 32
 33    def extent(self, *args, **kwargs):
 34        return self.get_query_set().extent(*args, **kwargs)
 35
 36    def extent3d(self, *args, **kwargs):
 37        return self.get_query_set().extent3d(*args, **kwargs)
 38
 39    def force_rhr(self, *args, **kwargs):
 40        return self.get_query_set().force_rhr(*args, **kwargs)
 41
 42    def geohash(self, *args, **kwargs):
 43        return self.get_query_set().geohash(*args, **kwargs)
 44
 45    def geojson(self, *args, **kwargs):
 46        return self.get_query_set().geojson(*args, **kwargs)
 47
 48    def gml(self, *args, **kwargs):
 49        return self.get_query_set().gml(*args, **kwargs)
 50
 51    def intersection(self, *args, **kwargs):
 52        return self.get_query_set().intersection(*args, **kwargs)
 53
 54    def kml(self, *args, **kwargs):
 55        return self.get_query_set().kml(*args, **kwargs)
 56
 57    def length(self, *args, **kwargs):
 58        return self.get_query_set().length(*args, **kwargs)
 59
 60    def make_line(self, *args, **kwargs):
 61        return self.get_query_set().make_line(*args, **kwargs)
 62
 63    def mem_size(self, *args, **kwargs):
 64        return self.get_query_set().mem_size(*args, **kwargs)
 65
 66    def num_geom(self, *args, **kwargs):
 67        return self.get_query_set().num_geom(*args, **kwargs)
 68
 69    def num_points(self, *args, **kwargs):
 70        return self.get_query_set().num_points(*args, **kwargs)
 71
 72    def perimeter(self, *args, **kwargs):
 73        return self.get_query_set().perimeter(*args, **kwargs)
 74
 75    def point_on_surface(self, *args, **kwargs):
 76        return self.get_query_set().point_on_surface(*args, **kwargs)
 77
 78    def reverse_geom(self, *args, **kwargs):
 79        return self.get_query_set().reverse_geom(*args, **kwargs)
 80
 81    def scale(self, *args, **kwargs):
 82        return self.get_query_set().scale(*args, **kwargs)
 83
 84    def snap_to_grid(self, *args, **kwargs):
 85        return self.get_query_set().snap_to_grid(*args, **kwargs)
 86
 87    def svg(self, *args, **kwargs):
 88        return self.get_query_set().svg(*args, **kwargs)
 89
 90    def sym_difference(self, *args, **kwargs):
 91        return self.get_query_set().sym_difference(*args, **kwargs)
 92
 93    def transform(self, *args, **kwargs):
 94        return self.get_query_set().transform(*args, **kwargs)
 95
 96    def translate(self, *args, **kwargs):
 97        return self.get_query_set().translate(*args, **kwargs)
 98
 99    def union(self, *args, **kwargs):
100        return self.get_query_set().union(*args, **kwargs)
101
102    def unionagg(self, *args, **kwargs):
103        return self.get_query_set().unionagg(*args, **kwargs)