Kontinuation commented on code in PR #2090:
URL: https://github.com/apache/sedona/pull/2090#discussion_r2218107533
##########
common/src/test/java/org/apache/sedona/common/S2Geography/TestHelper.java:
##########
@@ -18,18 +18,23 @@
*/
package org.apache.sedona.common.S2Geography;
+import static org.apache.sedona.common.S2Geography.Accessors.S2_isEmpty;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import com.esotericsoftware.kryo.io.UnsafeInput;
import com.google.common.geometry.*;
+import java.awt.*;
Review Comment:
I believe this is not needed.
##########
common/src/test/java/org/apache/sedona/common/S2Geography/WKTReadWriterTest.java:
##########
@@ -117,4 +113,18 @@ public void collection_roundTrip() throws ParseException {
assertEquals(
wkt, writeWithPrecision(reader.read(wkt), new
PrecisionModel(PrecisionModel.FIXED)));
}
+
+ @Test
+ public void empty_roundTrip() throws ParseException {
+ String point = "POINT EMPTY";
+ assertEquals(
+ point, writeWithPrecision(reader.read(point), new
PrecisionModel(PrecisionModel.FIXED)));
+ String line = "LINESTRING EMPTY";
+ assertEquals(
+ line, writeWithPrecision(reader.read(line), new
PrecisionModel(PrecisionModel.FIXED)));
+ String polygon = "POLYGON EMPTY";
+ assertEquals(
+ polygon,
+ writeWithPrecision(reader.read(polygon), new
PrecisionModel(PrecisionModel.FIXED)));
+ }
Review Comment:
Can we add tests for `MULTIPOINT EMPTY`, `MULTILINESTRING EMPTY`,
`MULTIPOLYGON EMPTY` and `GEOMETRYCOLLECTION EMPTY` for completeness?
--
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]