Add Django-1.2.1
[frozenviper.git] / Django-1.2.1 / build / lib.linux-i686-2.6 / django / contrib / gis / db / models / manager.py
blob61fb82132baa0be92cfe48cc4870ce197085ff0e
1 from django.db.models.manager import Manager
2 from django.contrib.gis.db.models.query import GeoQuerySet
4 class GeoManager(Manager):
5 "Overrides Manager to return Geographic QuerySets."
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
12 def get_query_set(self):
13 return GeoQuerySet(self.model, using=self._db)
15 def area(self, *args, **kwargs):
16 return self.get_query_set().area(*args, **kwargs)
18 def centroid(self, *args, **kwargs):
19 return self.get_query_set().centroid(*args, **kwargs)
21 def collect(self, *args, **kwargs):
22 return self.get_query_set().collect(*args, **kwargs)
24 def difference(self, *args, **kwargs):
25 return self.get_query_set().difference(*args, **kwargs)
27 def distance(self, *args, **kwargs):
28 return self.get_query_set().distance(*args, **kwargs)
30 def envelope(self, *args, **kwargs):
31 return self.get_query_set().envelope(*args, **kwargs)
33 def extent(self, *args, **kwargs):
34 return self.get_query_set().extent(*args, **kwargs)
36 def extent3d(self, *args, **kwargs):
37 return self.get_query_set().extent3d(*args, **kwargs)
39 def force_rhr(self, *args, **kwargs):
40 return self.get_query_set().force_rhr(*args, **kwargs)
42 def geohash(self, *args, **kwargs):
43 return self.get_query_set().geohash(*args, **kwargs)
45 def geojson(self, *args, **kwargs):
46 return self.get_query_set().geojson(*args, **kwargs)
48 def gml(self, *args, **kwargs):
49 return self.get_query_set().gml(*args, **kwargs)
51 def intersection(self, *args, **kwargs):
52 return self.get_query_set().intersection(*args, **kwargs)
54 def kml(self, *args, **kwargs):
55 return self.get_query_set().kml(*args, **kwargs)
57 def length(self, *args, **kwargs):
58 return self.get_query_set().length(*args, **kwargs)
60 def make_line(self, *args, **kwargs):
61 return self.get_query_set().make_line(*args, **kwargs)
63 def mem_size(self, *args, **kwargs):
64 return self.get_query_set().mem_size(*args, **kwargs)
66 def num_geom(self, *args, **kwargs):
67 return self.get_query_set().num_geom(*args, **kwargs)
69 def num_points(self, *args, **kwargs):
70 return self.get_query_set().num_points(*args, **kwargs)
72 def perimeter(self, *args, **kwargs):
73 return self.get_query_set().perimeter(*args, **kwargs)
75 def point_on_surface(self, *args, **kwargs):
76 return self.get_query_set().point_on_surface(*args, **kwargs)
78 def reverse_geom(self, *args, **kwargs):
79 return self.get_query_set().reverse_geom(*args, **kwargs)
81 def scale(self, *args, **kwargs):
82 return self.get_query_set().scale(*args, **kwargs)
84 def snap_to_grid(self, *args, **kwargs):
85 return self.get_query_set().snap_to_grid(*args, **kwargs)
87 def svg(self, *args, **kwargs):
88 return self.get_query_set().svg(*args, **kwargs)
90 def sym_difference(self, *args, **kwargs):
91 return self.get_query_set().sym_difference(*args, **kwargs)
93 def transform(self, *args, **kwargs):
94 return self.get_query_set().transform(*args, **kwargs)
96 def translate(self, *args, **kwargs):
97 return self.get_query_set().translate(*args, **kwargs)
99 def union(self, *args, **kwargs):
100 return self.get_query_set().union(*args, **kwargs)
102 def unionagg(self, *args, **kwargs):
103 return self.get_query_set().unionagg(*args, **kwargs)