web/lib/django/contrib/gis/tests/distapp/models.py
changeset 38 77b6da96e6f1
equal deleted inserted replaced
37:8d941af65caf 38:77b6da96e6f1
       
     1 from django.contrib.gis.db import models
       
     2 
       
     3 class 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 
       
    10 class 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 
       
    17 class 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 
       
    24 class 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 
       
    31 class 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 
       
    38 class 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 
       
    45 class 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