PermafrostDiscoveryGateway / viz-staging

PDG Visualization staging pipeline
Apache License 2.0
2 stars 1 forks source link

Convert multipolygon geometries into single polygons before staging #34

Open julietcohen opened 5 months ago

julietcohen commented 5 months ago

After we read in an input file to stage, we filter the geodataframe to just the rows that contain single polygon geometries here. If an input file contains all or some multipolygon geometries, these are still able to be staged by viz-staging, because they are polygons and not lines or points, so they should not be excluded. Instead of filtering them out, we should insert a step to explode them, which creates a single row for each polygon in the multipolygons. This was tested with Ingmar Nitze's lake size time series dataset.

Currently, if a file contains all multipolygons geometries, the workflow does not error or express this in the log explicitly. Instead, the workflow halts because there is nothing to stage, and outputs a warning message that there are no features in the file.

I see no issues with inserting this exploding step, but it should be tested with a branch off of develop with various kinds of input geometries. Overall, including this step will retain more geometries and therefore make the data more comprehensive.