I have a SQLlite database containing cached tiles with X,Y,Z fields and I want to use it in MapCache. My Y field is appearing upside down in Google tile index but I want to inverse it like this:


I'm searching for a way to use my databse in Mapcache or inverse Y field in database to adapt tile indexes with mapcache tile index.

  • 1
    What is the question? Are you looking to modify the database, or to come up with some configuration option for MapCache, or something else? Is your database really mbtiles or geopackage, or something else you've created or received?
    – BradHards
    Dec 26 '14 at 0:44
  • Whichever it is possible. edit database or config mapcache. I recived a .gmdb databse contain tiles from my Employer.
    – ahmad
    Dec 26 '14 at 8:09
  • 2
    Please edit the question with those details.
    – BradHards
    Dec 27 '14 at 3:59
  • 1
    Can you apply your solution as an Answer rather than an edit to your Question, and then research/ask your new question separately, please?
    – PolyGeo
    Dec 29 '14 at 2:29
  • 1
    Your question has been re-opened so that you can apply your answer now. If you are able to improve your question with some of the clarifications you provided as comments at the same time then that will be appreciated.
    – PolyGeo
    Dec 29 '14 at 22:23

I solve my problem with editing database and inverse Y field :

  1. create 2 copy of original table(contain personal data).
  2. sort 1st copy of table with Z,X,Y ACE and add a newID.
  3. sort 2nd copy of table with Z,X ACE and Y DESC and add a newID.
  4. update Y filed of 1st table with Y of 2nd table where newID=newID.

now i have a table (1st copy) same as original table with inversed Y value.

  1. finally delete rows of Table created by mapcache and update that with my data.

Note : this database works with mapcache with correct position of tiles but tils load slowly and zooming does not work properly(Zooms on area with distance of clicked area). I use mapcache demo as client.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.