我正在尝试用 topojson 做很多事情……结合 2 个 geojson 文件和 1 个 tsv,加入 ELECT_DIV n NAME,将其提升为 id,并从 tsv 中保留 2012_POP。
这是我正在使用的命令:
topojson -o electorates.json -e 2012_oz_population.tsv --id-property ELECT_DIV,NAME -p 2012_POP -s .0000005 --allow-empty -- electorates.geojson region.geojson
ELECT_DIV 在选民.geojson 中。它被设置为所有功能的 ID,但每个功能都没有从与 tsv 的连接中获得正确的 2012_POP。然而,在顶层,选民和地区正在从 tsv 获得 2012_POP 的最后一个值,所以它以某种方式加入......
关于我做错了什么的任何想法?我需要在多个 topo 命令中执行此操作吗?
谢谢!
更新 W 请求的信息
2012_oz_population.tsv
CED_CODE NAME 2011_POP 2012_POP
101 Banks 154938 156527
选民.geojson
"features": [
{ "type": "Feature", "properties": { "ELECT_DIV": "Lingiari", "STATE": "NT", "NUMCCDS": 335.0, "ACTUAL": 0.0, "PROJECTED": 0.0, "POPULATION": 0.0, "OVER_18": 0.0, "AREA_SQKM": 1352034.05, "SORTNAME": "Lingiari" }, "geometry": { "type": "MultiPolygon",
region.geojson
"features": [
{ "type": "Feature", "properties": { "scalerank": 5, "featurecla": "Admin-0 country", "labelrank": 5.0, "sovereignt": "Australia", "sov_a3": "AU1", "adm0_dif": 1.0, "level": 2.0, "type": "Dependency", "admin": "Ashmore and Cartier Islands", "adm0_a3": "ATC", "geou_dif": 0.0, "geounit": "Ashmore and Cartier Islands", "gu_a3": "ATC", "su_dif": 0.0, "subunit": "Ashmore and Cartier Islands", "su_a3": "ATC", "brk_diff": 0.0, "name": "Ashmore and Cartier Is.", "name_long": "Ashmore and Cartier Islands", "brk_a3": "ATC", "brk_name": "Ashmore and Cartier Is.", "brk_group": null, "abbrev": "A.C.Is.", "postal": "AU", "formal_en": "Territory of Ashmore and Cartier Islands", "formal_fr": null, "note_adm0": "Auz.", "note_brk": null, "name_sort": "Ashmore and Cartier Islands", "name_alt": null, "mapcolor7": 1.0, "mapcolor8": 2.0, "mapcolor9": 2.0, "mapcolor13": 7.0, "pop_est": -99.0, "gdp_md_est": -99.0, "pop_year": -99.0, "lastcensus": -99.0, "gdp_year": -99.0, "economy": "7. Least developed region", "income_grp": "5. Low income", "wikipedia": -99.0, "fips_10": null, "iso_a2": "-99", "iso_a3": "-99", "iso_n3": "036", "un_a3": "-099", "wb_a2": "-99", "wb_a3": "-99", "woe_id": -99.0, "adm0_a3_is": "AUS", "adm0_a3_us": "ATC", "adm0_a3_un": -99.0, "adm0_a3_wb": -99.0, "continent": "Oceania", "region_un": "Oceania", "subregion": "Australia and New Zealand", "region_wb": "East Asia & Pacific", "name_len": 23.0, "long_len": 27.0, "abbrev_len": 7.0, "tiny": -99.0, "homepart": -99.0 }, "geometry": { "type": "Polygon", "coordinates":
现在我把它写出来了(并且想出了如何像小丑一样在 Stackoverflow 中做基本的降价),我想知道,它是否被 region.geojson 中的名称连接所吸引?
非常感谢@mbostock 的帮助