False color rendering of Cloud Optimized GeoTIFF composite of Planet’s Open California data (CC-BY-SA), created on the fly with tiles.rdnt.io

COG Map and tiles.rdnt.io

Chris Holmes
Radiant Earth Insights
3 min readMay 14, 2018

--

The Cloud Optimized GeoTIFF (COG) revolution marches on! I wanted to share a couple cool projects that we’ve been working on to help demonstrate the power of COG’s.

COG Map

The first is called COG Map, and it’s my first real coding project in over a decade, so I’m pretty proud of it. My Technical Fellowship at Radiant.Earth supports me to push forward standards and infrastructure for Cloud Optimized GeoTIFF’s and SpatioTemporal Asset Catalogs. After putting up cogeo.org to explain COG’s and then the online validator, it became clear that we needed a simple site to demonstrate how you could easily make an interactive web map of any online geotiff file that is properly optimized.

A COG from OpenAerialMap loaded up in to COG Map

The application is pretty simple — you can take any COG online, enter it in the text box, and the map will zoom to the location and render tiles. It does include the COG location and current view in the URL hash, so you can copy and paste it and share with a friend, and they can see the exact view you’re looking at.

I had lots of help, with Vincent getting rio-tiler to work with arbitrary COG’s online and packaging it up as lambda-tiler. And I got lots of help from my expert javascript mentors — Tim, Jared and Orestis. It was also really fun to do things fully open source, thanks Drew from DevSeed (and Ian for connecting me), Brad and David for contributing and making it a real open source project. Collaboration will continue on it at github.com/radiantearth/cog-map.

tiles.rdnt.io

Most of the power of the COG Map comes from a service stood up by Radiant.Earth, called tiles.rdnt.io. It is a hosted instance, running on AWS Lambda, of marblecutter-virtual, which my co-fellow at Radiant, Seth, created. It extends his core marblecutter tiler to handle cloud optimized geotiffs, and adds some additional tweaks to help things perform well.

tiles.rdnt.io preview, rendering false color on the fly from a COG created by Google Earth Engine. Imagery credit: Planet Open California data (CC-BY-SA),

The service is currently available for anyone who wants to use tiles from COG’s (though if it gets tons of use then Radiant.Earth will likely limit it to a subset of users in the future. So please use it, but don’t abuse it). It includes a number of useful endpoints:

  • /tiles/{z}/{x}/{y} creates xyz tiles for any COG specified in the URL parameter, and hitting the tiles/ endpoint directly will return a TileJSON. It can handle retina tiles output and return png/jpeg depending on which works best, and also render user specified bands.
  • /bounds/ returns the geographic extent of the COG, which is quite useful to automatically zoom the map.
  • /preview/ gives a leaflet map of the COG that you can explore and share.

Full documentation is available in the github repo.

Next Steps

Both COG Map and tiles.rdnt.io will continue to evolve, to further show off the power of cloud optimized geotiffs. We hope to add band selection to cog-map, and we’ll look to add basic band math to the tile service. And then we also will be using the tile service to power html views of SpatioTemporal Asset Catalogs, which should be a big step forward. Contributions are welcome, as all the work is open source. Thanks again to Radiant.Earth for supporting this work!

--

--

Chris Holmes
Radiant Earth Insights

Product Architect @ Planet, Board Member @ Open Geospatial Consortium, Technical Fellow @ Radiant.Earth