Source repositoryDocumentation
I just wanted the imagery
I was working on a computer vision project and needed aerial imagery for a particular area. The images were available through a WMTS service, but getting them into Python was turning into a project of its own.
I had to understand how the service organised its tiles, work out which requests covered my area and put the images back together in the right place. Then there were failed requests and server limits to deal with. Before long, I was maintaining an imagery acquisition system when what I really wanted to do was get on with the machine learning.
I’d run into similar problems getting environmental data from WCS services for habitat suitability modelling. I didn’t want to build a different download pipeline every time I needed another dataset.
Getting data out of map services
A lot of useful geospatial data is available through online services rather than as files you can simply download. That includes aerial imagery, rendered map layers and numerical datasets such as elevation. WMS, WMTS, WCS and XYZ services make it possible to access large datasets without downloading everything.
But getting a particular area into Python can mean understanding layers, coordinate systems, tile grids and request limits, then fetching and assembling the results. That’s quite a lot of work to do before you can start analysing anything.
What I kept wanting was simple: point at a data source, choose an area and get an array back.
FIG. 01
Choose an area, get the imagery into Python
Aerial imagery around the Golden Gate in San Francisco. The highlighted area is shown as a separate image patch — the sort of data you might want to work with in Python.

What TileArray lets you do
TileArray is a Python library I’m building to handle that common work. You configure a source, specify an area and get a georeferenced xarray object that you can use with other Python tools.
For example, you might want aerial imagery for a computer vision model, elevation data for terrain analysis or a vegetation map layer to explore alongside other information. The examples below use publicly available imagery around Sacramento, elevation data from Helvellyn in the Lake District and an Environment Agency vegetation map.
FIG. 02
Different kinds of raster data
Aerial imagery, elevation data and a vegetation map layer — three examples retrieved from public services using TileArray.
Aerial imagery

Elevation for terrain analysis

Vegetation map layer

There’s an important difference between these outputs. A WCS elevation dataset contains numerical heights you can analyse. WMS map layers return rendered imagery, which can be useful in its own right but doesn’t necessarily contain the underlying measurements.
Once the result is in Python, I can use familiar libraries to inspect, visualise and process it, or pass it into a machine-learning workflow.
The documentation has working examples and a quick start.
How it works
TileArray provides one interface for several types of service. It plans the requests needed for an area and works out how their results fit together. The result is a lazy, Dask-backed xarray object: the data is fetched and assembled when you compute it, rather than when you first describe the area.
A lot happens between a map service and a Python array
Things you have to work out
Describe what you need. Work with the result.
A few design choices have mattered along the way.
Don’t overwhelm the server. The library limits concurrent requests, retries failures and uses caching where appropriate. I’d rather see an explicit error than quietly get an incomplete array.
Only fetch when needed. Planning the request shouldn’t mean downloading every pixel straight away. Using Dask lets the work happen when the array is computed.
Keep coordinate systems explicit. TileArray doesn’t silently reproject the mosaic. If the analysis needs a different coordinate system, I can do that separately with something like rioxarray.
There’s a more detailed explanation of the pipeline in the documentation.
Where it fits
TileArray is for getting data into Python, not replacing GIS or raster-processing libraries. You still need a valid source configuration, including a layer, coverage or zoom level where the service requires one. Different services have their quirks, so there’s still some configuration and testing involved.
It’s alpha software, and the API may change. You can install it with pip install tilearray or uv add tilearray. The source code is public under the Apache 2.0 licence.