Making Layers

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 23:00, 5 January 2006 (edit)
Adamhill (Talk | contribs)

← Previous diff
Revision as of 23:07, 5 January 2006 (edit) (undo)
Adamhill (Talk | contribs)

Next diff →
Line 4: Line 4:
1) WW's tiling scheme 1) WW's tiling scheme
 +
2) Formula to go from Lat/Long to WW tile numbers. 2) Formula to go from Lat/Long to WW tile numbers.
 +
3) Nowak has a C program that uses GDAL to do this and he has another progam that packs them up so you dont have to manage zillions of files + a little PHP script to extract the correct tile from the image pyramid. 3) Nowak has a C program that uses GDAL to do this and he has another progam that packs them up so you dont have to manage zillions of files + a little PHP script to extract the correct tile from the image pyramid.
==Things We Know We Don't Know== ==Things We Know We Don't Know==
-1) How does altitude relate to the layer?+1) How does altitude relate to a level in a layer being displayed?
-2) How does Tilesize and Level0TileDegrees affect #1?+ 
 +2) How does <TileSize> and <Level0TileDegrees> affect #1?
 + 
3) When do you know when to 'stop'? (ie. how do you know you are at 1:1) 3) When do you know when to 'stop'? (ie. how do you know you are at 1:1)
 +
4) Even though L0TD == 2.25, how do we get larger tiles when viewing the whole earth? 4) Even though L0TD == 2.25, how do we get larger tiles when viewing the whole earth?
Line 18: Line 23:
1)Obtain a georeferenced geotiff and reproject it to EPSG:4326. (or reproject with 'gdalwarp' in step 3 as you go along) 1)Obtain a georeferenced geotiff and reproject it to EPSG:4326. (or reproject with 'gdalwarp' in step 3 as you go along)
 +
2)Get the bounds of the GTiff. 2)Get the bounds of the GTiff.
-2)Take the lower left bound and round to the nearest multiple of L0TD for lat and lon.+ 
-2)Extract a L0TD sized chunk of the GeoTIFF starting at the coordinates of the above..+3)Take the lower left bounds and round to the nearest multiple of L0TD for lat and lon.
-3)Resample the chunk to <TileSize>(blow it up to 512x512px or whatever tilesize you pick) and convert to image format of choice.+ 
-4) Place it in the correct directory and rename the tile according to the naming formula. <insert naming formula>+4)Extract a L0TD sized chunk of the GeoTIFF starting at the coordinates of #3..
-5) Iterate in L0TD sized chunks over the entire TIFF till you have covered the upper and right side bounds.+ 
 +5)Resample the chunk to <TileSize>(scale it to 512x512px or whatever tilesize you pick) and convert to image format of choice.
 + 
 +6) Place it in the correct directory and rename the tile according to the naming formula. <insert naming formula here>
 + 
 +7) Iterate in L0TD sized chunks over the entire TIFF till you have covered the upper and right side bounds.
 + 
 +8) Divide L0TD by 2, and start over with #3
 + 
 +9) Stop when you are at 1:1 scale (ie your L0TD sized chunk is less than <TileSize> in one of the dimensions.

Revision as of 23:07, 5 January 2006

This is the beginning of an attempt to try to document a process so people that have GeoTIFF's can produce and maybe even serve up data for WorldWind. If you have any insights or info please add on.

Things We Know We Know

1) WW's tiling scheme

2) Formula to go from Lat/Long to WW tile numbers.

3) Nowak has a C program that uses GDAL to do this and he has another progam that packs them up so you dont have to manage zillions of files + a little PHP script to extract the correct tile from the image pyramid.

Things We Know We Don't Know

1) How does altitude relate to a level in a layer being displayed?

2) How does <TileSize> and <Level0TileDegrees> affect #1?

3) When do you know when to 'stop'? (ie. how do you know you are at 1:1)

4) Even though L0TD == 2.25, how do we get larger tiles when viewing the whole earth?


The Procedure for Making (As Far As I understand It Right Now)

1)Obtain a georeferenced geotiff and reproject it to EPSG:4326. (or reproject with 'gdalwarp' in step 3 as you go along)

2)Get the bounds of the GTiff.

3)Take the lower left bounds and round to the nearest multiple of L0TD for lat and lon.

4)Extract a L0TD sized chunk of the GeoTIFF starting at the coordinates of #3..

5)Resample the chunk to <TileSize>(scale it to 512x512px or whatever tilesize you pick) and convert to image format of choice.

6) Place it in the correct directory and rename the tile according to the naming formula. <insert naming formula here>

7) Iterate in L0TD sized chunks over the entire TIFF till you have covered the upper and right side bounds.

8) Divide L0TD by 2, and start over with #3

9) Stop when you are at 1:1 scale (ie your L0TD sized chunk is less than <TileSize> in one of the dimensions.

Personal tools