Really want to use the MapSurfer Tile server for a project but getting the error: Unable to find ITileCoordConverter for specified ICoordinateSystem

201 views
Skip to first unread message

Heinrich Ferreira

unread,
Feb 13, 2017, 6:37:54 PM2/13/17
to MapSurfer.NET
Good day

We have a project for which we want to use MapSurfer as the tile server, but we cannot get it to work with the Dubai Mercator projection.

OK, this is how I went about it:

Firstly I set up our Microsoft IIS server running a tile server pointing to your Bremen example and it is working fine with the LeafLet javascript control.
I can even see files being created in the TileCache directory.


I am using Mapsurfer.NET 2.5.1 and I then set up a Styled map based on this Bremen map, but pointing to Shape files (a base layer and some POI and Road ESRI ShapeFiles)

In MapSurfer.NET it shows just fine and I can style the layers.



This is then saved into the project file:

D:\Maps\MapSurfer\MapSurferWeb\Atlas\atlas.msnpx



It uses the following Coordinate system:


PROJCS["Dubai Local Transverse Mercator (DLTM)",

      GEOGCS["GCS_WGS_1984",

            DATUM["D_WGS_1984",

                 SPHEROID["WGS_1984", 6378137, 298.257223563]

            ],

            PRIMEM["Greenwich", 0],

            UNIT["Degree", 0.0174532925199433]

      ],

      PROJECTION["Transverse_Mercator"],

      PARAMETER["False_Easting", 500000],

      PARAMETER["False_Northing", 0],

      PARAMETER["Central_Meridian", 55.3333333333333],

      PARAMETER["Scale_Factor", 1],

      PARAMETER["Latitude_Of_Origin", 0],

      UNIT["Meter", 1]



I then go and set up the necessary config links to get this working in IIS:


In Web.Config:

<add key="MapSurfer.ServiceSettingsFileName" value="D:\Maps\MapSurfer\MapSurferWeb\Atlas\mapservice.msnwss" />


In mapservice.msnwss:

<ConfigFileName>D:\Maps\MapSurfer\MapSurferWeb\Atlas\tms_config.xml</ConfigFileName>


In tms_config.xml:

<StylesFileName>D:\Maps\MapSurfer\MapSurferWeb\Atlas\atlas.msnpx</StylesFileName>


HOWEVER, when I now use exactly the same page to load the map (as that has worked for the Bremen map), it does not work, but I get an error in the ServiceLog.txt file:



Time: 2/14/2017 9:13:08 AM

Thread: 

Message:

  Unable to find ITileCoordConverter for specified ICoordinateSystem.

Source:

  MapSurfer.Data

StackTrace:

     at MapSurfer.Data.Tiling.CoordConverters.TileCoordConverterManager.CreateTileCoordConverter(ICoordinateSystem coordSystem)

   at 㡑臥㣨䞜墂懮㭔䟣.ã˜ ãŒ•å¿‰ä™°æ›±ï¾§ä´¢è ±(MapServer ê´¹ãªˆâ—Œå¹°ë±¶á˜ªå“µéŽ , TileMapInfo 啳隆鉒খ畫ꈅ鄅펱)

   at MapSurfer.Web.Wmts.WmtsServer.Initialize(String configFileName)

   at MapSurfer.Web.Services.MappingService..ctor(String name)

TargetSite:

  MapSurfer.Data.Tiling.CoordConverters.ITileCoordConverter CreateTileCoordConverter(GeoAPI.CoordinateSystems.ICoordinateSystem)

Level: Error



Why would a coordinate system work in MapSurfer Studio and show and render correctly, but when it is run in the Web server it does not work.


I have the following in the Web.config file:

  <runtime>

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

      <dependentAssembly>

        <assemblyIdentity name="MapSurfer.Web.Extensions" publicKeyToken="null" culture="neutral" />

        <codeBase version="1.100.4576.27430" href="file:///C:\Program%20Files\MapSurfer.NET\2.5.1\Core\MapSurfer.Web.Extensions.DLL" />

      </dependentAssembly>

    </assemblyBinding>

  </runtime>


I have tried MapSurfer.NET 2.4 as well, it does the same.


I have read that it is possible to create a plugin that could handle this, but looking at the code under C:\Program Files\MapSurfer.NET\2.5.1\Core\Plugins\Providers I wanted to get examples of how these plugins would work, but they seem

to all be obfuscated.  Do you have some .Net4.5/6 example of code that could help me write a plugin for this, or can you tell me how to get this working.


The performance of your server seems to be good, but If I cannot get these files to work in the Leaflet I have to either try to write my own server or try and use another open source tile server.









Heinrich Ferreira

unread,
Feb 13, 2017, 6:42:32 PM2/13/17
to MapSurfer.NET
Here are my project and config files, as well as the Leaflet code I use to display it
atlas.msnpx
mapservice.msnwss
tms_config.xml
client.html
Web.config

Heinrich Ferreira

unread,
Feb 13, 2017, 6:43:43 PM2/13/17
to MapSurfer.NET
I also often get the following error : 
Time: 14/02/2017 10:29:57 AM
Thread: 
Message:
  Cannot access a disposed object.
Object name: 'The stream with Id 4dee2ed9-8082-4f76-9a0b-73c020021362 and Tag  is disposed.'.
Source:
  MapSurfer.System
StackTrace:
     at Microsoft.IO.RecyclableMemoryStream.é¢ î‚£é”Œç¡¬ê§ ì…‡ë§¦á•˜()
   at Microsoft.IO.RecyclableMemoryStream.ToArray()
   at MapSurfer.Data.Tiling.Caching.MetaTileWriterExtensions.ToArray(IMetaTileWriter writer, MetaTile metaTile)
   at MapSurfer.Data.Tiling.Caching.BaseMetaTileDiskTileCache.SetMetaTile(MetaTile metaTile)
   at 㡑臥㣨䞜墂懮㭔䟣.ã«¬ä ¿áƒ ì€¤ê¦¸ëª ï¯‚ã®´(MetaTile ãŽ›ã¶‚äž„é¬¥î ¢é³’î¨‹à®ž)
TargetSite:
  Void é¢ î‚£é”Œç¡¬ê§ ì…‡ë§¦á•˜()
Level: Error

Runge

unread,
Feb 14, 2017, 2:31:38 PM2/14/17
to MapSurfer.NET

Message:

  Unable to find ITileCoordConverter for specified ICoordinateSystem.

You receive this message due to the absence of a tiling scheme specifically for your projection which is Dubai Local Transverse Mercator (DLTM).

Well known X-Y-Z tiling scheme was invented by Google for Spherical Mercator and widely used in many client libraries such as OpenLayers or Leaflet. Any other projection requires developing its own tiling scheme both for the renderer (i.e. MapSurfer.NET, MapServer etc)
You can read more in this article.
In MapSurfer.NET you have to implement a class based on MapSurfer.Data.Tiling.CoordConverters.ITileCoordConverter. Next, a compiled assembly containing your ITileCoordConverter class needs to be copied to \Core\Plugins\TileCoordConverters\MyCoordConverter 
 
Why would a coordinate system work in MapSurfer Studio and show and render correctly, but when it is run in the Web server it does not work.
The reason is the same as above, MapSurfer.NET Studio does not apply any tiling.


The performance of your server seems to be good, but If I cannot get these files to work in the Leaflet I have to either try to write my own server or try and use another open source tile server.
I assume that for any other toolkit you have to implement your own tiling scheme as well.

Why can't you use Spherical Mercator projection in your project? It will save you a lot of time.

I also often get the following error : 
Time: 14/02/2017 10:29:57 AM
Thread: 
Message:
  Cannot access a disposed object.
Object name: 'The stream with Id 4dee2ed9-8082-4f76-9a0b-73c020021362 and Tag  is disposed.'.
Source:
  MapSurfer.System
StackTrace:
     at Microsoft.IO.RecyclableMemoryStream.é¢ î‚£é”Œç¡¬ê§ ì…‡ë§¦á•˜()
   at Microsoft.IO.RecyclableMemoryStream.ToArray()

This issue has been recently reported in another thread. I am doing my best to resolve this issue as soon as possible.
Reply all
Reply to author
Forward
0 new messages