From b63dd73b462bc2d68c11a555cad2868b6a76c4e9 Mon Sep 17 00:00:00 2001 From: Caleb Robinson Date: Wed, 20 Jan 2021 23:17:41 -0800 Subject: [PATCH] Create test_fiona2.py --- tests/test_fiona2.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/test_fiona2.py diff --git a/tests/test_fiona2.py b/tests/test_fiona2.py new file mode 100644 index 0000000..7ddbf46 --- /dev/null +++ b/tests/test_fiona2.py @@ -0,0 +1,8 @@ +import fiona.transform + +geom = {'type': 'Polygon', 'coordinates': [[(440115.0, 4317302.0), (446180.0, 4317302.0), (446180.0, 4309726.0), (440115.0, 4309726.0), (440115.0, 4317302.0)]]} +geom = fiona.transform.transform_geom("EPSG:26918", "EPSG:4326", geom) +print(geom) + +# The expected result is approximately `{'type': 'Polygon', 'coordinates': [[(-75.69160116601654, 39.00268487761508), (-75.62156162389587, 39.00307904086472), (-75.62096527634455, 38.9348126572227), (-75.69093763250096, 38.93441944712403), (-75.69160116601654, 39.00268487761508)]]}` +assert geom["coordinates"][0][0] != (440115.0, 4317302.0)