Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
I don't know your tiling system, but have you tried gdal_retile.py ? –  radouxju Feb 7 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.

http://rasternormalizer.codeplex.com/releases/view/50769

share|improve this answer
    
check into GDAL's nearblack app for the non-data portions of your images: gdal.org/nearblack.html –  Dave Lowther Jun 1 '13 at 1:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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