/
site-count.html.md.erb
156 lines (138 loc) · 5.79 KB
/
site-count.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
---
title: Site Count
summary: Determine the number of sites containing data for a given point, polygon, or multipoint as specified by a WKT. This is useful for calculating download request size. Details at [the download guide](/docs/wind/wind-toolkit/guide).
url: /api/wind-toolkit/v2/site-count
---
# <%= current_page.data.title %> <span class="url">(<%= current_page.data.url %>)</span>
<%= current_page.data.summary %>
<ul id="toc"></ul>
## Request URL
<pre>GET <%= current_page.data.url %><em>.format?parameters</em></pre>
## Request Parameters
<table border="0" cellpadding="0" cellspacing="0" class="doc-parameters">
<thead>
<tr>
<th class="doc-parameters-name" scope="col">Parameter</th>
<th class="doc-parameters-required" scope="col">Required</th>
<th class="doc-parameters-value" scope="col">Value</th>
<th class="doc-parameters-description" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<th class="doc-parameter-name" scope="row">api_key</th>
<td class="doc-parameter-required">Yes</td>
<td class="doc-parameter-value">
<div class="doc-parameter-value-field"><strong>Type:</strong> string</div>
<div class="doc-parameter-value-field"><strong>Default:</strong> None</div>
</td>
<td class="doc-parameter-description">
<p>Your developer API key. See <a href="/docs/api-key/">API keys</a> for more information.</p>
</td>
</tr>
<tr>
<th class="doc-parameter-name" scope="row">wkt</th>
<td class="doc-parameter-required">Yes</td>
<td class="doc-parameter-value">
<div class="doc-parameter-value-field"><strong>Type:</strong> well-known text string</div>
<div class="doc-parameter-value-field"><strong>Default:</strong> None</div>
</td>
<td class="doc-parameter-description">
A well-known text (WKT) representation of the geometry for which to extract data. May be a point, multipoint, or polygon geometry. When a point is passed the site nearest to that point is used. When a multipoint is passed the site nearest each point is used. This can be useful for downloading multiple sites in a single request when those sites are geographically distant from each other. When a polygon is passed all sites that intersect with the given polygon are used.
</td>
</tr>
</tbody>
</table>
## Response Fields
The response is composed of service-related informational fields and the results of the data query.
<table border="0" cellpadding="0" cellspacing="0" class="doc-parameters">
<thead>
<tr>
<th class="doc-parameters-name" scope="col">Field</th>
<th class="doc-parameters-value" scope="col">Value</th>
<th class="doc-parameters-description" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<th class="doc-parameter-name" scope="row">errors</th>
<td class="doc-parameter-value">
<div class="doc-parameter-value-field"><strong>Type:</strong> string array</div>
</td>
<td class="doc-parameter-description">
<p>A list of error messages</p>
</td>
</tr>
<tr>
<th class="doc-parameter-name" scope="row">warnings</th>
<td class="doc-parameter-value">
<div class="doc-parameter-value-field"><strong>Type:</strong> string array</div>
</td>
<td class="doc-parameter-description">
<p>A list of warning messages</p>
</td>
</tr>
<tr>
<th class="doc-parameter-name" scope="row">inputs</th>
<td class="doc-parameter-value">
<div class="doc-parameter-value-field"><strong>Type:</strong> Object Hash</div>
</td>
<td class="doc-parameter-description">Key: Value pairs representing all input parameters</td>
</tr>
<tr>
<th class="doc-parameter-name" scope="row">outputs</th>
<td class="doc-parameter-value">
<div class="doc-parameter-value-field"><strong>Type:</strong> Object Hash</div>
</td>
<td class="doc-parameter-description">Upon successful completion a list of datasets with a site count for each will be returned.</td>
</tr>
</tbody>
</table>
<h2>Examples</h2>
### JSON Output Format
<div class="doc-example-url"><code>GET <%= current_page.data.url %>.json?api_key={{API_KEY}}&wkt=POLYGON((-114.9609375 39.50404070558415,-112.67578124999999 39.50404070558415,-112.67578124999999 38.13455657705411,-114.9609375 38.13455657705411,-114.9609375 39.50404070558415))</code></div>
```json
{
"inputs": {
"wkt": "POLYGON((-114.9609375 39.50404070558415,-112.67578124999999 39.50404070558415,-112.67578124999999 38.13455657705411,-114.9609375 38.13455657705411,-114.9609375 39.50404070558415))"
},
"metadata": {
"version": "2.0.0",
"resultset": {
"count": 1
}
},
"status": 200,
"outputs": {
"spectral-india-tmy": 0,
"suny-india": 0,
"puerto-rico": 0,
"suny-india-tmy": 0,
"india-wind": 0,
"central-asia-wind": 0,
"psm3": 1938,
"wtk": 7123,
"spectral-ondemand": 1938,
"psm3-tmy": 1938
},
"errors": []
}
```
## Rate Limits
[Standard rate limits](/docs/rate-limits) apply. No more than 1,000 requests may be made in any hour.
<h2 id="errors">Errors</h2>
<p><a href="/docs/errors/">Standard errors</a> may be returned. In addition, the following service-specific errors may be returned:</p>
<table border="0" cellpadding="0" cellspacing="0" class="doc-parameters">
<thead>
<tr>
<th class="doc-parameters-name" scope="col" style="width: 100px;">HTTP Status Code</th>
<th class="doc-parameters-required" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<th class="doc-parameter-name" scope="row">400</th>
<td class="doc-parameter-description">Bad Request: When required parameters are missing.</td>
</tr>
</tbody>
</table>