class Parcel(models.Model): name = models.CharField(max_length=30) city = models.ForeignKey(City) center1 = models.PointField() # Throwing a curveball w/`db_column` here. center2 = models.PointField(srid=2276, db_column='mycenter') border1 = models.PolygonField() border2 = models.PolygonField(srid=2276) objects = models.GeoManager() def __unicode__(self): return self.name
class City(models.Model): name = models.CharField(max_length=30) point = models.PointField() objects = models.GeoManager() def __unicode__(self): return self.name
class City(models.Model): name = models.CharField(max_length=25) population = models.IntegerField() density = models.DecimalField(max_digits=7, decimal_places=1) dt = models.DateField() point = models.PointField() objects = models.GeoManager()
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 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 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 MinusOneSRID(models.Model): geom = models.PointField(srid=-1) # Minus one SRID. objects = models.GeoManager()
class Location(models.Model): point = models.PointField() objects = models.GeoManager() def __unicode__(self): return self.point.wkt
class Invalid(models.Model): point = models.PointField()
class Point3D(models.Model): point = models.PointField(dim=3) objects = models.GeoManager()
class Point2D(models.Model): point = models.PointField() objects = models.GeoManager()