app/django/contrib/gis/tests/distapp/models.py
author Pawel Solyga <Pawel.Solyga@gmail.com>
Tue, 20 Jan 2009 16:12:55 +0000
changeset 837 bc1c951bf3a0
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Add missing blank line in soc.views.helper.params module. Fix docstring typo in soc.views.models.role module. Add missing dots at the end of sentences in soc.logic.cleaning and soc.view.models.user_self modules. Patch by: Pawel Solyga Review by: to-be-reviewed

from django.contrib.gis.db import models

class SouthTexasCity(models.Model):
    "City model on projected coordinate system for South Texas."
    name = models.CharField(max_length=30)
    point = models.PointField(srid=32140)
    objects = models.GeoManager()
    def __unicode__(self): return self.name

class SouthTexasCityFt(models.Model):
    "Same City model as above, but U.S. survey feet are the units."
    name = models.CharField(max_length=30)
    point = models.PointField(srid=2278)
    objects = models.GeoManager()
    def __unicode__(self): return self.name

class AustraliaCity(models.Model):
    "City model for Australia, using WGS84."
    name = models.CharField(max_length=30)
    point = models.PointField()
    objects = models.GeoManager()
    def __unicode__(self): return self.name

class CensusZipcode(models.Model):
    "Model for a few South Texas ZIP codes (in original Census NAD83)."
    name = models.CharField(max_length=5)
    poly = models.PolygonField(srid=4269)
    objects = models.GeoManager()

class SouthTexasZipcode(models.Model):
    "Model for a few South Texas ZIP codes."
    name = models.CharField(max_length=5)
    poly = models.PolygonField(srid=32140)
    objects = models.GeoManager()
    def __unicode__(self): return self.name

class Interstate(models.Model):
    "Geodetic model for U.S. Interstates."
    name = models.CharField(max_length=10)
    line = models.LineStringField()
    objects = models.GeoManager()
    def __unicode__(self): return self.name