Closed lucaspiller closed 8 years ago
From the command line reference:
Normally topojson does not include null and empty objects in the output topology. These can arise either because they were present in the input, or as a result of quantization or simplification. Use the --filter=none argument to retain empty and null features. (Null geometry objects in TopoJSON have an undefined type, as described in the specification.) Use --filter=small if you want small rings that are attached to other rings to be removed; the default filter behavior, --filter=small-detached, only removes small rings that are not attached to other polygons, such as islands.
So, use --filter=none to prevent the islands from being removed.
Simplification treats everything equally based on the simplification metric (Visvalingam’s). So, if these islands were removed before a point in a Canadian arc, it’s because they are smaller than the corresponding triangle in the Canadian arc. However, note that if the topology is messy, then sometimes the simplification is not allowed to remove points because it would change the topology. You may be able to fix this problem by changing quantization settings, or by finding cleaner source data.
I'm using the NaturalEarth dataset to generate TopoJSON for use with Datamaps. I'd like to keep the file small so that the load on the browser isn't too high, but also keep enough detail so it's possibly to identify small countries.
Here is how I'm generating the data:
Here is what the Maldives looks like at the various proportions:
0.5:
0.3:
0.1:
At 0.1 it's completely gone - it doesn't even exist in the file, it's not just empty.
Is it possible to simplify more complicated arcs further (e.g. Canada), before deciding to remove small countries?