How can Planet Labs' mosaic Tile Map Service (TMS) be used with GDAL like in the OpenLayers example? The API requires authentication and other specific settings.

1 Answer 1


The following XML template can be used in GDAL for Planet Labs mosaics:

<GDAL_WMS> <!-- Planet Labs --> <Service name="TMS"> <ServerUrl>https://tiles.planet.com/v0/mosaics/color_balance_mosaic/${z}/${x}/${y}.png</ServerUrl> <SRS>EPSG:3857</SRS> <ImageFormat>image/png</ImageFormat> <Transparent>TRUE</Transparent> </Service> <DataWindow> <UpperLeftX>-20037508.34</UpperLeftX> <UpperLeftY>20037508.34</UpperLeftY> <LowerRightX>20037508.34</LowerRightX> <LowerRightY>-20037508.34</LowerRightY> <TileLevel>15</TileLevel> <TileCountX>1</TileCountX> <TileCountY>1</TileCountY> <YOrigin>top</YOrigin> </DataWindow> <Projection>EPSG:3857</Projection> <BlockSizeX>256</BlockSizeX> <BlockSizeY>256</BlockSizeY> <BandsCount>4</BandsCount> <ZeroBlockHttpCodes>204,303,400,404,500,501</ZeroBlockHttpCodes> <ZeroBlockOnServerException>true</ZeroBlockOnServerException> <MaxConnections>5</MaxConnections> <UserPwd>API_KEY</UserPwd> <Cache> <Path>/tmp/cache_planetlabs.tms</Path> </Cache> </GDAL_WMS>

Replace API_KEY with your actual API key and possibly set the mosaic name to something other than color_balance_mosaic. You can also change the location in <Path> to a suitable location on your computer or remove the entire <Cache> section if you don't want to cache tiles locally.

Disclamer: I work for Planet Labs.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.