Skip to content

Commit

Permalink
add test for singlepoint in multipoint geom
Browse files Browse the repository at this point in the history
  • Loading branch information
mattijn committed Oct 19, 2023
1 parent 48e9ba8 commit 48ad0e6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,14 @@ def test_topology_to_geojson_polygon_point():
assert "]}}]}" in topo # feat 2


# test for https://github.com/mattijn/topojson/issues/209
def test_topology_to_geojson_singepoint_in_multipoint():
data = [{"type": "MultiPoint", "coordinates": [[0.5, 0.5]]}]
geo = topojson.Topology(data).to_geojson()

assert "]]}}]}" in geo


def test_topology_to_geojson_quantized_points_only():
data = [{"type": "MultiPoint", "coordinates": [[0.5, 0.5], [1.0, 1.0]]}]
geo = topojson.Topology(data, prequantize=False).to_geojson()
Expand Down

0 comments on commit 48ad0e6

Please sign in to comment.