@@ -12,7 +12,7 @@ Supported query string parameters:
12
12
13
13
'format': Specifies which format to use for the response.
14
14
Supported formats: JSON (the default), GeoJSON,
15
- TopoJSON, CSV, SVG, SHP
15
+ TopoJSON, CSV, SVG, SHP, arraybuffer
16
16
17
17
'filename': Sets the filename to use for the query result
18
18
file attachment
@@ -37,6 +37,9 @@ Supported query string parameters:
37
37
Response formats
38
38
----------------
39
39
40
+
41
+ ### JSON
42
+
40
43
The standard response from the CartoDB SQL API is JSON. If you are
41
44
building a web-application, the lightweight JSON format allows you to
42
45
quickly integrate data from the SQL API.
@@ -69,6 +72,12 @@ The JSON response is as follows:
69
72
}
70
73
```
71
74
75
+ Note that values of numerical fields will be rounded to at most 16 significant
76
+ digits due to a limit in the JSON format itself. If more precision is needed
77
+ the caller can cast those fields to text using SQL constructs.
78
+
79
+ ### GeoJSON
80
+
72
81
Alternatively, you can use the GeoJSON specification for returning data
73
82
from the API. To do so, simply supply the format parameter as GeoJSON.
74
83
@@ -99,7 +108,37 @@ The GeoJSON response is follows:
99
108
}
100
109
```
101
110
102
- TODO: csv, kml, svg, topojson responses
111
+ ### CSV
112
+
113
+ CSV export format has field names in first line (header),
114
+ uses CR/NL line endings and EWKT format for geometri fields.
115
+
116
+ See https://github.com/postgis/postgis/blob/svn-trunk/doc/ZMSgeoms.txt#L173
117
+
118
+ ### KML
119
+
120
+ See http://en.wikipedia.org/wiki/KML
121
+
122
+ ### SVG
123
+
124
+ See http://en.wikipedia.org/wiki/SVG
125
+
126
+ ### TopoJSON
127
+
128
+ See http://en.wikipedia.org/wiki/Topojson
129
+
130
+ ### SHP
131
+
132
+ Shapefile output composed by .shp, .shx, .dbf and .prj files
133
+ compressed in a .zip.
134
+
135
+ See http://en.wikipedia.org/wiki/Shapefile
136
+
137
+ ### Arraybuffer
138
+
139
+ An octet stream binary-encoding each field as a typed array of value.
140
+ TODO: write more about this format
141
+ See http://github.com/CartoDB/CartoDB-SQL-API/issues/96
103
142
104
143
Response errors
105
144
---------------
0 commit comments