-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
71 lines (69 loc) · 2.33 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>SQL2GEOJSON API Server</title>
</head>
<body>
<h1>SQL2GEOJSON API Server</h1>
<h3>If DB = 'postgres'</h3>
<ul>
<li>API is available on '/postgres/api/<insert-table-name-here></li>
<li>
If you have your table in a schema other than 'public', append
`?schema=<schema-name> to the above URL
</li>
<li>
Filtering:
'/postgres/api/<insert-table-name-here>?fields=<field-1-you-want-to-filter>...&filter=<filter-term>'
<pre>
Minor Bug: Combining fields with different data types and string filter results in error.
See https://github.com/sudiptog81/sql2geojson/issues/1 for updates on this bug.</pre
>
</li>
<li>
For e.g. <a href="/postgres/api/test">/postgres/api/test</a> and
<a href="/postgres/api/test?fields=dev&filter=XYZ"
>/postgres/api/test?fields=dev&filter=XYZ</a
>
</li>
</ul>
<h3>If DB = 'mysql'</h3>
<ul>
<li>
API is available on
'/mysql/api/<insert-table-name-here>?fields=<field-1-you-want>,<field-2-you-want>,...'<br />
</li>
<li>
Filtering:
'/mysql/api/<insert-table-name-here>?fields=<field-1-you-want>,<field-2-you-want>...&filter=<filter-term>'
</li>
<li>
For e.g.
<a href="/mysql/api/test?fields=id,name,dev"
>/mysql/api/test?fields=id,name,dev</a
>
and filtered:
<a href="/mysql/api/test?fields=id,name,dev&filter=XYZ"
>/mysql/api/test?fields=id,name,dev&filter=XYZ</a
>
</li>
</ul>
<p>
To view an example go to <a href="./example">/example</a> after importing
the shapefiles (<a href="./example/shp.zip">available here</a>) into your
database and make sure<br />that the SQL2GEOJSON API Server is running.
</p>
<hr />
<code>
<a
href="https://github.com/sudiptog81/sql2geojson/"
target="_blank"
rel="noopener noreferrer"
>Source Code on GitHub</a
></code
>
</body>
</html>