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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: GeoAlchemy2
3
- Version: 0.15.1
3
+ Version: 0.15.2
4
4
  Summary: Using SQLAlchemy with Spatial Databases
5
5
  Home-page: https://geoalchemy-2.readthedocs.io/en/stable/
6
6
  Author: Eric Lemoine
@@ -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=h3E-Sh3IPPVSlWjtPOYYGRF_UOqNkxsc15EvOiC6mkM,13001
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=HaRVLvIM9wsyzlSK4-kJJzg1wNrXFWTBkJkFB0Hga3U,1861
27
- GeoAlchemy2-0.15.1.dist-info/COPYING.rst,sha256=-bQKftq9uMOROzF7oN65kYBBIJKxTmBuDoftp27IC3I,1056
28
- GeoAlchemy2-0.15.1.dist-info/METADATA,sha256=yPxdSpR7pdJ73P3YI9yjsl_OasWEimMwtvOCKcZSdMo,2087
29
- GeoAlchemy2-0.15.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
30
- GeoAlchemy2-0.15.1.dist-info/top_level.txt,sha256=3kGUTcfBeXd61zFpof6-qiuw1peNF_HuZabgHQgrdis,12
31
- GeoAlchemy2-0.15.1.dist-info/RECORD,,
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,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
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 ]+) *(\([\d\. ,\(\)]+\))")
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(" ", "")