Related to the discussion in geopandas/geopandas#1062
Currently, missing geometries (np.nan, None), are handled similarly to empty geometries:
In [1]: import pygeos
In [4]: a = np.array([None, np.nan, pygeos.Geometry("POLYGON EMPTY"), pygeos.box(0, 0, 1, 1)])
In [5]: a
Out[5]:
array([None, nan, <pygeos.Empty>,
<pygeos.Geometry POLYGON ((1 0, 1 1, 0 1, 0 0, 1 0))>],
dtype=object)
In [6]: pygeos.is_empty(a)
Out[6]: array([ True, True, True, False])
But I think, based on your comment in geopandas/geopandas#1062, that it is the idea to separate both concepts?
But also then, there are still some aspects that need to be decided. Quoting @caspervdw from the linked geopandas issue:
I am curious about how to deal with missing values in the various GEOS functions, especially for:
- predicates (unary and binary)
- integer-returning functions (like “get_num_points”
- aggregation functions (should “create_collection” skip or propagate NaN?)
Is it an idea to implement something like NaG (not-a-geometry)?
Related to the discussion in geopandas/geopandas#1062
Currently, missing geometries (np.nan, None), are handled similarly to empty geometries:
But I think, based on your comment in geopandas/geopandas#1062, that it is the idea to separate both concepts?
But also then, there are still some aspects that need to be decided. Quoting @caspervdw from the linked geopandas issue: