land_use.py 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # coding: utf-8
  2. """
  3. 四县三种用电土地利用类型模型
  4. Four County Three Type Land Use Model
  5. """
  6. from sqlalchemy import Column, Integer, String, Float, Numeric
  7. from geoalchemy2.types import Geometry
  8. from app.models.base import Base
  9. class FourCountyLandUse(Base):
  10. """
  11. 四县三种用电土地利用类型表
  12. Four County Three Type Land Use Table
  13. """
  14. __tablename__ = 'four_county_land'
  15. __table_args__ = {'comment': '四县三种用电土地利用类型数据'}
  16. # 主键
  17. gid = Column(Integer, primary_key=True, autoincrement=True, comment='主键ID')
  18. # 对象标识
  19. objectid = Column(Integer, name='objectid', comment='对象标识符')
  20. # 标识码
  21. bsm = Column(String(18), name='bsm', comment='标识码')
  22. # 要素代码
  23. ysdm = Column(String(10), name='ysdm', comment='要素代码')
  24. # 图斑编号
  25. tbybh = Column(String(18), name='tbybh', comment='图斑预编号')
  26. tbbh = Column(String(8), name='tbbh', comment='图斑编号')
  27. # 地类信息
  28. dlbm = Column(String(5), name='dlbm', comment='地类编码')
  29. dlmc = Column(String(60), name='dlmc', comment='地类名称')
  30. # 权属信息
  31. qsxz = Column(String(2), name='qsxz', comment='权属性质')
  32. qsdwdm = Column(String(19), name='qsdwdm', comment='权属单位代码')
  33. qsdwmc = Column(String(60), name='qsdwmc', comment='权属单位名称')
  34. # 坐落单位
  35. zldwdm = Column(String(19), name='zldwdm', comment='坐落单位代码')
  36. zldwmc = Column(String(60), name='zldwmc', comment='坐落单位名称')
  37. # 面积信息
  38. tbmj = Column(Numeric(19, 11), name='tbmj', comment='图斑面积')
  39. kcdlbm = Column(String(5), name='kcdlbm', comment='扣除地类编码')
  40. kcxs = Column(Numeric(19, 11), name='kcxs', comment='扣除系数')
  41. kcmj = Column(Numeric(19, 11), name='kcmj', comment='扣除面积')
  42. tbdlmj = Column(Numeric(19, 11), name='tbdlmj', comment='图斑地类面积')
  43. # 耕地信息
  44. gdlx = Column(String(2), name='gdlx', comment='耕地类型')
  45. gdpdjb = Column(String(2), name='gdpdjb', comment='耕地坡度级别')
  46. xzdwkd = Column(Numeric(19, 11), name='xzdwkd', comment='线状地物宽度')
  47. # 图斑细化
  48. tbxhdm = Column(String(6), name='tbxhdm', comment='图斑细化代码')
  49. tbxhmc = Column(String(20), name='tbxhmc', comment='图斑细化名称')
  50. # 种植属性
  51. zzsxdm = Column(String(6), name='zzsxdm', comment='种植属性代码')
  52. zzsxmc = Column(String(20), name='zzsxmc', comment='种植属性名称')
  53. # 耕地等别
  54. gddb = Column(Integer, name='gddb', comment='耕地等别')
  55. # 其他属性
  56. frdbs = Column(String(1), name='frdbs', comment='非入等标识')
  57. czcsxm = Column(String(4), name='czcsxm', comment='城镇村属性码')
  58. sjnf = Column(Integer, name='sjnf', comment='数据年份')
  59. mssm = Column(String(2), name='mssm', comment='模式识别码')
  60. hdmc = Column(String(100), name='hdmc', comment='河道名称')
  61. bz = Column(String(254), name='bz', comment='备注')
  62. # 形状信息
  63. shape_leng = Column(Numeric(19, 11), name='shape_leng', comment='形状长度')
  64. shape_le_1 = Column(Numeric(19, 11), name='shape_le_1', comment='形状长度1')
  65. shape_area = Column(Numeric(19, 11), name='shape_area', comment='形状面积')
  66. # 几何信息 - 使用EPSG:4526坐标系
  67. geom = Column(
  68. Geometry('POLYGON', 4526, from_text='ST_GeomFromEWKT', name='geometry'),
  69. index=True,
  70. comment='几何位置信息-多边形'
  71. )