Skip to content

Commit 2feee54

Browse files
committed
bbox read from already calculated metadata
there is no sense in reading it from source file once again
1 parent 3fc3b5f commit 2feee54

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pygeoapi/provider/xarray_.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,7 @@ def gen_covjson(self, metadata, data, fields):
244244

245245
LOGGER.debug('Creating CoverageJSON domain')
246246
mint, maxt = metadata['time']
247-
startx = data.coords[self.x_field].values[0]
248-
stopx = data.coords[self.x_field].values[-1]
249-
starty = data.coords[self.y_field].values[0]
250-
stopy = data.coords[self.y_field].values[-1]
247+
startx, starty, stopx, stopy = metadata['bbox']
251248

252249
cj = {
253250
'type': 'Coverage',

0 commit comments

Comments
 (0)