smnorris / terraincache

Download, cache, merge mapzen terrain-tiles
MIT License
2 stars 0 forks source link

load merged data to memory, avoid tempfiles #1

Closed smnorris closed 4 years ago

smnorris commented 5 years ago

It would be nice for interactive processing (and much cleaner) if there was a function to load data in a way that mimics (or is) a rasterio dataset. Dumping to temp file and reprojecting to another temp file with gdal_warp works fine for now though.

>>>from rasterio.plot import show
>>>dem = terraincache.load(bounds, zoom, dst_crs="EPSG:3005", res=30)
>>>dem.count
1
>>> dem.width
7731
>>> dem.height
7871
>>>show(dem, cmap='terrain')