带有 GeoAlchemy 柱的烧瓶模型
Flask Model with GeoAlchemy column
How to create the geometry column in flask model
from geoalchemy2 import Geometry
from app import db
class process(db.Model):
wkt = db.Column(Geometry('POINT'))
但是在创建 table
时出错
create table process(
[WKT] geometry(GEOMETRY,-1) NULL)
SQL 错误是:
Incorrect syntax near ','.
It's tricky, I tried this one
WKT = db.Column(Geometry(''))
How to create the geometry column in flask model
from geoalchemy2 import Geometry
from app import db
class process(db.Model):
wkt = db.Column(Geometry('POINT'))
但是在创建 table
时出错create table process(
[WKT] geometry(GEOMETRY,-1) NULL)
SQL 错误是:
Incorrect syntax near ','.
It's tricky, I tried this one
WKT = db.Column(Geometry(''))