ThinkGeo.com    |     Documentation    |     Premium Support

Load satllite map by tiling

Hi,


I have one big satllite map, it's very slow when paning/zooming if I loaded it as a whole, so I make pyrimids and divide eachlevel into pieces.


For example:


The first level is 1000*1000,  which will be shown when scale > n, I divide it into  16 pieces, each one 250*250


The second level is 400*400, which will be  shown when sacle < n, I divide it into  4 pieces, each one 200*200.


Now, when coming to certain scale,  I want to load the images only within current window client area. What shall I do?


 Thank U.


Senlin



Senlin,


I have to say that this is a complex logic which is very similar with our cache system.
 
Basically our logic behind should have a grid system (which probably you can try to use our MapSuiteTileMatrix class), and then you should a data structure which holds the tiles and from which we can get back the tiles based on the calculation of MapSuiteTileMatrix.
 
The MapSuiteTileMatrix is dependent with scale.
 
You can have a try on the OverlayTileCache to see how it is going:

staticOverlay.TileCache = new FileBitmapTileCache(@"C:\temp");

Any more questions please feel free to let me know.


 
Thanks.
 
Yale

Yale, 
 Thank u. 
  
 Well, now I  use the WMS with ThinkGeo. it works not so bad. And my questiion is: 
 Does the application re-use the cache file(tiles) created by WMS or it will re-create the cache files every times.  
  
  
 Senlin

Senlin, 
  
 If you set the cache (in latest package of Desktop Edition since 3.0.392 & later) or it will be used automatically in last public release (3.0.362). 
  
 Any more questions just let me know. 
  
 Thanks. 
  
 Yale 


Hi 
 thanks very much ! 
   would you please give me a sample of  how to use MapSuiteTileMatrix class and Tiles Class.The size of my image data is 10G ,so I split my data to 7 level zoom  (zoomlevel0~zoomlevel6),the format of tiles is png,the Size is  512 X 512, how can I to use  MapSuiteTileMatrix class and Tiles Class to speed up displaying the image.

Senlin,


Here a sample showing how to use that class.  Click the button “Generate” and it will generate the cache tiles for you, click the button LoadMap and it will consume the cache files for the Desktop.
 

 
 
 
As Yale mentioned, the LoadMap function in this sample is only Available for the Desktop newer than 3.0.392,  you cannot use this function with an older DesktopEdition.
 
Let us know if you have any issues.
 
Thanks,
 
Ben

1134-TestGenerateTilingImages.zip (11.4 KB)

Ben, 
 Thank u. 
 I am waiting for you new version. 
  
 Senlin

Senlin, 
  
 The new version will be availabe in this month I think. Hope that’s not too late for you. 
  
 Thanks, 
  
 Ben