You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

postgis

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postgis - pypi Package Compare versions

Comparing version
1.0.1
to
1.0.2
+1
-1
PKG-INFO
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

@@ -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 @@

@@ -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')