Welcome, Guest
Username: Password: Remember me

TOPIC: Importing MB Tiles in ArcGisi-help needed

Importing MB Tiles in ArcGisi-help needed 7 years 11 months ago #10753

  • kestas69
  • kestas69's Avatar
  • Offline
Hello Matt

Any advice on following? Thanks

We are building lake navigation app and had planned on using MBTiles generated by Reef Master, but we have run into some issues. Our app is built on ArcGis library for Android. The issues we are having are following.
It seems ArgGis is expecting the relative columns and rows i.e. the tile that touches the origin is (0,0) at every zoom level. RF generated tiles have different numbers. I assume they are absolute values. However, I am not sure what formula is used to compute coordinates. I was able to calculate longitude based on a column number, bet the same formula with only using 180 degrees instead of 360 for latitude didn't work. Here is what I used

(<column> / (2 pow <zoom level>)) * 360 - 180

I had to abandon the idea of using tile columns and rows to calculate the window and used information provided in the metadata which should be close enough. Perhaps I could have used entire world as the window and then zoomed in and positioned the view so that it showed just the lake I was interested in. However, this approach would have allowed used to zoom out way too much and loose the view of the lake since not all zoom levels are included in the file and looks like ArcGis library only uses max zoom as a stop point. I chose to subtract min row and min column to get relative origin. That mad the lake to appear on the screen. Unfortunately, ArcGis wasn't asking for bottom and right most tiles. The library isn't being told to display certain tiles. Instead, it requests them based on the area size and zoom level. I am not the expert in this field, but it looks like that the number of columns and rows for the given area and zoom level isn't what ArcGis is expecting. Based on the tile structure of an example file that works with ArcGis it looks like ArcGis is expecting the number of tiles of the next zoom level to be x4 greater than of the preceding one.
The other issue is the column and row numbers themselves. I understand that they approximated reference of the coordinates and each zoom level basically has its own origin point. In ArcGis there is no separate origin for each zoom level. Unfortunately, the origin of the tiles generated by RM for each level is different. I used a graphics editor to stitch the tiles, resize them so the resulting images for different zoom levels were of the same size of the same size and then I laid the images on top of each other. The position and the size of the lake should have been the same. Unfortunately, only two zoom levels were exact match. The other two were different
in lake size and the lake position.
Attachments:
The administrator has disabled public write access.
SCROLL TO TOP