[Fixes #2492] Fixes the support for creation of dataset with generic Geometry type#2493
[Fixes #2492] Fixes the support for creation of dataset with generic Geometry type#2493
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds support for a generic 'Geometry' attribute type during dataset creation by updating the attribute row component, the validation schema, and the parsing logic. It also includes a new unit test and the necessary translation string. A review comment suggests refactoring the geometry type check in the parsing utility to reference the validation schema's enum directly, reducing code duplication and improving maintainability.
| && [ | ||
| AttributeTypes.Point, | ||
| AttributeTypes.LineString, | ||
| AttributeTypes.Polygon | ||
| AttributeTypes.Polygon, | ||
| AttributeTypes.Geometry | ||
| ].includes(geomProp.const) |
There was a problem hiding this comment.
The list of valid geometry types is duplicated here and in the validateSchema definition (lines 78-83). To improve maintainability and ensure consistency, consider referencing the enum defined in validateSchema instead of hardcoding the list again.
&& validateSchema.properties.geometry_type.enum.includes(geomProp.const)
This PR fixes #2492