diff --git a/topojson/core/extract.py b/topojson/core/extract.py index e5539a5..9e8132f 100644 --- a/topojson/core/extract.py +++ b/topojson/core/extract.py @@ -470,8 +470,8 @@ def _extract_featurecollection(self, geom): # check for overwritten duplicate keys if len(data) < len(obj["features"]): - # slight problem here is it doesn't say which one/ones were duplicated - raise IndexError("id in geojson data duplicated") + msg = "index in data duplicated, use `ignore_index=True` to overwrite index" + raise IndexError(msg) # new data dictionary is created, throw the geometries back to main() self._is_single = False diff --git a/topojson/core/topology.py b/topojson/core/topology.py index 4e91d5b..a10d483 100644 --- a/topojson/core/topology.py +++ b/topojson/core/topology.py @@ -99,8 +99,8 @@ class Topology(Hashmap): combination with an equal length list of `data` objects. Default is a single object named `data`. ignore_index : bool - If set to true existing ids/indexes will be ignored and overwritten otherwise - they will be passed through into the output. + If set to true existing ids/indexes of geojson FeatureCollections will be + ignored and overwritten. Otherwise features with ids will use their existing one. If indexes are not ignored and a duplicate id exists an exception will be raised. Default is false. """