I think i was going about getting my geotiffs on cesium all wrong. I was insisting on using KML but I think I don't need to do that as gdal2tiles seems to write out tms which i believe createTileMapServiceImageryProvider can help with. The problem is this:
I have a script htat processes some goe tiffs into what I thought was TMS format using gdal2tiles. The thing is when I try to create a viewer to use this info:
var l1924 = layers.addImageryProvider(new Cesium.createTileMapServiceImageryProvider({
url:'myTiles/tiles',
minimumLevel: 9,
maximumLevel: 14,
credit: 'moi'
}));
I get no errors in the imagery provided layers but it does fail to load a lot of png files from the tileset. I realize the numbers are just only slightly off than the tile set I have on disk and I cannot figure out what is causing this.
So on my disk my gdal2tiles created this:
Location
10/66/314.png
10/66/315.png
but cesium is looking for it in the 9 directory e.g:
no idea why the diff or how to get them to sync up
The tilemapsource.xml file:
<?xml version="1.0" encoding="utf-8"?>
<Title>Maui.nitf</Title>
<Abstract></Abstract>
<SRS>EPSG:4326</SRS>
<BoundingBox minx="-156.67628904939917" miny="20.55945745641503" maxx="-156.15232902955518" maxy="20.90565525332952"/>
<Origin x="-156.67628904939917" y="20.55945745641503"/>
<TileFormat width="256" height="256" mime-type="image/png" extension="png"/>
<TileSets profile="geodetic">
<TileSet href="9" units-per-pixel="0.00137329101562" order="9"/>
<TileSet href="10" units-per-pixel="0.00068664550781" order="10"/>
<TileSet href="11" units-per-pixel="0.00034332275391" order="11"/>
<TileSet href="12" units-per-pixel="0.00017166137695" order="12"/>
<TileSet href="13" units-per-pixel="0.00008583068848" order="13"/>
<TileSet href="14" units-per-pixel="0.00004291534424" order="14"/>
</TileSets>
</TileMap>