Skip to content

Edr fixed axis #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pygeoapi/provider/xarray_.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
self.axes = [self._coverage_properties['x_axis_label'],
self._coverage_properties['y_axis_label'],
self._coverage_properties['time_axis_label']]
self.time_axis_covjson = provider_def.get('time_axis_covjson') or self.time_field

Check failure on line 95 in pygeoapi/provider/xarray_.py

View workflow job for this annotation

GitHub Actions / flake8_py3

pygeoapi/provider/xarray_.py#L95

[E501] line too long

self.get_fields()
except Exception as err:
Expand Down Expand Up @@ -249,7 +249,7 @@
"""

LOGGER.debug('Creating CoverageJSON domain')
minx, miny, maxx, maxy = metadata['bbox']
startx, starty, stopx, stopy = metadata['bbox']
mint, maxt = metadata['time']

selected_fields = {
Expand All @@ -264,20 +264,20 @@
'domainType': 'Grid',
'axes': {
'x': {
'start': minx,
'stop': maxx,
'start': startx,
'stop': stopx,
'num': metadata['width']
},
'y': {
'start': miny,
'stop': maxy,
'start': starty,
'stop': stopy,
'num': metadata['height']
},
self.time_axis_covjson: {
'values': [str(i) for i in data.coords[self.time_field].values]

Check failure on line 277 in pygeoapi/provider/xarray_.py

View workflow job for this annotation

GitHub Actions / flake8_py3

pygeoapi/provider/xarray_.py#L277

[E501] line too long
#'start': mint,

Check failure on line 278 in pygeoapi/provider/xarray_.py

View workflow job for this annotation

GitHub Actions / flake8_py3

pygeoapi/provider/xarray_.py#L278

[E265] block comment should start with
#'stop': maxt,

Check failure on line 279 in pygeoapi/provider/xarray_.py

View workflow job for this annotation

GitHub Actions / flake8_py3

pygeoapi/provider/xarray_.py#L279

[E265] block comment should start with
#'num': metadata['time_steps']

Check failure on line 280 in pygeoapi/provider/xarray_.py

View workflow job for this annotation

GitHub Actions / flake8_py3

pygeoapi/provider/xarray_.py#L280

[E265] block comment should start with
}
},
'referencing': [{
Expand All @@ -295,7 +295,7 @@
for key, value in selected_fields.items():
parameter = {
'type': 'Parameter',
'description': {'en':value['title']},

Check failure on line 298 in pygeoapi/provider/xarray_.py

View workflow job for this annotation

GitHub Actions / flake8_py3

pygeoapi/provider/xarray_.py#L298

[E231] missing whitespace after
'unit': {
'symbol': value['x-ogc-unit']
},
Expand All @@ -318,7 +318,7 @@
'type': 'NdArray',
'dataType': value['type'],
'axisNames': [
self.time_axis_covjson,'y', 'x'

Check failure on line 321 in pygeoapi/provider/xarray_.py

View workflow job for this annotation

GitHub Actions / flake8_py3

pygeoapi/provider/xarray_.py#L321

[E231] missing whitespace after
],
'shape': [metadata['time_steps'],
metadata['height'],
Expand Down Expand Up @@ -359,9 +359,9 @@
self.y_field = y_var
if self.time_field is None:
self.time_field = time_var

Check failure on line 362 in pygeoapi/provider/xarray_.py

View workflow job for this annotation

GitHub Actions / flake8_py3

pygeoapi/provider/xarray_.py#L362

[W293] blank line contains whitespace

# It would be preferable to use CF attributes to get width

Check failure on line 364 in pygeoapi/provider/xarray_.py

View workflow job for this annotation

GitHub Actions / flake8_py3

pygeoapi/provider/xarray_.py#L364

[E303] too many blank lines
# resolution etc but for now a generic approach is used to assess
# all of the attributes based on lat lon vars

Expand Down
Loading