[mapserver-users] Google tile schema to coordinates conversion

2011-06-10 Thread Armin Burger

Hi all

I would like to set up a scripting solution based on MapScript that 
replies correctly to requests using the Google tile schema x+y+z. Does 
anybody know a formula how to transform the XYZ request values to 
bounding box coordinates in the Google Spherical Mercator projection?


I know that Mapserver CGI offers the tile mode for this. It works very 
well, but I would need a Mapscript solution for more flexibility of the 
request handling.


Any hint appreciated

Armin
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Google tile schema to coordinates conversion

2011-06-10 Thread Armin Burger
I discovered now the conversion method in the Mapserver source code in 
maptile.c => msTileSetExtent().


armin


On 10/06/2011 17:43, Armin Burger wrote:

Hi all

I would like to set up a scripting solution based on MapScript that
replies correctly to requests using the Google tile schema x+y+z. Does
anybody know a formula how to transform the XYZ request values to
bounding box coordinates in the Google Spherical Mercator projection?

I know that Mapserver CGI offers the tile mode for this. It works very
well, but I would need a Mapscript solution for more flexibility of the
request handling.

Any hint appreciated

Armin
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Google tile schema to coordinates conversion

2011-06-10 Thread Mark Korver
there is also code here

http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/



On Fri, Jun 10, 2011 at 3:35 PM, Armin Burger  wrote:
> I discovered now the conversion method in the Mapserver source code in
> maptile.c => msTileSetExtent().
>
> armin
>
>
> On 10/06/2011 17:43, Armin Burger wrote:
>>
>> Hi all
>>
>> I would like to set up a scripting solution based on MapScript that
>> replies correctly to requests using the Google tile schema x+y+z. Does
>> anybody know a formula how to transform the XYZ request values to
>> bounding box coordinates in the Google Spherical Mercator projection?
>>
>> I know that Mapserver CGI offers the tile mode for this. It works very
>> well, but I would need a Mapscript solution for more flexibility of the
>> request handling.
>>
>> Any hint appreciated
>>
>> Armin
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Google tile schema to coordinates conversion

2011-06-11 Thread Niccolo Rigacci
On Fri, Jun 10, 2011 at 05:43:27PM +0200, Armin Burger wrote:
> 
> I would like to set up a scripting solution based on MapScript that
> replies correctly to requests using the Google tile schema x+y+z.
> Does anybody know a formula how to transform the XYZ request values
> to bounding box coordinates in the Google Spherical Mercator
> projection?

Just for the curious: the Bing map uses Quadkeys into the URL 
instead of x+y+z, here you can find the math beyond that:

http://msdn.microsoft.com/en-us/library/bb259689.aspx


-- 
Niccolo Rigacci
Firenze - Italy
Tel. ufficio: 055-0118525
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Google tile schema to coordinates conversion

2011-06-11 Thread Stephen Woodbridge

On 6/11/2011 8:36 AM, Niccolo Rigacci wrote:

On Fri, Jun 10, 2011 at 05:43:27PM +0200, Armin Burger wrote:


I would like to set up a scripting solution based on MapScript that
replies correctly to requests using the Google tile schema x+y+z.
Does anybody know a formula how to transform the XYZ request values
to bounding box coordinates in the Google Spherical Mercator
projection?


Just for the curious: the Bing map uses Quadkeys into the URL
instead of x+y+z, here you can find the math beyond that:

http://msdn.microsoft.com/en-us/library/bb259689.aspx


You might also want to look at mod_geocache as if supports all common 
tiling schemes off of a single tilecache. It also has a demo mode that 
will generate a sample OpenLayers page(s) to demo setup and access to 
the cache using each tiling scheme.


-Steve W
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users