yutannihilation commented on code in PR #503:
URL: https://github.com/apache/sedona-db/pull/503#discussion_r2679060235
##########
python/sedonadb/tests/functions/test_functions.py:
##########
@@ -1803,14 +1803,24 @@ def test_st_isring_non_linestring_error(eng, geom):
[
(None, None),
("MULTILINESTRING ((0 0, 1 0), (1 0, 1 1))", "LINESTRING (0 0, 1 0, 1
1)"),
+ # opposite direction
(
"MULTILINESTRING ((0 0, 1 0), (1 1, 1 0))",
"LINESTRING (0 0, 1 0, 1 1)",
- ), # opposite direction
+ ),
+ # non-touching
(
"MULTILINESTRING ((0 0, 1 0), (8 8, 9 9))",
"MULTILINESTRING ((0 0, 1 0), (8 8, 9 9))",
),
+ # empty cases
+ # ("POINT EMPTY", "POINT EMPTY"), # PostGIS returns POINT (nan, nan)
Review Comment:
While I actually get this error,
```
E AssertionError: Expected:
E [('POINT EMPTY',)]
E Got:
E [('POINT (nan nan)',)]
```
it seems this is not PostGIS's fault. Something seems wrong in conversion
between PostGIS and Python.
```
postgres=# SELECT ST_AsText(ST_LineMerge(ST_GeomFromText('POINT EMPTY')));
st_astext
-------------
POINT EMPTY
(1 row)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]