D3学习之:D3.js中的12中地图投影方式
特别感谢: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绘制的图像,所以无法路径引用查看图片。你们懂的~
D3学习之:D3.js中的12中地图投影方式的更多相关文章
- D3 学习
D3 学习笔记 D3简介 D3全称是Data-Driven Documents数据驱动文档,是一个开源的javascript库,可以用于数据可视化图形的创建,但不仅仅只是这些.可以查看d3帮助文档还有 ...
- d3.js在vue项目中的安装及案例
1. 安装: npm i d3 --save 2. 引入:main.js import * as d3 from "d3"; Vue.prototype.$d3 = d3; win ...
- D3学习笔记一
D3学习笔记一 什么是D3? D3(全称Data Driven Documents)是一个用来做Web数据可视化的JavaScript函数库.D3也称之为D3.js. D3是2011年由Mike Bo ...
- D3学习之地图
D3学习之地图 (2017.03.09-03.11) 地图的意义 在可视化领域中,将数据点投影和关联到地理区域上,是一个非常关键的内容(体现了可视化中利用读者自身知识常识从而加速吸收信息的原则). G ...
- D3学习之动画和变换
D3学习之动画和变换 ##(17.02.27-02.28) 主要学习到了D3对动画和缓动函数的一些应用,结合前面的选择器.监听事件.自定义插值器等,拓展了动画的效果和样式. 主要内容 单元素动画 多元 ...
- d3学习之路
d3学习历程: 轻量化编译器:HbuiderXHbuiderX使用教程 理解HTMl js CSS 三者关系 学习html js css :1)w3school 2)moo ...
- 学习:D3
http://www.ourd3js.com/wordpress/?p=196 http://www.ourd3js.com/demo/rm/R-9.2/force.html 力导向图(那个可以拖拽的 ...
- Vue.js学习笔记:在元素 和 template 中使用 v-if 指令
f 指令 语法比较简单,直接上代码: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " ...
- js进阶 13-11/12 jquery如何实现折叠导航
js进阶 13-11/12 jquery如何实现折叠导航 一.总结 一句话总结:还是用的slideToggle滑动效果,并且这一个展开时,所有兄弟都关闭. 1.文字缩进怎么设置? 感觉设置margin ...
随机推荐
- hihocoder 后缀自动机五·重复旋律8 求循环同构串出现的次数
描述 小Hi平时的一大兴趣爱好就是演奏钢琴.我们知道一段音乐旋律可以被表示为一段数构成的数列. 小Hi发现旋律可以循环,每次把一段旋律里面最前面一个音换到最后面就成为了原旋律的“循环相似旋律”,还可以 ...
- [03]使用阿里RAP搭建前端Mock Server
MockServer可以减少前端开发对后端的依赖,提高前端开发的效率,同时也利于团队的协作. 什么是RAP? RAP是阿里团队出的一款WEB接口管理工具,帮助开发人员更高效的管理接口文档,同时通过分析 ...
- 微信设置URL之WebApi方式
微信公众号开发者设置里的URL,现在采用WebAPI的方式,结果一直报“未能正确设置Token”的错误,采用Handler和MVC的方式倒是可以. 解决步骤一,添加服务器IP到白名单. 解决步骤二,确 ...
- eclipse非主窗口的停靠(正常), 恢复, 最小化, 最大化的切换
1. pydev package Explorer的停靠与内嵌等 正常的情况
- 我读过的最好的epoll讲解--转自”知乎“ 【转】
转自:http://blog.csdn.net/xu3737284/article/details/12715963 首先我们来定义流的概念,一个流可以是文件,socket,pipe等等可以进行I/O ...
- html控件使用
<html> <head> <title>登录页面</title> </head> <body> <form action ...
- BestCoder 2nd Anniversary的前两题
Oracle Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Su ...
- 可视化web日志分析工具Logstalgia
https://blog.csdn.net/zrools/article/details/47250661
- web前端到底是什么?有前途吗
web前端到底是什么? 某货: “前几年前端开发人员鱼目混杂,技术参差不齐,相对学习起来不规范,导致> 前端开发人员聚集,所以现在前端工种和工资还是没得到普遍重视,但近2年来,> > ...
- 01背包【p1060】开心的金明
Description 金明今天很开心,家里购置的新房就要领钥匙了,新房里有一间他自己专用的很宽敞的房间.更让他高兴的是,妈妈昨天对他说:"你的房间需要购买哪些物品,怎么布置,你说了算,只要 ...