How to speed up tiles performance

Topics: SharpMap Project
Mar 27, 2011 at 9:42 AM

Hi.

I have a library with many tiles (*.jpg, *.jpw). I need to load them and manipulate them (Pan/Zoom...). I tried to work with GdalRasterLayer but it is too slow. Can you give me an example how to work with OsmTileSource or any other quick way?. How to connect the layer to the tiles and how to load the required tiles online.


* I am working locally (disconnected from web).

Thanks Ahead.

Developer
Mar 27, 2011 at 3:18 PM

hi snoriani,

You mention tiles as source, but I assume they are not a pyramid of 256x256 pixel tiles, but much bigger rasters. 

Perhaps you could first create a tile pyramide out of these. You could use a tool like MapTiler.org to try to do that (not sure if they support your format). If you have this tile pyramid on disk you could then use the FileTileProvider to read these tiles into SharpMap.

http://brutile.codeplex.com/SourceControl/changeset/view/1887ca9e93d0#BruTile%2fFileSystem%2fFileTileProvider.cs

An alternative you could look at is gdal2tiles. http://www.gdal.org/gdal2tiles.html

hope this helps,

Paul

Mar 28, 2011 at 10:35 AM
Hi.
 
I have a library in my local disk  with many jpg/jpw images (256x256). Currently i am using the GdalRasterLayer but it is too slow. . Can i have an example how to work with FileTileProvider: How to create a tiles layer and read the images (tiles) as a georeference data ?.
 
Thanks.
Developer
Mar 28, 2011 at 1:47 PM

So you have tiles but they are georeferenced individually, that is awkward. Usually the location and name of the tile define it's extent. How did you generate the tiles? What is the directory structure?

In the Mapsui project there is an example which uses the FileTileProvider:

http://mapsui.codeplex.com/SourceControl/changeset/view/64906#1025790

see, this line:

mapControl.Map = CreateMap(new TileLayer(new MapTilerTileSource()));

 Paul

Mar 28, 2011 at 5:03 PM
Hi.
 
For each tile (jpg image) there is an info data (jpw file) that contains its coordinates and size. i generate the tiles using 'Google Satellite Super Get' tool. it keeps the images in a directories were each directory referes to a level.
 
I saw the link to the example. Can you direct me to a more specific example that reads images from the local disk and display them as a georeference data?.