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

1fromdjango.contrib.gis.dbimportmodels 2 3classSouthTexasCity(models.Model): 4"City model on projected coordinate system for South Texas." 5name=models.CharField(max_length=30) 6point=models.PointField(srid=32140) 7objects=models.GeoManager() 8def__unicode__(self):returnself.name 910classSouthTexasCityFt(models.Model):11"Same City model as above, but U.S. survey feet are the units."12name=models.CharField(max_length=30)13point=models.PointField(srid=2278)14objects=models.GeoManager()15def__unicode__(self):returnself.name1617classAustraliaCity(models.Model):18"City model for Australia, using WGS84."19name=models.CharField(max_length=30)20point=models.PointField()21objects=models.GeoManager()22def__unicode__(self):returnself.name2324classCensusZipcode(models.Model):25"Model for a few South Texas ZIP codes (in original Census NAD83)."26name=models.CharField(max_length=5)27poly=models.PolygonField(srid=4269)28objects=models.GeoManager()29def__unicode__(self):returnself.name3031classSouthTexasZipcode(models.Model):32"Model for a few South Texas ZIP codes."33name=models.CharField(max_length=5)34poly=models.PolygonField(srid=32140,null=True)35objects=models.GeoManager()36def__unicode__(self):returnself.name3738classInterstate(models.Model):39"Geodetic model for U.S. Interstates."40name=models.CharField(max_length=10)41path=models.LineStringField()42objects=models.GeoManager()43def__unicode__(self):returnself.name4445classSouthTexasInterstate(models.Model):46"Projected model for South Texas Interstates."47name=models.CharField(max_length=10)48path=models.LineStringField(srid=32140)49objects=models.GeoManager()50def__unicode__(self):returnself.name