度、分、秒の情報を維持し、プロパティ デコレータを使用してメソッドでポイント操作のために 10 進数への一方向変換を行うだけです。
from django.db import models
class PolygonPoint(models.Model):
parent_poly = models.ForeignKey(PolyModel)
degrees = models.IntegerField()
minutes = models.IntegerField()
seconds = models.IntegerField()
@property
def point(self):
"""
Do conversion to point here
"""
...
p = Point(x, y, srid=a)
return p
または、JSON BLOB でデータを保持し続けます。
class SomeModel(models.Model):
...
dms_points_json = models.TextArea(help_text=u"JSON list of dms polygon points")
poly = models.PolygonField()
def populate_poly(self):
"""
Perform steps to update/populate the PolygonField using
dms_points_json blob
"""
...