PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 0ms app.codeStats 0ms

/django/contrib/gis/tests/geo3d/models.py

https://code.google.com/p/mango-py/
Python | 69 lines | 52 code | 17 blank | 0 comment | 0 complexity | 5ce6c812d8f1433ca7d4a9b8f95c07d9 MD5 | raw file
 1from django.contrib.gis.db import models
 2
 3class City3D(models.Model):
 4    name = models.CharField(max_length=30)
 5    point = models.PointField(dim=3)
 6    objects = models.GeoManager()
 7
 8    def __unicode__(self):
 9        return self.name
10
11class Interstate2D(models.Model):
12    name = models.CharField(max_length=30)
13    line = models.LineStringField(srid=4269)
14    objects = models.GeoManager()
15
16    def __unicode__(self):
17        return self.name
18
19class Interstate3D(models.Model):
20    name = models.CharField(max_length=30)
21    line = models.LineStringField(dim=3, srid=4269)
22    objects = models.GeoManager()
23
24    def __unicode__(self):
25        return self.name
26
27class InterstateProj2D(models.Model):
28    name = models.CharField(max_length=30)
29    line = models.LineStringField(srid=32140)
30    objects = models.GeoManager()
31
32    def __unicode__(self):
33        return self.name
34
35class InterstateProj3D(models.Model):
36    name = models.CharField(max_length=30)
37    line = models.LineStringField(dim=3, srid=32140)
38    objects = models.GeoManager()
39
40    def __unicode__(self):
41        return self.name
42
43class Polygon2D(models.Model):
44    name = models.CharField(max_length=30)
45    poly = models.PolygonField(srid=32140)
46    objects = models.GeoManager()
47    
48    def __unicode__(self):
49        return self.name
50
51class Polygon3D(models.Model):
52    name = models.CharField(max_length=30)
53    poly = models.PolygonField(dim=3, srid=32140)
54    objects = models.GeoManager()
55    
56    def __unicode__(self):
57        return self.name
58
59class Point2D(models.Model):
60    point = models.PointField()
61    objects = models.GeoManager()
62
63class Point3D(models.Model):
64    point = models.PointField(dim=3)
65    objects = models.GeoManager()
66
67class MultiPoint3D(models.Model):
68    mpoint = models.MultiPointField(dim=3)
69    objects = models.GeoManager()