Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prefectures collection by merging cities #1

Open
nobuf opened this issue Jul 17, 2017 · 0 comments
Open

Add prefectures collection by merging cities #1

nobuf opened this issue Jul 17, 2017 · 0 comments

Comments

@nobuf
Copy link
Owner

nobuf commented Jul 17, 2017

As us-atlas does, hoping those topojson files would include prefecture boundaries as well. With the below command in build.sh, I noticed that the final output includes many exterior rings unexpectedly.

topomerge prefectures=cities -k 'd.id.slice(0, 2)' -f 'd.id'

Here's a quick demo with the Tokyo shapefile -
https://bl.ocks.org/nobuf/5f2dfb266c909e35b37c95310f06fbcf

localhost_8000

#!/usr/bin/env bash
# Choose Tokyo (東京) and download the 2017 data
# http://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-N03-v2_3.html
unzip -o -j N03-170101_13_GML.zip -d tmp
shp2json -n --encoding sjis tmp/*.shp -o tmp/tokyo.ndjson
geo2topo -n cities=tmp/tokyo.ndjson \
    | toposimplify -p 0.00002 -f \
    > tokyo.json

This is likely due to the original shapefile data but I'm not 100% sure. I'm wondering if there's any workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant