官网关于对Connector的描述及其简单,不知所云!
具体见此地方(DataSet)对Connector的描述+解释

其实我理解的Connector(或者被叫做是Convertor)更为合适,是将原数据按照一定的规则转换成 tabular data !
(即将csv, dsv,geojson等源数据 转成标准的JSON)

g2支持具体的分类:

CSV

Short for Comma-separated values, also sometimes called character-separated values. The CSV file stores tabular data (text and numbers) in plain-text form.

In CSV files plain text means that the file is a sequence of characters, with no data that has to be interpreted as binary numbers and each record consists of fields, separated by some other character or string, the character commonly are tab or comma.
— 用于表述 value delimited file(值分割文件)

DSV

Delimiter Separated Values

The use of the delimiter character in a DSV formatted file is identical to that of a CSV file.
Any delimiter character can be chosen to be used in the encoding, however, according to DSV rules for Unix system, the most commonly used character is the colon (:).

区别

DSV and CSV differ in one specific area and that is escaping special characters(转义特殊字符!!!).

The way a character is escaped in CSV is by putting it between quotes(CSV转义后用引号包起来), however in DSV files, these types of characters are escaped using an escape character, most commonly the backslash (). — (DSV转义则用 \ )

In some situations, the escaped character is converted to its ASCII value, e.g. when a delimiter is replaced:

  • comma (,) will be replaced with \x2c
  • semi-colon (;) will be replaced with \x3b.

TSV

Tab Separated Values

The only difference between this format and CSV or DSV is the specification of the delimiter character(和其他两者的区别就在于分隔符!!在此用 TAB 字符).
The delimiter in this situation is the TAB character.

Excel Converter can be configured to use the TAB character as delimiter in combination with either CSV or DSV rules.

GeoJson

GeoJSON 是用来描述一系列几何形状的数据结构。它可以描述以下几种几何类型:Point、LineString、Polygon、MultiPoint、MultiLineString 和 MultiPolygon。

GeoJSON 使用 type 表示数据的类型。
type 取值 PointLineStringPolygonMultiPointMultiLineStringMultiPolygonGeometryCollection 时,用来表示几何图。
type 取值 Feature 时,除了几何图外,还可以包含其他自定义信息。
type 取值 FeatureCollection 时,可以包含多个 Feature Objects。
GeoJSON 使用一维数组表示 Point,二维数组表示 MultiPointLineString(或 LinearRing 即环线),三维数组表示 MultiLineStringPolygon(包含洞的面),四维数组表示 MultiPolygon
具体的规则,请直接看 GeoJSON 规范

TopoJson

TopoJSON 是 GeoJSON 的拓展,用来描述拓扑结构。通过提取图形中公用的点来减少冗余,一般可以把 GeoJSON 的大小压缩到原来的 20%。

TopoJSON 通过四种方式压缩了 GeoJSON 的大小。

TopoJSON 的压缩算法

  1. 把所有点提取到一个数组中,其他需要用到点的地方,都直接填入 index 即可。这样做的话,可以极大的减少数据的冗余,比如两个图形交界的地方只用存一份数据
  2. 把浮点数转化为整型数,通过 transform 来转化
  3. 点列表除了第一个点以外,其他的点都只存储相对位置
  4. 通过 topojson.simplify 压缩(官方没有具体介绍)

通过前三种方式,即可使得大小能被压缩到原本的 20%。

TopoJSON 的规范

具体的规范可以直接阅读 TopoJSON 规范

参考链接
Difference between CSV, DSV, TSV and others
What is CSV?
geojson and pojojson
geojson-spec