google影像命名与经伟度的转换

I’ve been playing around with the marvellous Google Earth and Google Maps, and just noticed how elegant the system for addressing image tiles is [specifically from Google Maps].

Google Maps now offers a satellite view as well as a map view, and does so using the former Keyhole database. The view is built using tiles— 256 pixel square JPEGs fetched from the the kh.google.com server.

As of this writing, the image URLs take the form:

http://kh.google.com/kh?v=projection&t=address

projection is either 2 or 3. Selecting 2 gives a plate carrée projection, while 3 provides a Mercator projection, ensuring that local features are uniformly scaled. [Update: projection type 2 is no longer supported]

quadtree recursive subdivisionaddress is a short string of letters encoding the location of a particular map square. The addressing mode is quite elegant, with the world recursively quartered until the desired detail level is reached. This simple heirarchical structure is known as a quadtree, and is commonly used in computer graphics. For whatever reason, Google labels the four quadrants q, r, s & t.

The topmost tile contains the entire world map, and is referenced with an address of t. Adding an s to this selects the lower-right quadrant of the map, and adding a further r selects the upper-right of that map, resulting in a tile containing most of Australasia. Each time an extra letter is added, we descend into a new quadrant, and this continues until the maximum detail is reached. So, for example, the hospital where I was born can be uniquely addressed [to within a hundred metres or so] using the URL:

http://kh.google.com/kh?v=3&t=tsrrtrsqsqqqrqrtss

Click here to see the sequence of all tiles containing that particular location, with each yellow quadrant marking the region occupied by the subsequent map.

The page uses the following Javascript code to convert longitude and latitude into a quadtree address. The first part of the code is based on equations from Wikipedia’s entry on the Mercator Projection.

function GetQuadtreeAddress (long, lat )
{
var PI = 3.1415926535897 ;
var digits = 18 ; // how many digits precision
// now convert to normalized square coordinates
// use standard equations to map into mercator projection
var x = ( 180.0 + parseFloat (long )) / 360.0 ;
var y = - parseFloat (lat ) * PI / 180 ; // convert to radians
y = 0.5 * Math. log (( 1+ Math. sin (y )) / ( 1 - Math. sin (y )));
y *= 1.0/ ( 2 * PI ); // scale factor from radians to normalized
y += 0.5 ; // and make y range from 0 - 1
var quad = "t" ; // google addresses start with t
var lookup = "qrts" ; // tl tr bl br
while (digits-- ) // (post-decrement)
{
// make sure we only look at fractional part
x -= Math. floor (x );
y -= Math. floor (y );
quad = quad + lookup. substr ((x >= 0.5 ? 1 : 0 ) + (y >= 0.5 ? 2 : 0 ), 1 );
// now descend into that square
x *= 2 ;
y *= 2 ;
}
return quad ;
}
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 国家2000坐标是一种平面直角坐标系,主要用于测量地理位置,而经纬度则是一种地球球面坐标系,主要用于表达地球上的位置。将国家2000坐标转换为经纬度可以帮助我们更直观地了解某个地方的地理位置。 为解决这个问题,有很多在线工具可以完成这项转换功能,例如百度地图、高德地图等。其中,百度地图提供了一个坐标转换工具,用户只需要输入对应的2000x,y坐标即可快速将其转换为经纬度。同样,高德地图也提供了类似的服务,用户可以输入国家2000坐标,生成对应的经纬度信息。 此外,GIS软件也可以完成这项工作。ArcGIS、QGIS等常见的GIS软件都支持国家2000坐标与经纬度的转换。在这些软件中,用户可以通过输入坐标值、选择投影方式、设置坐标系等方法实现转换。 总之,国家2000坐标与经纬度转换工具已经成为一个十分成熟和实用的技术。随着技术的不断发展,这一工具将在各个领域得到更广泛的应用,为用户提供更便捷的服务。 ### 回答2: 国家2000坐标系是我国最新的地理坐标系统,其可以更准确地描述地球表面的形状,并满足国家多种需求。然而,由于其与经纬度坐标系无法直接转换,因此需要特殊的转换工具。 这些转换工具一般采用大地测量学的原理,包括基于数学模型的正反算法和相关参数表格等。用户可以通过输入国家2000坐标系的x,y坐标,自动计算出对应区域的经纬度坐标,也可以输入经纬度坐标计算出对应的国家2000坐标系坐标。此外,还可以通过迭代法、高斯投影等技术来提高转换精度。 虽然现在很多地图软件都拥有坐标转换功能,但专业的转换工具仍然很有用处,例如在测量、地形分析、遥感和GIS等领域中常用到。需要注意的是,不同地区使用的坐标系也有所不同,应根据实际需要选择合适的转换工具。 ### 回答3: 国家2000坐标系是一种常用的地理坐标系统,主要应用于我国的测量、土地开发及资源调查等方面。而经纬度则是一种经典的地理坐标系统,广泛用于全球范围内的地理定位和导航。不同的坐标系统之间的转换涉及到复杂的数学计算,需要专业的工具来完成。 国家2000x,y坐标与经纬度转换工具是一款专门用来将国家2000坐标系下的x,y坐标转换为经纬度的软件工具。该工具可以通过输入国家2000坐标系下的x,y坐标,自动计算出对应的经纬度值。同时,该工具还提供了多种输出格式,比如度分秒和十进制度等,方便用户根据具体需求进行选择。 此外,该工具还可以实现将经纬度转换为国家2000坐标系下的x,y坐标。用户只需输入经纬度值,即可自动计算出对应的国家2000坐标系下的x,y坐标值。同时,该工具还支持多种地图投影方式,如高斯投影、UTM投影等,可以适应不同的地区和需求。 总之,国家2000x,y坐标与经纬度转换工具是一款功能强大的地理信息工具,能够为用户提供高精度、多样化的地理坐标转换服务。在测量、土地开发、资源调查等领域中具有广泛的应用价值。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值