topoJSON on D3: map doesn't show (but it works on www.mapshaper.org)

五迷三道 提交于 2019-12-07 07:50:27

The coordinates seem to be already projected (i.e. cartesian coordinates).

In this case you should use

d3.geo.path().projection(null);

But make sure you scale your topojson first to the desired size

topojson --width=960 --height=500 --margin=10 --cartesian -o out.json -- in.shp

Or reproject the shapefile first using ogr2ogr

ogr2ogr -t_srs EPSG:4326 out.shp in.shp
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!