GeoAlchemy2 0.15.1__py3-none-any.whl → 0.15.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {GeoAlchemy2-0.15.1.dist-info → GeoAlchemy2-0.15.2.dist-info}/METADATA +1 -1
- {GeoAlchemy2-0.15.1.dist-info → GeoAlchemy2-0.15.2.dist-info}/RECORD +7 -7
- {GeoAlchemy2-0.15.1.dist-info → GeoAlchemy2-0.15.2.dist-info}/WHEEL +1 -1
- geoalchemy2/elements.py +1 -1
- geoalchemy2/types/dialects/sqlite.py +5 -0
- {GeoAlchemy2-0.15.1.dist-info → GeoAlchemy2-0.15.2.dist-info}/COPYING.rst +0 -0
- {GeoAlchemy2-0.15.1.dist-info → GeoAlchemy2-0.15.2.dist-info}/top_level.txt +0 -0
@@ -3,7 +3,7 @@ geoalchemy2/_functions.py,sha256=e8v584Fx_fmh8XnJvkuYEXrcyPDiWV95Mu2yw6L-LHY,628
|
|
3
3
|
geoalchemy2/_functions_helpers.py,sha256=hVM9DDTgf-oM27EZu6ycW1y2ENnSxUJixdINetWsu0E,2651
|
4
4
|
geoalchemy2/alembic_helpers.py,sha256=WYjKiVVyHtlB4DI22z-G0-x8NnG8othAINUwmxBCMcs,27885
|
5
5
|
geoalchemy2/comparator.py,sha256=WUDXn10doDlJVnYiWbVIAhhBu7N5AO9BI8sNf2mhpA4,8100
|
6
|
-
geoalchemy2/elements.py,sha256=
|
6
|
+
geoalchemy2/elements.py,sha256=5yd_7dUQGbrLvgYvo6A2YYAFwTvP4_BskIdBCB0DrlM,13002
|
7
7
|
geoalchemy2/exc.py,sha256=Nn9bRKB_35skWDMkEf4_Y2GL6gvguPVycPZcbOfa69g,226
|
8
8
|
geoalchemy2/functions.py,sha256=0he8hy_SAWpXAFPdfg32NMW5G0FaZP7yVl0jn0MRLBQ,10320
|
9
9
|
geoalchemy2/functions.pyi,sha256=rKCKdDSVTgeUQHItkOKqJSEuyKmVJ30bpjLpCPwMI5g,108636
|
@@ -23,9 +23,9 @@ geoalchemy2/types/dialects/common.py,sha256=gxKaRQhIODJhu_yBurlvFNAqGh3LfPNu_DcO
|
|
23
23
|
geoalchemy2/types/dialects/geopackage.py,sha256=nRmN_PnF-CWMEHkWhKVdsybnw3SvXZIBXAHIHXJLTqw,147
|
24
24
|
geoalchemy2/types/dialects/mysql.py,sha256=zMNi1920v0XlVaCJWSwtq0b0P5YQRn8y3X_rBxC5KEw,1790
|
25
25
|
geoalchemy2/types/dialects/postgresql.py,sha256=7NBKEbDJXMwX8Sgs6o_N2bAUHgjUcjbrdmYOA7sDiRw,1117
|
26
|
-
geoalchemy2/types/dialects/sqlite.py,sha256=
|
27
|
-
GeoAlchemy2-0.15.
|
28
|
-
GeoAlchemy2-0.15.
|
29
|
-
GeoAlchemy2-0.15.
|
30
|
-
GeoAlchemy2-0.15.
|
31
|
-
GeoAlchemy2-0.15.
|
26
|
+
geoalchemy2/types/dialects/sqlite.py,sha256=B-yLzaQcqL_4dXoOPX9D9IXw2ZQlq-Tibv_kqUIBeb4,2104
|
27
|
+
GeoAlchemy2-0.15.2.dist-info/COPYING.rst,sha256=-bQKftq9uMOROzF7oN65kYBBIJKxTmBuDoftp27IC3I,1056
|
28
|
+
GeoAlchemy2-0.15.2.dist-info/METADATA,sha256=7ti009u_zE-vAPIyGyfVcC-oZzloZ-TYOKOV7ZahmKo,2087
|
29
|
+
GeoAlchemy2-0.15.2.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
30
|
+
GeoAlchemy2-0.15.2.dist-info/top_level.txt,sha256=3kGUTcfBeXd61zFpof6-qiuw1peNF_HuZabgHQgrdis,12
|
31
|
+
GeoAlchemy2-0.15.2.dist-info/RECORD,,
|
geoalchemy2/elements.py
CHANGED
@@ -117,7 +117,7 @@ class WKTElement(_SpatialElement):
|
|
117
117
|
"""
|
118
118
|
|
119
119
|
_REMOVE_SRID = re.compile("(SRID=([0-9]+); ?)?(.*)")
|
120
|
-
SPLIT_WKT_PATTERN = re.compile(r"((SRID=\d+) *; *)?([\w ]+) *(\([
|
120
|
+
SPLIT_WKT_PATTERN = re.compile(r"((SRID=\d+) *; *)?([\w ]+) *(\([-\d\. ,\(\)]+\))")
|
121
121
|
|
122
122
|
geom_from: str = "ST_GeomFromText"
|
123
123
|
geom_from_extended_version: str = "ST_GeomFromEWKT"
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"""This module defines specific functions for SQLite dialect."""
|
2
2
|
|
3
3
|
import re
|
4
|
+
import warnings
|
4
5
|
|
5
6
|
from geoalchemy2.elements import RasterElement
|
6
7
|
from geoalchemy2.elements import WKBElement
|
@@ -12,6 +13,10 @@ def format_geom_type(wkt, default_srid=None):
|
|
12
13
|
"""Format the Geometry type for SQLite."""
|
13
14
|
match = re.match(WKTElement.SPLIT_WKT_PATTERN, wkt)
|
14
15
|
if match is None:
|
16
|
+
warnings.warn(
|
17
|
+
"The given WKT could not be parsed by GeoAlchemy2, this could lead to undefined "
|
18
|
+
f"behavior with Z, M or ZM geometries or with incorrect SRID. The WKT string is: {wkt}"
|
19
|
+
)
|
15
20
|
return wkt
|
16
21
|
_, srid, geom_type, coords = match.groups()
|
17
22
|
geom_type = geom_type.replace(" ", "")
|
File without changes
|
File without changes
|