postgis
Advanced tools
+1
-1
| Metadata-Version: 1.1 | ||
| Name: postgis | ||
| Version: 1.0.1 | ||
| Version: 1.0.2 | ||
| Summary: Pyscopg and asyncpg helpers to work with PostGIS. | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/yohanboniface/python-postgis |
| Metadata-Version: 1.1 | ||
| Name: postgis | ||
| Version: 1.0.1 | ||
| Version: 1.0.2 | ||
| Summary: Pyscopg and asyncpg helpers to work with PostGIS. | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/yohanboniface/python-postgis |
+2
-2
@@ -58,5 +58,5 @@ from .geometry import Geometry | ||
| writer.write_double(self.y) | ||
| if self.z: | ||
| if self.z is not None: | ||
| writer.write_double(self.z) | ||
| if self.m: | ||
| if self.m is not None: | ||
| writer.write_double(self.m) | ||
@@ -63,0 +63,0 @@ |
+1
-1
@@ -49,3 +49,3 @@ """Pyscopg and asyncpg helpers to work with PostGIS.""" | ||
| VERSION = (1, 0, 1) | ||
| VERSION = (1, 0, 2) | ||
@@ -52,0 +52,0 @@ setup( |
@@ -18,9 +18,14 @@ import pytest | ||
| def test_point_with_geography_column(cursor): | ||
| @pytest.mark.parametrize('expected', [ | ||
| (1, -2, 3), | ||
| (-1.123456789, 2.987654321, 231), | ||
| (1, -2, 0), | ||
| ]) | ||
| def test_point_geography_column_should_round(cursor, expected): | ||
| cursor.execute('CREATE TABLE geography_point ("geom" geography(PointZ))') | ||
| params = [Point(1, 2, 3, srid=4326)] | ||
| params = [Point(*expected, srid=4326)] | ||
| cursor.execute('INSERT INTO geography_point (geom) VALUES (%s)', params) | ||
| cursor.execute('SELECT geom FROM geography_point WHERE geom=%s', params) | ||
| geom = cursor.fetchone()[0] | ||
| assert geom.coords == (1, 2, 3) | ||
| assert geom.coords == expected | ||
| cursor.execute('DROP TABLE geography_point') |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
35360
0.44%676
0.75%