easyidp.shp.show_shp_fields#
- easyidp.shp.show_shp_fields(shp_path, encoding='utf-8')#
Show geojson properties data, for better setting
name_field
ofread_shp
- 参数:
shp_path (str) – the file path of *.shp
encoding (str) – default is ‘utf-8’, however, or some chinese characters, ‘gbk’ is required
示例
>>> import easyidp as idp >>> test_data = idp.data.TestData() >>> idp.shp.show_shp_fields(test_data.shp.complex_shp, encoding="GBK") [-1] [0] ID [1] MASSIFID [2] CROPTYPE [3] CROPDATE [4] CROPAREA [5] ATTID ------ --------------------------- ------------------- -------------- -------------- -------------- ----------- 0 230104112201809010000000000 2301041120000000000 小麦 2018-09-01 61525.26302 1 230104112201809010000000012 2301041120000000012 蔬菜 2018-09-01 2802.33512 2 230104112201809010000000014 2301041120000000014 玉米 2018-09-01 6960.7745 ... ... ... ... ... ... ... 320 230104112201809010000000583 2301041120000000583 大豆 2018-09-01 380.41704 321 230104112201809010000000584 2301041120000000584 其它 2018-09-01 9133.25998 322 230104112201809010000000585 2301041120000000585 其它 2018-09-01 1704.27193 >>> idp.shp.show_shp_fields(test_data.shp.lotus_shp) [-1] # [0] plot_id ------ ------------- 0 N1W1 1 N1W2 2 N1W3 ... ... 109 S4E5 110 S4E6 111 S4E7