Skip to content

Commit 57214b4

Browse files
add docstring
1 parent 17ee289 commit 57214b4

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

contextily/tile.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,26 @@ def _calculate_zoom(w, s, e, n):
333333

334334

335335
def _merge_tiles(tiles, arrays):
336-
# create n_tilesx2 array with column of x and y coordinates
336+
"""
337+
Merge a set of tiles into a single array.
338+
339+
Parameters
340+
---------
341+
tiles : list of mercantile.Tile objects
342+
The tiles to merge.
343+
arrays : list of numpy arrays
344+
The corresponding arrays (image pixels) of the tiles. This list
345+
has the same length and order as the `tiles` argument.
346+
347+
Returns
348+
-------
349+
img : np.ndarray
350+
Merged arrays.
351+
extent : tuple
352+
Bounding box [west, south, east, north] of the returned image
353+
in long/lat.
354+
"""
355+
# create (n_tiles x 2) array with column for x and y coordinates
337356
tile_xys = np.array([(t.x, t.y) for t in tiles])
338357

339358
# get indices starting at zero

0 commit comments

Comments
 (0)