Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I would like to host an Openstreetmap server using Geoserver (Geoserver/GeoWebCache/postgis). However, I encounter a problem regarding the tiles and gridsets. TMS urls (myserv/z/x/y.png) are different than urls from openstreetmap.org or MapQuest. Furthermore, there is an offset on the y axis. The following url shows an area from my own server. The other url shows the same area from Mapquest.

http://devmobicite.dnsroute.fr:8080/geoserver/gwc/service/tms/1.0.0/mapServer:mapOSM/14/16280/12392.png

http://mtile01.mqcdn.com/tiles/1.0.0/vy/map/15/16280/11637.png

The offset seems to be caused by the zoom level (here 14~=15) and by the y value (12392->11637). I hope my issue is understandable and that someone can help me.

(Sorry for my english)

Thanks

Raphaël

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Basic difference between TMS and Google/Openstreetmap Tiles is that TMS counts from bottom left, and the others from top left:

http://alastaira.wordpress.com/2011/07/06/converting-tms-tile-coordinates-to-googlebingosm-tile-coordinates/

Maybe WMTS is the service you want.

share|improve this answer
    
Yes, I had this information. I saw that the way to get the "translated" y value is y = (2^zoom - 1) - y and I tried to use without great results. That's why I think my problem comes from the zoom offset. –  raphaelRaccourci Feb 22 '13 at 8:52
    
Ok, now i see the offset to the north. might be because the upper bound is rounded to 85.0511°, which is not exactly arctan(sinh(π)): wiki.openstreetmap.org/wiki/Slippy_map_tilenames. But I don't know how to solve that in Geoserver. –  Andre Joost Feb 22 '13 at 9:20
    
Actually WMTS works well for me. I used it with a bad EPSG during my test. Now it's perfect. Thanks a lot. –  raphaelRaccourci Feb 22 '13 at 9:36
    
Can you specify "good" and "bad" EPSG for future users? –  Andre Joost Feb 22 '13 at 10:14
    
Yes. I used the EPSG:4326 gridset instead of the EPSG:900913 one. They are the default ESPG gridsets proposed by geoserver. –  raphaelRaccourci Feb 22 '13 at 10:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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