Files
evo-ai/.venv/lib/python3.10/site-packages/shapely/tests/legacy/test_mapping.py
2025-04-25 15:30:54 -03:00

15 lines
395 B
Python

import unittest
from shapely.geometry import Point, Polygon, mapping
class MappingTestCase(unittest.TestCase):
def test_point(self):
m = mapping(Point(0, 0))
assert m["type"] == "Point"
assert m["coordinates"] == (0.0, 0.0)
def test_empty_polygon(self):
"""Empty polygons will round trip without error"""
assert mapping(Polygon()) is not None