-
Notifications
You must be signed in to change notification settings - Fork 733
Description
test_match_geopandas_series.py
is where we compare that our results match the results of geopandas. We reuse the same lists of geometries (e.g self.linestrings
, self.geoms
, etc) in nearly every test. I wrote these cases very early and failed to consider various edge cases. In this issue, I'd like to add some test cases to these lists (e.g self.linestrings
). I wouldn't be surprised if we fail some of these.
Here are the edge cases I think we should add. I think each of these should be their own PR, since it's possible that they cause test failures and require us to modify the implementation of existing sedona geopandas functions.
- empty geometries (e.g
POINT EMPTY
) - non-valid polygons (e.g
POLYGON((0 0, 0 1, 2 1, 2 2, 1 2, 1 0, 0 0))
, see here to learn about validity) - GeometryCollections cases (apparently, there's only one case at the moment...)
- geom with only empty geometries
- geom collection w/ only a single geom (e.g is_closed only applies to linestrings, should it return true for this GeomCol (< a single closed linestring >)?
- Z and M dimensions for everything
- Other geometry types that Sedona doesn't support (e.g LinearRing, box)
Here's an example of the current cases (and hence where we would need to add more cases).
sedona/python/tests/geopandas/test_match_geopandas_series.py
Lines 59 to 67 in 6dc39e7
self.points = [Point(x, x + 1) for x in range(3)] | |
self.multipoints = [MultiPoint([(x, x + 1), (x + 2, x + 3)]) for x in range(3)] | |
self.linestrings = [LineString([(x, x + 1), (x + 2, x + 3)]) for x in range(3)] | |
self.linearrings = [ | |
LinearRing([(x, x), (x + 1, x), (x + 1, x + 1), (x, x + 1), (x, x)]) | |
for x in range(3) |