I'm trying to insert some values into a Geodjango database, but getting errors. This is the table:
class Place(models.Model):
placeid = models.IntegerField(primary_key=True)
structidx = models.IntegerField(null=True, blank=True)
oscode = models.PointField(null=True, blank=True)
waste86 = models.CharField(max_length=120, null=True, blank=True)
objects = models.GeoManager()
And this is the code I'm using to insert data:
INSERT INTO domes_place (placeid, structidx, oscode, holding)
VALUES ('10', '1', '1', 'POINT(632000,141000)', 'N');
And this is the error:
HINT: "POINT(632000," <-- parse error at position 13 within geometry
Please could someone tell me what I'm doing wrong?
Best Answer
From looking at the documentation on the Geodjango website, it looks like you don't need the
,
between the numbers, so give this a try:Looks like the missing
,
is a WKT(Well-Known Text) convention, never noticed it before.