geoalchemy2中的3D点

时间:2016-05-20 13:18:25

标签: python sqlalchemy postgis geoalchemy2

我对(我认为)geoalchemy2的ORM有困难。我的模型定义如下:

class Location(Model):
    point = Column(Geometry('POINT', dimension=3, srid=4326))

我稍后插入如下:

location = Location(point=WKTElement('POINT(65.567 32.95 1156.7)', 4326))
session.add(location)
session.commit()

这会出现以下错误:

Geometry has Z dimension but column does not.

0 个答案:

没有答案