2016-11-05 18:35:58 +08:00
|
|
|
from django.contrib.gis.db import models
|
2011-09-18 03:54:52 +08:00
|
|
|
|
2013-11-03 04:12:09 +08:00
|
|
|
|
2011-09-18 03:54:52 +08:00
|
|
|
class AllOGRFields(models.Model):
|
2014-01-01 18:01:46 +08:00
|
|
|
|
2011-09-18 03:54:52 +08:00
|
|
|
f_decimal = models.FloatField()
|
|
|
|
f_float = models.FloatField()
|
|
|
|
f_int = models.IntegerField()
|
|
|
|
f_char = models.CharField(max_length=10)
|
|
|
|
f_date = models.DateField()
|
|
|
|
f_datetime = models.DateTimeField()
|
|
|
|
f_time = models.TimeField()
|
|
|
|
geom = models.PolygonField()
|
2013-09-12 16:30:45 +08:00
|
|
|
point = models.PointField()
|
2011-09-18 03:54:52 +08:00
|
|
|
|
2015-04-05 00:09:46 +08:00
|
|
|
class Meta:
|
|
|
|
required_db_features = ['gis_enabled']
|
|
|
|
|
2014-11-04 05:03:59 +08:00
|
|
|
|
|
|
|
class Fields3D(models.Model):
|
|
|
|
point = models.PointField(dim=3)
|
2016-06-19 00:08:53 +08:00
|
|
|
pointg = models.PointField(dim=3, geography=True)
|
2014-11-04 05:03:59 +08:00
|
|
|
line = models.LineStringField(dim=3)
|
|
|
|
poly = models.PolygonField(dim=3)
|
|
|
|
|
2015-04-05 00:09:46 +08:00
|
|
|
class Meta:
|
|
|
|
required_db_features = ['gis_enabled']
|