Newbie question. I'm trying to insert some UK National Grid references into a Django PointField defined as follows:
oscode = models.PointField(srid=27700, null=True, blank=True)
My question is this: can I store them in their original form ('TR3241', for example) or do I have to convert them to lat/lng first?
I don't know how to format them as WKT. This is what I get if I try inserting them as POINT(TR3241)
, which is obviously wrong:
INSERT INTO places (placeid, structidx, subidx, county, name, oscode) VALUES ('10', '1', '1', 'Kent', 'Dover', 'TR3241');
LINE 1: ...'1', 'Kent', 'D1', 'Eastry', 'Bewsbury', 'Dover', 'POINT(TR3...
^
HINT: "POINT(" <-- parse error at position 6 within geometry
So: is there a way that I can store points like 'TR3241' in GeoDjango, or do I have to convert them to standard lat/lng first?
I do have code to convert National Grid > lat/lng, but I was hoping GeoDjango would be able to store them in the original format, and do any conversion for me.