制造武装冲突地区的一揽子计划。
wzone的Python项目详细描述
wzone是一个生成武装冲突区域的包。该包包含功能 用于查询和创建ESRI ASCII raster format中的冲突区域。方法细节 可找到here(待定)。这个包在很大程度上依赖于由 这是Uppsala Conflict Data Program。
示例
importwzoneimporttempfile# list of UCDPGED conflict IDs relevant to state-based violence in Somaliasomalia_ids=wzone.find_ids(country='Somalia',type_of_violence=1)### [329, 337, 418, 13646]# Yearly sequence of dates from the first to the last events for each conflictsomalia_dates=wzone.find_dates(ids=somalia_ids,interval='year')### somalia_dates[1][0] == '1989-01-01'# select a test casetest_id=337test_date='2010-01-01'# create war zonestmp_dir=tempfile.mkdtemp()somalia_path=wzone.gen_wzones(dates=test_date,ids=test_id,out_dir=tmp_dir)printsomalia_path# You can continue this example with a variety of functions in other GIS packages.### For arcpy users, refer to arcpy.ASCIIToRaster_conversion function.### For gdal users, refer to gdal.Open function.