You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "LakshmiSowmya04 (via GitHub)" <gi...@apache.org> on 2025/12/11 03:34:40 UTC
Re: [PR] feat(c/sedona-geos): Implement ST_ExteriorRing [sedona-db]
LakshmiSowmya04 commented on code in PR #409:
URL: https://github.com/apache/sedona-db/pull/409#discussion_r2608988280
##########
python/sedonadb/tests/functions/test_functions.py:
##########
@@ -2935,3 +2929,32 @@ def test_st_NRings(eng, geom, expected):
f"SELECT ST_NRings({geom_or_null(geom)})",
expected,
)
+
+
+@pytest.mark.parametrize("eng", [SedonaDB, PostGIS])
+@pytest.mark.parametrize(
+ ("geom", "expected"),
+ [
+ (None, None),
+ ("POINT (1 2)", None),
+ ("LINESTRING (0 0, 1 1, 2 2)", None),
+ ("MULTILINESTRING ((0 0, 1 1), (2 2, 3 3))", None),
+ ("POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))", "LINESTRING (0 0, 1 0, 1 1, 0 1, 0 0)"),
+ (
+ "POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0), (1 1, 1 2, 2 2, 2 1, 1 1))",
+ "LINESTRING (0 0, 10 0, 10 10, 0 10, 0 0)",
+ ),
+ (
+ "MULTIPOLYGON (((0 0, 1 0, 1 1, 0 1, 0 0)), ((10 10, 20 10, 20 20, 10 20, 10 10)))",
+ None,
+ ),
+ ("GEOMETRYCOLLECTION(POINT(1 1), POLYGON((0 0, 1 0, 1 1, 0 0)))", None),
+ (
+ "POLYGON Z ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1))",
+ "LINESTRING Z (0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)",
Review Comment:
can I ask how you figured out we have to use the polygon M and polygon ZM cases for this? I cannot see it in the documentation.
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org