自2017年以来,由威廉和玛丽地理实验室制作和维护的geoBoundaries全球政治行政边界数据库是世界上每个国家的边界(即州、县)的在线、开放许可资源。我们目前共追踪了199个实体,包括所有195个联合国会员国、格陵兰岛、台湾、纽埃和科索沃。所有的边界都可以查看或下载通用的文件格式,包括shapefiles;使用的唯一要求是确认。关于geoBoundaries的最新信息可以在www.geoboundaries.org。
所有的边界类型都已被摄取,包括以下已被摄取的管理水平从0-4不等。
HPSCU - 高精度单一国家非标准化。首要的geoBoundaries版本,代表世界上每个国家的最高精度文件。这些文件没有进行标准化处理,因此(例如)在边界有争议的情况下,两个国家可能会重叠。
HPSCGS - 全球标准化的高精度单一国家。geoBoundaries高精度数据的一个版本,已被剪切到美国国务院的边界文件,确保数据集中没有有争议的边界或重叠。这种全球标准化的产品在国家之间可能有差距。如果你需要一个没有缺口的产品,我们推荐我们的简化全球产品。
SSCU - 简化的单一国家非标准化。为世界上每个国家提供的每个文件的简化版本。这些文件没有进行标准化处理,因此(例如)在边界有争议的情况下,两个国家可能会有重叠。
SSCGS - 简化的单一国家全球标准化。geoBoundaries简化数据的一个版本,已被剪成美国国务院的边界文件,确保数据集中没有有争议的边界或重叠。这种全球标准化的产品在国家之间可能有差距。
CGAZ - 全球综合行政区。是SSCGS ADM0、ADM1和ADM2的全球合成,边界之间有空白。也可在更高的简化水平上提供。
Feature Collection | Admin Levels |
HPSCU | ADM0,ADM1,ADM2,ADM3,ADM4 |
HPSCGS | ADM0,ADM1,ADM2,ADM3,ADM4 |
SSCU | ADM0,ADM1,ADM2,ADM3,ADM4 |
SSCGS | ADM0,ADM1,ADM2,ADM3,ADM4 |
CGAZ | ADM0,ADM1,ADM2 |
代码:
var CGAZ_ADM0 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/CGAZ_ADM0'); var CGAZ_ADM1 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/CGAZ_ADM1'); var CGAZ_ADM2 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/CGAZ_ADM2'); var HPSCGS_ADM0 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/HPSCGS-ADM0'); var HPSCGS_ADM1 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/HPSCGS-ADM1'); var HPSCGS_ADM2 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/HPSCGS-ADM2'); var HPSCGS_ADM3 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/HPSCGS-ADM3'); var HPSCGS_ADM4 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/HPSCGS-ADM4'); var HPSCU_ADM0 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/HPSCU-ADM0'); var HPSCU_ADM1 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/HPSCU-ADM1'); var HPSCU_ADM2 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/HPSCU-ADM2'); var HPSCU_ADM3 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/HPSCU-ADM3'); var HPSCU_ADM4 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/HPSCU-ADM4'); var SSCGS_ADM0 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/SSCGS-ADM0'); var SSCGS_ADM1 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/SSCGS-ADM1'); var SSCGS_ADM2 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/SSCGS-ADM2'); var SSCGS_ADM3 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/SSCGS-ADM3'); var SSCGS_ADM4 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/SSCGS-ADM4'); var SSCU_ADM0 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/SSCU-ADM0'); var SSCU_ADM1 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/SSCU-ADM1'); var SSCU_ADM2 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/SSCU-ADM2'); var SSCU_ADM3 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/SSCU-ADM3'); var SSCU_ADM4 = ee.FeatureCollection('projects/earthengine-legacy/assets/projects/sat-io/open-datasets/geoboundaries/SSCU-ADM4');
引用:
Runfola D, Anderson A, Baier H, Crittenden M, Dowker E, Fuhrig S, et al. (2020) geoBoundaries: A global database of political administrative boundaries. PLoS ONE 15(4): e0231866. https://doi.org/10.1371/journal.pone.0231866
GEE的数据预处理
为了使数据集更容易使用,我们使用API下载了数据集,然后将一个文件夹中的所有特征合并成与不同的边界类型和管理水平有关的单一集合。由于下载或上传到GEE的问题,可能会有一些遗漏的部分,但我们已经注意到将这些工作降到最低。
License¶
Individual data files in the geoBoundaries database are governed by the license or licenses identified within the metadata for each respective boundary and are all variants of partially or completely open licenses. All referenced licenses can be read in their entirety here. Computer code and derivative works generated by the geoBoundaries project are released under the Attribution 4.0 International (CC BY 4.0) license.
Produced and maintained by the William & Mary geoLab since 2017
Processed secondary/formatted & Curated by: Samapriya Roy
代码案例:
/**************Code Attribution: Code Provided by www.spatialthoughts.com*****/ // Drill-down (Cascading Forms) for Selecting Administrative Boundaries // This script shows how to build hierarchical selection using UI Widgets // Using GeoBoundries admin boundaries var admin0 = ee.FeatureCollection("projects/sat-io/open-datasets/geoboundaries/CGAZ_ADM0"); var admin1 = ee.FeatureCollection("projects/sat-io/open-datasets/geoboundaries/CGAZ_ADM1"); var admin2 = ee.FeatureCollection("projects/sat-io/open-datasets/geoboundaries/CGAZ_ADM2"); // Set-up the panel var mainPanel = ui.Panel(); mainPanel.style().set({ width: '300px', }); ui.root.insert(0,mainPanel); var title = ui.Label('Drill-down Selector'); title.style().set({ 'position': 'top-center', 'fontSize': '24px' }); mainPanel.add(title) // Create a panel to hold the drop-down boxes var dropdownPanel = ui.Panel(); // Create a panel to hold the result var resultPanel = ui.Panel(); // Define 3 dropdowns for admin0, admin1 and admin2 names // Keep them disbled. We will add items later var admin0Select = ui.Select({ placeholder: 'please wait..', }).setDisabled(true) var admin1Select = ui.Select({ placeholder: 'select admin0 unit first', }).setDisabled(true) var admin2Select = ui.Select({ placeholder: 'select admin1 unit first', }).setDisabled(true) dropdownPanel.add(admin0Select) dropdownPanel.add(admin1Select) dropdownPanel.add(admin2Select) mainPanel.add(dropdownPanel) mainPanel.add(resultPanel) // ************************* // Define callback functions // ************************* // We need to do this first since the functions need to // be defined before they are used. // Define the onChange() function for admin0Select var admin0Selected = function(admin0Selection) { resultPanel.clear() Map.clear() admin1Select.items().reset() admin2Select.items().reset() admin1Select.setPlaceholder('please wait..') admin2Select.setPlaceholder('Select a admin1 unit first..') // Now we have admin0 values, fetch admin1 values for that country var selectedAdmin0 = admin0.filter(ee.Filter.eq('shapeName', admin0Selection)); var shapeID = ee.Feature(selectedAdmin0.first()).get('shapeID'); var selectedAdmin1 = admin1.filter(ee.Filter.eq('ADM0_shape', shapeID)); var admin1Names = selectedAdmin1 .aggregate_array('shapeName') .sort() // Use evaluate() to not block the UI admin1Names.evaluate(function(items){ admin1Select.setPlaceholder('select admin1 unit') admin1Select.items().reset(items) // Now that we have items, enable the menu admin1Select.setDisabled(false) }) } // Define the onChange() function for admin1Select var admin1Selected = function(admin1Selection) { resultPanel.clear() Map.clear() admin2Select.setPlaceholder('please wait..') var selectedAdmin1 = admin1.filter(ee.Filter.eq('shapeName', admin1Selection)); var shapeID = ee.Feature(selectedAdmin1.first()).get('shapeID'); var selectedAdmin2 = admin2.filter(ee.Filter.eq('ADM1_shape', shapeID)); var admin2Names = selectedAdmin2 .aggregate_array('shapeName') .sort() admin2Names.evaluate(function(items){ if (items.length == 0) { items = ['No Admin2 Units'] admin2Select.items().reset(items) } else { admin2Select.items().reset(items) } admin2Select.setPlaceholder('select admin2 unit') admin2Select.setDisabled(false) }) } // Define the onChange() function for admin2Select var admin2Selected = function(admin1Selection) { resultPanel.clear() Map.clear() var admin0Value = admin0Select.getValue() var admin1Value = admin1Select.getValue() var admin2Value = admin2Select.getValue() var selectedAdmin1 = admin1.filter(ee.Filter.eq('shapeName', admin1Value)); var shapeGroup = ee.Feature(selectedAdmin1.first()).get('shapeGroup'); // Some regions do not have admin2 values // We are on client-side, so using if/else is ok if (admin2Value == 'No Admin2 Units') { var result = admin1Value + ',' + admin0Value var filtered = admin1 .filter(ee.Filter.eq('shapeName', admin1Value)) .filter(ee.Filter.eq('shapeGroup', shapeGroup)) } else { var result = admin2Value + ',' + admin1Value + ',' + admin0Value var filtered = admin2 .filter(ee.Filter.eq('shapeName', admin2Value)) .filter(ee.Filter.eq('shapeGroup', shapeGroup)) .filter(ee.Filter.intersects('.geo', selectedAdmin1.geometry())); } var label = ui.Label('You selected: ' + result) resultPanel.add(label) Map.centerObject(filtered) Map.addLayer(filtered, {color: 'blue'}, result) } // Register the callback functions admin0Select.onChange(admin0Selected) admin1Select.onChange(admin1Selected) admin2Select.onChange(admin2Selected) // ****************** // Populate the items // ****************** // Get all country names and sort them var admin0Names = admin0.aggregate_array('shapeName').sort().distinct() // Fetch the value using evaluate() to not block the UI admin0Names.evaluate(function(items){ admin0Select.items().reset(items) // Now that we have items, enable the menu admin0Select.setDisabled(false) // Change placeholder admin0Select.setPlaceholder('Select admin0 unit') })