GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
It could be interesting to have generator for geographic fields.
Could you give me a way to add support to these types of field ?
a first generator for pointfield, (we should ad srid value, this example is for google srid) :
def __init__(self, *args, **kwargs):
super(GeoPointGenerator, self).__init__(*args, **kwargs)
coord_0 = decimal.Decimal(str(random.randrange(2003750834)/100 - 20037508.34/2))
coord_1 = decimal.Decimal(str(random.randrange(2003750834)/100 - 20037508.34/2))
value = 'POINT(%s %s)' % (coord_0, coord_1)