Skip to content

topojson.core.cut

Cut

Bases: Join

This class targets the following objectives: 1. Split linestrings given the junctions of shared paths 2. Identifies indexes of linestrings that are duplicates

The cut function is the third step in the topology computation. The following sequence is adopted: 1. extract 2. join 3. cut 4. dedup 5. hashmap

Returns:

Type Description
dict

Output of Join with the lines cut (linestrings) and the keys bookkeeping_duplicates and bookkeeping_linestrings

to_dict

to_dict()

Convert the Cut object to a dictionary.

to_svg

to_svg(separate=False, include_junctions=False)

Display the linestrings and junctions as SVG.

Parameters:

Name Type Description Default
separate boolean

If True, each of the linestrings will be displayed separately. Default is False

False
include_junctions boolean

If True, the detected junctions will be displayed as well. Default is False

False