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 ...
随机推荐
- nginx支持pathinfo
server { root /webserver/www/api; listen ; server_name api.dnxia.com; location / { if (!-e $request_ ...
- vs2008升级正式版
1.VS2008简体中文正式版序列号 1.Visual Studio 2008 Professional Edition: XMQ2Y-4T3V6-XJ48Y-D3K2V-6C4WT 2.Visual ...
- Python 二进制,十进制,十六进制转换
十六进制 到 十进制 使用 int() 函数 ,第一个参数是字符串 '0Xff' ,第二个参数是说明,这个字符串是几进制的数. 转化的结果是一个十进制数. >>> int('0xf ...
- 汕头市队赛 SRM10 T3 数学上来先打表
数学上来先打表 SRM 10 描述 给出 n个点(不同点之间有区别),求出满足下列条件的连边(双向边)方案:1.每条边连接两个不同的点,每两个点之间至多有一条边2.不存在三个点a,b,c使三个点间两两 ...
- 第3章 MFC框架程序剖析
参考: https://blog.csdn.net/u014162133/article/details/46573873 1. 2.MFC简介:MFC(Microsoft Foundation Cl ...
- WIN8下笔记本共享热点的设置
C:\windows\system32>netsh wlan start hostednetwork 无法启动承载网络. 组或资源的状态不是执行请求操作的正确状态. 解决方法: http://j ...
- Sigslot介绍
最近在看delta3d开源引擎,最底层封装的消息机制,是基于其has_slots,搜索了一下其资料发现是一个很好用的C++库,先对其简单介绍一下. 首先说下插槽机制. 插槽系统常用的有三种:boost ...
- Fiddler抓包2-只抓APP的请求【转载】
本篇转自博客:上海-悠悠 原文地址:http://www.cnblogs.com/yoyoketang/p/6582437.html 前言 fiddler抓手机app的请求,估计大部分都会,但是如何只 ...
- pythontips(2):hasattr的用法
class Xiaorui: def __init__(self): self.name = 'xiaorui' def setName(self, name=''): if name.strip() ...
- MVC中Model和model的区别和用户
MVC中Model和model的区别,它们应该怎么用呢? 使用@model关键字可以定义一个Action里所对应的一个模型(经常可以叫他实体类). MVC的第一个字母M是Model,承载着View层和 ...