/django/contrib/gis/tests/distapp/models.py
Python | 50 lines | 43 code | 7 blank | 0 comment | 0 complexity | dfdabec5cb3ce0fdacefcafb5d1df3ab MD5 | raw file
Possible License(s): BSD-3-Clause
1from django.contrib.gis.db import models 2 3class SouthTexasCity(models.Model): 4 "City model on projected coordinate system for South Texas." 5 name = models.CharField(max_length=30) 6 point = models.PointField(srid=32140) 7 objects = models.GeoManager() 8 def __unicode__(self): return self.name 9 10class SouthTexasCityFt(models.Model): 11 "Same City model as above, but U.S. survey feet are the units." 12 name = models.CharField(max_length=30) 13 point = models.PointField(srid=2278) 14 objects = models.GeoManager() 15 def __unicode__(self): return self.name 16 17class AustraliaCity(models.Model): 18 "City model for Australia, using WGS84." 19 name = models.CharField(max_length=30) 20 point = models.PointField() 21 objects = models.GeoManager() 22 def __unicode__(self): return self.name 23 24class CensusZipcode(models.Model): 25 "Model for a few South Texas ZIP codes (in original Census NAD83)." 26 name = models.CharField(max_length=5) 27 poly = models.PolygonField(srid=4269) 28 objects = models.GeoManager() 29 def __unicode__(self): return self.name 30 31class SouthTexasZipcode(models.Model): 32 "Model for a few South Texas ZIP codes." 33 name = models.CharField(max_length=5) 34 poly = models.PolygonField(srid=32140, null=True) 35 objects = models.GeoManager() 36 def __unicode__(self): return self.name 37 38class Interstate(models.Model): 39 "Geodetic model for U.S. Interstates." 40 name = models.CharField(max_length=10) 41 path = models.LineStringField() 42 objects = models.GeoManager() 43 def __unicode__(self): return self.name 44 45class SouthTexasInterstate(models.Model): 46 "Projected model for South Texas Interstates." 47 name = models.CharField(max_length=10) 48 path = models.LineStringField(srid=32140) 49 objects = models.GeoManager() 50 def __unicode__(self): return self.name