Geographic Information Systems Asked by TravMatth on October 19, 2020
I have a file, Council_Districts.topojson
, with the following structure:
{ type: 'Topology', arcs: [...], transform: {...}, objects: {
Council_Districts_2016: {
type: 'GeometryCollection',
geometries: [
{
arcs: [...],
type: '...',
properties: {
'DISTRICT': 0,
'ID': 0,
'OBJECTID': 0,
}
},
...
]
}
}
I also have a `Sample_Data.csv’ file with the following structure:
DISTRICT, varA, varB, ....,
0, .1, .2, ...
I’m looking to combine these two files such that my output file has the following structure:
{ type: 'Topology', arcs: [...], transform: {...}, objects: {
Council_Districts_2016: {
type: 'GeometryCollection',
geometries: [
{
arcs: [...],
type: '...',
properties: {
'DISTRICT': 0,
'ID': 0,
'OBJECTID': 0,
'varA': .1,
'varB': .2,
}
},
...
]
}
}
Googling around, I’m finding the previous answer has been to use the external properties flag on the topojson cli, e.g. topojson -e blah
, but this flag does not seem to be available within the current topojson 2.0
You could use the great mapshaper cli. The join command is something like
mapshaper input.topojson -join "input.csv" keys=DISTRICT -o output.geojson
Answered by aborruso on October 19, 2020
Use QGIS to convert your CSV to GeoJSON then upload your GeoJSON to MapShaper.org or geojson.io and download as other formats they support, like TopoJSON.
Answered by GeospatialInformationTech on October 19, 2020
0 Asked on June 13, 2021 by julianno-sambatti
2 Asked on June 13, 2021 by ned
0 Asked on June 13, 2021 by srffc
1 Asked on June 13, 2021
1 Asked on June 13, 2021 by moritz-caspar
1 Asked on June 13, 2021 by izaeljr
1 Asked on June 13, 2021 by felix-bhler
2 Asked on June 13, 2021
3 Asked on June 13, 2021
1 Asked on June 13, 2021 by neil-benny
3 Asked on June 13, 2021 by louis-philippe-tessier
1 Asked on June 13, 2021 by geotrip
0 Asked on June 13, 2021 by antonis
Get help from others!
Recent Answers
© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP