特别感谢:1.【张天旭】的D3API汉化说明。已被引用到官方站点;
2.【馒头华华】提供的ourd3js.com上提供的学习系列教程,让我们这些新人起码有了一个方向。
不得不说,学习国外的新技术真的是一个非常艰苦的过程。
在学习D3绘制地图的过程中。有朋友建议看一下当中投影的说明比較好。于是,凭借我这半吊子不到的英文水平,大致给翻译了下来,仅供參考:
原文链接:https://github.com/mbostock/d3/wiki/Geo-Projections#albers
D3中一共提供了12种地图投影方式(每一种说明后面的蓝色字体是样例的超链接),分别例如以下:
# d3.geo.albersUsa() The Albers USA projection is a composite projection of four Albers projections designed to display the forty-eight lower United States alongside Alaska and Hawaii. Although intended for choropleths, it scales the area of Alaska by a factor of 0.35x (a lie factor of 3); Hawaii is shown at the same scale as the lower forty-eight. The Albers USA projection does not support rotation or centering. 译:阿伯斯投影 阿伯斯投影是被设计用4个阿伯斯投影把美国的阿拉斯加州和夏威夷州显示到本图旁边的复合投影,虽然用了等值线图。它把阿拉斯加州缩放了0.35倍, 夏威夷州虽然还是一样的比例,但偏移了48度(没查过距离资料。只是夏威夷确实是向东移动了)。 阿伯斯投影不支持旋转和设定中心。
# d3.geo.azimuthalEqualArea() The azimuthal equal-area projection is also suitable for choropleths. A polar aspect of this projection is used for the United Nations logo. 等面积方位投影 等面积方位投影也适合等值线图,这个投影的极坐标方向被用来作为联合国图标。
# d3.geo.azimuthalEquidistant() The azimuthal equidistant projection preserves distances from the projection’s center: the distance from any projected point to the projection’s center is proportional to the great arc distance. Thus, circles around the projection’s center are projected to circles on the Cartesian plane. This can be useful for visualizing distances relative to a point of reference, such as commute distances. 等距方位投影 等距方位投影保存着投影中心,从投影上的不论什么点到投影中心的弧线距离都是成比例的。因此。圆形的投影环绕着投影中心被投影在用圆圈住的一个笛卡尔平面上。 这能够用于将距离參考点的数据可视化显示。比方通勤距离。
# d3.geo.conicConformal() Lambert’s conformal conic projection projects the globe conformally onto a cone. 圆锥共形投影 兰伯特的圆锥共形投影将地球投影在一个圆锥上。
# conicConformal.parallels([parallels]) If parallels is specified, sets the projection’s standard parallels to the specified two-element array of latitudes (in degrees) and returns the projection. If parallels is not specified, returns the current parallels. 圆锥共形投影.平行线([经纬度数组]) 假设指定平行线。使投影的标准平行变为以经纬度(单位:度)表示的两个元素的数组并返回投影。假设不指定平行线,返回当前的投影。
# d3.geo.conicEqualArea() The Albers projection, as an equal-area projection, is recommended for choropleths as it preserves the relative areas of geographic features. 圆锥等面积投影 阿伯斯投影,作为一种等面积投影,被推荐作为等值线图。由于它保留了相对区域的地理特征。
# conicEqualArea.parallels([parallels]) If parallels is specified, sets the Albers projection’s standard parallels to the specified two-element array of latitudes (in degrees) and returns the projection. If parallels is not specified, returns the current parallels. To minimize distortion, the parallels should be chosen to surround the projection’s center. 圆锥等面积投影.平行线([经纬度数组]) 假设指定平行线,设置阿伯斯投影的标准平行变为以经纬度(单位:度)表示的两个元素的数组并返回投影。假设不指定平行线,返回当前的投影。 为了降低失真。平行线应该选择在投影中心周围。
# d3.geo.conicEquidistant() 圆锥等距投影
# conicEquidistant.parallels([parallels]) If parallels is specified, sets the projection’s standard parallels to the specified two-element array of latitudes (in degrees) and returns the projection. If parallels is not specified, returns the current parallels. 圆锥等距投影.平行线(数组) 假设指定平行线,设置阿伯斯投影的标准平行变为以经纬度(单位:度)表示的两个元素的数组并返回投影。假设不指定平行线,返回当前的投影。
# d3.geo.equirectangular() The equirectangular, or plate carrée projection, is the simplest possible geographic projection: the identity function. It is neither equal-area nor conformal, but is sometimes used for raster data. See raster reprojection for an example; the source image uses the equirectangular projection. 相等矩形投影 相等矩形投影,或者叫普拉特方形投影(貌似这是法国的叫法),是最简单可能的地理投影:标记功能(正比例函数。都是网上释义,我也搞不清楚这里的意思)。 它既不等面积也不保持形状,只是有时候用于栅格数据。这个站点是一个用相等矩形投影的样例。
# d3.geo.gnomonic() The gnomonic projection is an azimuthal projection that projects great circles as straight lines. See the interactive gnomonic for an example. 球心投影 球心投影是一种方位投影。它连续不断地投影一个巨大的包围圈。这个站点就是一个样例(你能够想象一下从地球仪中心看地球地图的感觉)。
# d3.geo.mercator() The spherical Mercator projection is commonly used by tiled mapping libraries (such as OpenLayers and Leaflet). For an example displaying raster tiles with the Mercator projection, see the d3.geo.tile plugin. It is conformal; however, it introduces severe area distortion at world scale and thus is not recommended for choropleths. 墨卡托投影 球形的墨卡托投影在映射平铺的数据时是最经常使用的,比如用墨卡托投影显示栅格,比如http://bl.ocks.org/mbostock/4150951这个页面。 它是正形的,然而,它将地图上的很多地方进行了严重变形,因此。不建议使用等值线图。
# d3.geo.orthographic() The orthographic projection is an azimuthal projection suitable for displaying a single hemisphere; the point of perspective is at infinity. See the animated world tour and interactive orthographic for examples. For a general perspective projection, see the satellite projection. 正射投影 正射投影也是一种方位投影。它适合显示一个半球:角度无穷大。
# d3.geo.stereographic() The stereographic projection is another perspective (azimuthal) projection. The point of perspective is on the surface of the sphere, looking in; it is thus commonly used for celestial charts. See the interactive stereographic for an example. 极射赤平投影 极射赤平投影是还有一个角度的方位投影。它的视角相当于站在地球的表面向里面看(跟球心投影相反),它因此被经经常使用于天体图。
# d3.geo.transverseMercator() The transverse Mercator projection. 横向墨卡托投影 就是一个横向的墨卡托投影。
注:因为原页面引用的全是D3绘制的图像,所以无法路径引用查看图片。你们懂的~