PermafrostDiscoveryGateway / viz-staging

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

Check input property names against staging property names before processing data #2

Closed robyngit closed 2 years ago

robyngit commented 2 years ago

Output data fails to save when a property name is duplicated, but has different capitalization

When processing the new IWP data, an error is thrown when trying to save the first output tile, because of the new "Area" property name in the IWP data, and the "area" property that is created during the staging process.

Before processing, we should check whether the properties that are created during staging are already properties of the input data. These checks must be case insensitive. If there is a conflict, we could rename the input property (not ideal), use a different output property name, or throw an error.

Currently, staging creates the following properties: tile, centroid_tile, area, centroid_x, centroid_y, filename, identifier, centroid_within_tile. Some of these names are likely to conflict with properties of input data. We could consider prefixing them with staging_ or similar to avoid conflicts from the start.