PageRenderTime 39ms CodeModel.GetById 14ms 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
Possible License(s): BSD-3-Clause
  1. from django.contrib.gis.db import models
  2. class City3D(models.Model):
  3. name = models.CharField(max_length=30)
  4. point = models.PointField(dim=3)
  5. objects = models.GeoManager()
  6. def __unicode__(self):
  7. return self.name
  8. class Interstate2D(models.Model):
  9. name = models.CharField(max_length=30)
  10. line = models.LineStringField(srid=4269)
  11. objects = models.GeoManager()
  12. def __unicode__(self):
  13. return self.name
  14. class Interstate3D(models.Model):
  15. name = models.CharField(max_length=30)
  16. line = models.LineStringField(dim=3, srid=4269)
  17. objects = models.GeoManager()
  18. def __unicode__(self):
  19. return self.name
  20. class InterstateProj2D(models.Model):
  21. name = models.CharField(max_length=30)
  22. line = models.LineStringField(srid=32140)
  23. objects = models.GeoManager()
  24. def __unicode__(self):
  25. return self.name
  26. class InterstateProj3D(models.Model):
  27. name = models.CharField(max_length=30)
  28. line = models.LineStringField(dim=3, srid=32140)
  29. objects = models.GeoManager()
  30. def __unicode__(self):
  31. return self.name
  32. class Polygon2D(models.Model):
  33. name = models.CharField(max_length=30)
  34. poly = models.PolygonField(srid=32140)
  35. objects = models.GeoManager()
  36. def __unicode__(self):
  37. return self.name
  38. class Polygon3D(models.Model):
  39. name = models.CharField(max_length=30)
  40. poly = models.PolygonField(dim=3, srid=32140)
  41. objects = models.GeoManager()
  42. def __unicode__(self):
  43. return self.name
  44. class Point2D(models.Model):
  45. point = models.PointField()
  46. objects = models.GeoManager()
  47. class Point3D(models.Model):
  48. point = models.PointField(dim=3)
  49. objects = models.GeoManager()
  50. class MultiPoint3D(models.Model):
  51. mpoint = models.MultiPointField(dim=3)
  52. objects = models.GeoManager()