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 ...
随机推荐
- P2659 美丽的序列 (单调栈)
题目链接 Solution 直接考虑单调栈处理出每一个点作为最小值的区间长度. 然后 \(O(n)\) 找一遍最大值即可. 记得开 long long,以及要注意 \(0\) 的问题. Code #i ...
- Educational Codeforces Round 57 (Rated for Div. 2) ABCDEF题解
题目总链接:https://codeforces.com/contest/1096 A. Find Divisible 题意: 给出l,r,在[l,r]里面找两个数x,y,使得y%x==0,保证有解. ...
- A simple greedy problem(hdu 4976)
题意:有n个小兵,每个小兵有a[i]血量,第一个人每次只能对一个小兵砍一滴血,第二个人每次对所有生存的小兵砍一滴血. 最后看第一个人最多可以砍杀几个小兵. /* 首先,如果所有小兵的血量都不同的话,我 ...
- linux低权限执行高权限
1.关于sudo不需要输密码,低权限执行高权限,在root下的命令visudo放开%wheel ALL:保存退出, 执行gpasswd -a yourusername wheel 2.脚本命令下的,权 ...
- 简单粗暴!解决锐捷强制关闭VMware NAT Service的问题(图文教程)
众所周知毒瘤的锐捷会定时强制关闭NAT服务,导致虚拟机连不上网,进而你的虚拟机就成了孤儿,只能玩单机. 在一番百度后,得到了一种神仙破解办法.原理是把锐捷关闭服务时所用的搜索关键字改掉,这样锐捷就搜不 ...
- protobuf 中的嵌套消息的使用 主要对set_allocated_和mutable_的使用
protobuf的简单的使用,不过还留下了一个问题,那就是之前主要介绍的都是对简单数据的赋值,简单数据直接采用set_xx()即可,但是如果不是简单变量而是自定义的复合类型变量,就没有简单的set函数 ...
- qt include无法自动补齐
原因一: 检查cmake有没有include_directories 原因二: CmakeList.txt放错位置 原因三: 没有用qt new file来创建头文件
- uva11019矩阵匹配器D316
#include<iostream> #include<cstring> #include<cstdio> #include<cmath> #inclu ...
- Python的Web编程[2] -> WebService技术[0] -> 利用 Python 调用 WebService 接口
WebService技术 / WebService Technology 1 关于webservice / Constants WebService是一种跨编程语言和跨操作系统平台的远程调用技术. W ...
- 数学【P2524】 Uim的情人节礼物·其之弐 (康托展开)
因为某人@ZAGER挖坑让我讲一下康托展开,所以发现了这个题,顺便说一下康托展开是个什么东西 题目概括 给定n与一个数列,要求求出给定数列在n的全排列中的排名(按照字典序从小到大排列) 康托展开 先放 ...