I have written a standalone application which renders a globe similar to GoogleEarth/WorldWind which is currently able to display raster imagery from WMS servers. The native geodesy of this application for rendering purposes is WGS84.

The tiling system employed is similar to this: WorldWind tiling system

I now want to add support for importing geo-referenced rasters (supported by GDAL) directly.

I can successfully import and render world files which have a direct 1:1 mapping to my tiling scheme. I'm using the GDALBand ReadRaster method to read the raster into memory.

The problem I am facing is that I am currently stuck at trying to figure out how to import rasters that do not map nicely to my tiling scheme (e.g a tif that has it's coordinates not match up nicely to any tile corner/boundary).

I know WMS can deal with this as I can get it to render rasters with WMS that do not nicely match up to my tile system. It looks like it just pads everything out with a default colour.

I'm interested to learn of possible techniques to deal with this problem.

Will it require padding out the gaps?

Do I need find the level which will result in tiles smaller than my raster and then split up the raster that way? This still results in the same question of what do I do with the corners and edges of the raster which are only partially covered by a tile.

  • I don't know your tiling system, but have you tried gdal_retile.py ?
    – radouxju
    Feb 7, 2014 at 12:48

1 Answer 1


This raster normalizer is capable of splitting images into tiles. For the empty areas of your tiles, I believe you'll have to render certain pixel values as transparent.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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