On Dec 3, 8:35 am, Klokan Petr Pridal <[EMAIL PROTECTED]> wrote: > Hi, > > The EPSG:900913 an EPSG:3785 are coordinates measured in meters, you > will see the ranges for bbox when you click on a tile in: > > http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/. > > You need this codes only for creating raster tiles, especially those > covering the whole Earth or continents (when zoomed out), because when > you use just bbox in Lat/Lon coordinates (EPSG:4326 with WGS84 Datum) > your data will not be correctly aligned to the original map layers > which use Mercator projection. You will realize there is a north-south > shift in the middle of every tile. For zoomed-in tiles (large scale > maps) the shift is minimal. > > First code (900913) is supported in most open-source software tools > like MapServer, GDAL, OGR, Grass, QGIS, etc.. but it is not official. > The second (3785) is official but unfortunately not yet implemented in > most GIS software tools because it is not in the EPSG database for a > long time. > > The raster tile projection of Google Maps and similar interactive maps > is a bit tricky, because the shape of the Earth is simplified to > sphere, but Lat/Lon coordinates are on ellipsoid. That is something > very unusual for GIS software tools. It is a bit advanced subject.. I > tried to summarized it on the mentioned website. > > To simplify this coordinate conversion for existing raster maps I am > programming a user friendly tiling application GDAL2Tiles/MapTiler > (http://www.maptiler.org/). I will write more about it later, now it > is under heavy development and testing. It generates mashups from a > supplied raster files with georeference (GeoTIFF, MrSID, ECW, BSB, > HFA, ...) similar to: > > http://www.maptiler.org/example-usgs-drg-grand-canyon-gtiff/ > > It is going to be available for free under an open-source license... > somewhen in the beginning of the next year. Right now there is only > command line version for that application. > > Best regards > > Klokan
I am seeing exactly what you describe. For EPSG:4326, the synthetic tiles are correct at the corners but distorted in the middle. For EPSG:3785, the synthetic tiles totally wrong. I know the x & y pixel offsets of the corners for each tile but I do not know the x & y scale factors to convert from pixels to meters for a particular zoom level. I can shift by zoom level if I know what vertical & horizontal constants to use for the Earth's circumference in meters. I am looking for the same pair of constants expected by the WMS server. If the Earth is considered to be spherical, it will be a single constant. I am trying to pass a "bbox" parameter directly to the WMS server. Thanks again for your article. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
