When we explode the polygon -> LineString or MultiPolygon -> MultiLineString, we take the exterior in such a way as to expand the number of rows.
This will probably happen with any polygon data with holes, as that expands a single polygon into multiple linestrings.
I think the way to fix this is to fix exterior to not change the unit of observation. I'm not sure which should be the "general" exterior operation (as defined in geoarrow-js). E.g. GeoPandas/shapely don't define an "exterior" operation on multipolygons; rather it returns None for multi polygons.
So maybe this should be a local function in deck.gl-layers to "exterior without changing the number of table rows"
First, this validation fails: https://github.com/geoarrow/deck.gl-layers/blob/7932573c9dd899dc4c87a2b4b339ecfb01376cfa/src/polygon-layer.ts#L150-L153
The bigger issue: https://github.com/geoarrow/deck.gl-layers/blob/7932573c9dd899dc4c87a2b4b339ecfb01376cfa/src/validate.ts#L48-L53
When we explode the polygon -> LineString or MultiPolygon -> MultiLineString, we take the
exterior
in such a way as to expand the number of rows.This will probably happen with any polygon data with holes, as that expands a single polygon into multiple linestrings.
I think the way to fix this is to fix
exterior
to not change the unit of observation. I'm not sure which should be the "general" exterior operation (as defined in geoarrow-js). E.g. GeoPandas/shapely don't define an "exterior" operation on multipolygons; rather it returnsNone
for multi polygons.So maybe this should be a local function in deck.gl-layers to "exterior without changing the number of table rows"