Dateline wrapping

Sep 2, 2011 at 1:59 AM

Is it possible that the TileSchema method GetTilesInView be modified to support wrapping the dateline?

Sep 13, 2011 at 7:53 AM

I have created dateline wrapping in other applications ( a long time ago). I can remember I was struggling then to figure out what the right level would be to deal with this wrapping. For algorithms it was easiest to incorporate dateline wrapping but for the data fetchers I left the responsibility to a higher level. So I think I would deal with dateline wrapping by letting a higher level do two or more separate requests to fetch all the data. Do you have a clear idea of how to deal with it?


Sep 19, 2011 at 1:01 AM

I had been hoping that maybe the method could be marked overridable but after having a deeper look through the code base that approach wouldn't work due to internal structs/interfaces. What I've done instead is use the Decorator pattern to define an ITileSchema that has an internal ITileSchema. Then in the GetTilesInView the extents are broken up and two requests are made against the internal ITileSchema. The resulting Tile collection is then joined together as the response. What it means though is modification of the second extent ( the one on the other side of the date line) before the request and then modification of the extents of each found tile after.