Problem with ITileSchema parameters

Topics: SharpMap Project
Nov 10, 2014 at 6:16 AM
Edited Nov 11, 2014 at 2:13 AM
I have a TileLayer created by Gdal. I want to load it in sharpmap. It is epsg:4283 and the origin raster scale is (108.000000, -44.000000, 156.00060, -8.000000).
I have created five level pyramids. (0,1,2,3,4)
the cols and rows in each level start from 1 (not 0)
this is what I set for my TileSchema parameters:
 TileSchema schema = new TileSchema();
        schema.Resolutions.Clear();
        schema.Resolutions.Add("0", new Resolution { Id = "0", UnitsPerPixel = 0.0009 });
        schema.Resolutions.Add("1", new Resolution { Id = "1", UnitsPerPixel = 0.0018 });
        schema.Resolutions.Add("2", new Resolution { Id = "2", UnitsPerPixel = 0.0036 });
        schema.Resolutions.Add("3", new Resolution { Id = "3", UnitsPerPixel = 0.0072 });
        schema.Resolutions.Add("4", new Resolution { Id = "4", UnitsPerPixel = 0.0144 });

        schema.Name = "MySchema";
        schema.OriginX =  180;
        schema.OriginY = -8.000000;
        schema.Axis = AxisDirection.InvertedY;
        schema.Extent = new Extent(108.000000, -44.000000, 156.00060, -8.000000);
        schema.Height = 2048;
        schema.Width = 2048;
        schema.Format = "jpg";
        schema.Srs = "EPSG:4283";
But I see nothing on my map.

May you please help me how to fill TileSchema parameters? I can not find any help about it.
Coordinator
Nov 11, 2014 at 9:02 AM
Edited Nov 11, 2014 at 9:04 AM
Could you elaborate what you did to generate the tiles, e.g.
  • Gdal program/script,
  • parameters set,
  • output
Nov 11, 2014 at 11:40 PM
Thanks for your reply

I found the reason of my problem:
It seems Gdal_retile creates tiles directories in different structure than Brutile uses.

My gdal_retile parameters were:
gdal_retile -useDirForEachRow -v -r bilinear -levels 4 -ps 2048 2048 -of "JPEG" -targetDir D:\Elham\Data\Raster\NatMap_1M_GDA94_Raster_jpeg D:\Elham\Data\Raster\NatMap_1M_GDA94_Raster3B.tif

By setting these parameters:
In each level directory I have rows directories starting from 1. then each row directory is consisted of columns. (Brutile standard is level\column\row which each row and column starts from 0)
Each tile name is the raster name concatenating "_row_column.jpg". (brutile standard for tiles name is just "column_row.jpg")

Is there a way I set gdal_retile parameters in the way I have tiles directories in Brutile standard format?