chinese-global-compliant-geodata
Version:
Global geographic data package based on China's stance, providing administrative divisions and territories of Chinese provinces/cities/districts/counties, as well as global countries/regions. Supports geographic data in Chinese and relevant regional langu
27 lines (26 loc) • 1.76 kB
TypeScript
import { FeatureCollection } from 'geojson';
/**
* 获取世界整体轮廓数据,或通过 ISO 三位代码获取特定国家的数据。
* @param iso3Code - 可选。国家 ISO 三位代码(如 'CHN')。如果提供,则返回该国家的 GeoJSON 特征;否则返回所有国家。
* @returns {FeatureCollection | null} GeoJSON 格式的地理数据,如果加载或过滤失败则返回 null。
*/
export declare function getWorldGeoJSON(iso3Code?: string): FeatureCollection | null;
/**
* 通过ISO三位代码和层级获取对应国家或地区的GeoJSON数据
* @param iso3Code - 国家的ISO三位代码 (例如: 'CHN', 'JPN'),不区分大小写
* @param level - 数据层级 (例如: 1, 2, 3)
* @param filterKey? - 可选。用于过滤GeoJSON特点的属性键名 (例如: 'name', 'gb')
* @param filterValue? - 可选。用于过滤GeoJSON特点的属性值 (例如: '北京市', '156110000')
* @returns {FeatureCollection | null} GeoJSON 格式的地理数据对象,如果未找到则返回 null
*/
export declare function getCountyOrRegionGeoJSON(iso3Code: string, level: number, filterKey?: string, filterValue?: string): FeatureCollection | null;
/**
* 获取指定国家二级行政单位的GeoJSON数据,并支持属性过滤
* @param iso3Code - 国家ISO三位代码(如 CHN、JPN、KOR)
* @param regionCode - 二级行政单位代码(如 TW)
* @param level - 数据层级(如2)
* @param filterKey - 可选,属性键名
* @param filterValue - 可选,属性值
* @returns {FeatureCollection | null} 过滤后的GeoJSON数据
*/
export declare function getRegionGeoJSON(iso3Code: string, regionCode: string, level?: number, filterKey?: string, filterValue?: string): FeatureCollection | null;