Can I use a fileCache tile with another schema?

Mar 6, 2013 at 1:02 AM
Hi Paul,
Recently , I was confused with the schema problem, as we know ,in BruTile,it contains Bing Schema,GlbalMercator,SphericalMercatorInvertedWorldSchema,SphericalMercatorWorldSchema,WkstNederlandSchema. All these Schemas are Projected Coordinate System. now I would ask if my tileSchema is Geographic Coordinate system like "WGS84",and my tile was created with the "WGS84" using ArcGIS
cache tools,Can I use the "WGS84" Geographic Coordinate System after overwriting the schema?

any reply will be appreciated!
                                                                                                                                      Tomy
Coordinator
Mar 6, 2013 at 7:43 AM
The predefined tile schemas you mention are only there for convenience. You could create any schema in code. Your ArcGIS tools should provide you the appropriate parameters.

For example In this MapService description:
http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer
The appropriate parameters are:
  • Width/Height
  • Resolution (you can ignore scale)
  • Origin
  • Full Extent.
here an example of how to create a TileSchema in code:
http://mapsui.codeplex.com/SourceControl/changeset/view/6748c8bb3b54#Samples/WindowsFormsSample/Form1.cs
Mar 11, 2013 at 9:20 AM
Edited Mar 11, 2013 at 9:28 AM
Hi,Paul,Thanks for your reply!Your example are quite good for my problem!And also I found that the example's coordinate is Projected Coordinate System ,Here is my code to create a Geogrpahic Coordinate System TileSchema,is my code right?

Class GCS84Schema:TileSchema
{  
  public GCS84Schema()
    {
        double[] numArray = new double[] { 
             1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.000021457672119140625,0.0000107288360595703125,0.00000536441802978515625,0.000002682209014892578125,0.0000013411045074462890625
         };
        int num = 0;
        foreach (double num2 in numArray)
        {
            Resolution item = new Resolution
            {
                Id = num.ToString(),
                UnitsPerPixel = num2
            };
            base.Resolutions.Add(item);
            num++;
        }
        base.Height = 0x100;
        base.Width = 0x100;
        base.Extent = new Extent(120.23712, 29.150593, 120.25628, 29.16851);
        base.OriginX = -180;
        base.OriginY = 90;
        base.Name = "GCS84";
        base.Format = "png";
        base.Axis = AxisDirection.Normal;
        base.Srs = "EPSG:4490";
    }

}


Coordinator
Mar 11, 2013 at 12:09 PM
It is not easy for me to see if all parameters are correct. What I notice is in your first post you mention your tiles are in WGS84 but you use EPSG::4490 in your schema. It doesn't matter because the EPSG code is not used but there might be some confusion there.

Did you try to visualize it in a mapControl?

Paul
Mar 14, 2013 at 5:45 AM
Edited Mar 14, 2013 at 5:46 AM
YES!now,I have visualized the tile in the mapControl,Thanks for your advice,Paul!
what I do is that I changed the OriginX and OriginY,also the Extent parameter,you know,
the PARAMETER is so important that I have to figure out how the tile will be show in the mapControl!
after this ,chang the parameter, then the work will be done!
now I will focus the Coordinate issue.
Thanks again!