-
-
Notifications
You must be signed in to change notification settings - Fork 314
Description
Is your feature request related to a problem? Please describe.
It is unclear how a formatter is supposed to discern the type of data it is formatting. As implemented,
Line 714 in 66876ab
| def get_dataset_formatters(dataset: dict) -> dict: |
is called for a Feature and EDR provider. As such any formatter can receive CoverageJSON or GeoJSON based data. Furthermore, any formatter that exists in
Lines 75 to 77 in 66876ab
| 'formatter': { | |
| 'CSV': 'pygeoapi.formatter.csv_.CSVFormatter' | |
| }, |
CovJSON -> CSV formatter would subsume the default formatter, thereby breaking the GeoJSON -> CSV default formatter.
Describe the solution you'd like
#2235 begins to address this by adding a simple point CovJSON -> CSV functionality. This does not take an opinion on the enabling of formatters. For an EDR provider to ever use the formatter it would have to be configured. Not sure if this is the intended behavior.
Describe alternatives you've considered
Formatters could be specific for a provider but even then an EDR provider for /locations is liable to return both GeoJSON and CovJSON
Additional context
Add any other context or screenshots about the feature request here.