vector.py 400 B

123456789101112131415161718
  1. # 矢量数据模型
  2. from sqlalchemy import Column, Integer, String, JSON, Table, MetaData
  3. from geoalchemy2 import Geometry
  4. from .base import Base
  5. from ..database import engine
  6. # 使用现有的表
  7. metadata = MetaData()
  8. surveydata = Table(
  9. "surveydata",
  10. metadata,
  11. schema="public",
  12. autoload_with=engine
  13. )
  14. # 定义矢量数据模型
  15. class VectorData(Base):
  16. __table__ = surveydata