Skip to content

Commit 54d1c21

Browse files
authored
Merge pull request #6 from planetlabs/examples
Add examples and update docs
2 parents dddb6a9 + 56a474e commit 54d1c21

File tree

4 files changed

+233
-4
lines changed

4 files changed

+233
-4
lines changed

examples/tiles/tileset-bbox.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"title": "OpenStreetMap",
3+
"dataType": "map",
4+
"tileMatrixSetURI": "http://www.opengis.net/def/tilematrixset/OGC/1.0/WebMercatorQuad",
5+
"crs": "http://www.opengis.net/def/crs/EPSG/0/3857",
6+
"boundingBox": {
7+
"crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84",
8+
"lowerLeft": [
9+
-180,
10+
-90
11+
],
12+
"upperRight": [
13+
180,
14+
90
15+
]
16+
},
17+
"links": [
18+
{
19+
"href": "https://tile.openstreetmap.org/{tileMatrix}/{tileCol}/{tileRow}.png",
20+
"rel": "item",
21+
"type": "image/png",
22+
"title": "Tile URL Template",
23+
"templated": true
24+
},
25+
{
26+
"href": "https://ogc-tiles.xyz/tileMatrixSets/WebMercatorQuad",
27+
"rel": "http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme",
28+
"type": "application/json",
29+
"title": "Tiling Scheme"
30+
}
31+
]
32+
}

examples/tiles/tileset-limits.json

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
{
2+
"title": "OpenStreetMap",
3+
"dataType": "map",
4+
"tileMatrixSetURI": "http://www.opengis.net/def/tilematrixset/OGC/1.0/WebMercatorQuad",
5+
"tileMatrixSetLimits": [
6+
{
7+
"tileMatrix": "0",
8+
"minTileRow": 0,
9+
"maxTileRow": 0,
10+
"minTileCol": 0,
11+
"maxTileCol": 0
12+
},
13+
{
14+
"tileMatrix": "1",
15+
"minTileRow": 0,
16+
"maxTileRow": 1,
17+
"minTileCol": 0,
18+
"maxTileCol": 1
19+
},
20+
{
21+
"tileMatrix": "2",
22+
"minTileRow": 0,
23+
"maxTileRow": 3,
24+
"minTileCol": 0,
25+
"maxTileCol": 3
26+
},
27+
{
28+
"tileMatrix": "3",
29+
"minTileRow": 0,
30+
"maxTileRow": 7,
31+
"minTileCol": 0,
32+
"maxTileCol": 7
33+
},
34+
{
35+
"tileMatrix": "4",
36+
"minTileRow": 0,
37+
"maxTileRow": 15,
38+
"minTileCol": 0,
39+
"maxTileCol": 15
40+
},
41+
{
42+
"tileMatrix": "5",
43+
"minTileRow": 0,
44+
"maxTileRow": 31,
45+
"minTileCol": 0,
46+
"maxTileCol": 31
47+
},
48+
{
49+
"tileMatrix": "6",
50+
"minTileRow": 0,
51+
"maxTileRow": 63,
52+
"minTileCol": 0,
53+
"maxTileCol": 63
54+
},
55+
{
56+
"tileMatrix": "7",
57+
"minTileRow": 0,
58+
"maxTileRow": 127,
59+
"minTileCol": 0,
60+
"maxTileCol": 127
61+
},
62+
{
63+
"tileMatrix": "8",
64+
"minTileRow": 0,
65+
"maxTileRow": 255,
66+
"minTileCol": 0,
67+
"maxTileCol": 255
68+
},
69+
{
70+
"tileMatrix": "9",
71+
"minTileRow": 0,
72+
"maxTileRow": 511,
73+
"minTileCol": 0,
74+
"maxTileCol": 511
75+
},
76+
{
77+
"tileMatrix": "10",
78+
"minTileRow": 0,
79+
"maxTileRow": 1023,
80+
"minTileCol": 0,
81+
"maxTileCol": 1023
82+
},
83+
{
84+
"tileMatrix": "11",
85+
"minTileRow": 0,
86+
"maxTileRow": 2047,
87+
"minTileCol": 0,
88+
"maxTileCol": 2047
89+
},
90+
{
91+
"tileMatrix": "12",
92+
"minTileRow": 0,
93+
"maxTileRow": 4095,
94+
"minTileCol": 0,
95+
"maxTileCol": 4095
96+
},
97+
{
98+
"tileMatrix": "13",
99+
"minTileRow": 0,
100+
"maxTileRow": 8191,
101+
"minTileCol": 0,
102+
"maxTileCol": 8191
103+
},
104+
{
105+
"tileMatrix": "14",
106+
"minTileRow": 0,
107+
"maxTileRow": 16383,
108+
"minTileCol": 0,
109+
"maxTileCol": 16383
110+
},
111+
{
112+
"tileMatrix": "15",
113+
"minTileRow": 0,
114+
"maxTileRow": 32767,
115+
"minTileCol": 0,
116+
"maxTileCol": 32767
117+
},
118+
{
119+
"tileMatrix": "16",
120+
"minTileRow": 0,
121+
"maxTileRow": 65535,
122+
"minTileCol": 0,
123+
"maxTileCol": 65535
124+
},
125+
{
126+
"tileMatrix": "17",
127+
"minTileRow": 0,
128+
"maxTileRow": 131071,
129+
"minTileCol": 0,
130+
"maxTileCol": 131071
131+
},
132+
{
133+
"tileMatrix": "18",
134+
"minTileRow": 0,
135+
"maxTileRow": 262143,
136+
"minTileCol": 0,
137+
"maxTileCol": 262143
138+
},
139+
{
140+
"tileMatrix": "19",
141+
"minTileRow": 0,
142+
"maxTileRow": 524287,
143+
"minTileCol": 0,
144+
"maxTileCol": 524287
145+
}
146+
],
147+
"crs": "http://www.opengis.net/def/crs/EPSG/0/3857",
148+
"links": [
149+
{
150+
"href": "https://tile.openstreetmap.org/{tileMatrix}/{tileCol}/{tileRow}.png",
151+
"rel": "item",
152+
"type": "image/png",
153+
"title": "Tile URL Template",
154+
"templated": true
155+
},
156+
{
157+
"href": "https://ogc-tiles.xyz/tileMatrixSets/WebMercatorQuad",
158+
"rel": "http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme",
159+
"type": "application/json",
160+
"title": "Tiling Scheme"
161+
}
162+
]
163+
}

examples/tiles/tileset-minimal.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"title": "OpenStreetMap",
3+
"dataType": "map",
4+
"tileMatrixSetURI": "http://www.opengis.net/def/tilematrixset/OGC/1.0/WebMercatorQuad",
5+
"crs": "http://www.opengis.net/def/crs/EPSG/0/3857",
6+
"links": [
7+
{
8+
"href": "https://tile.openstreetmap.org/{tileMatrix}/{tileCol}/{tileRow}.png",
9+
"rel": "item",
10+
"type": "image/png",
11+
"title": "Tile URL Template",
12+
"templated": true
13+
},
14+
{
15+
"href": "https://ogc-tiles.xyz/tileMatrixSets/WebMercatorQuad",
16+
"rel": "http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme",
17+
"type": "application/json",
18+
"title": "Tiling Scheme"
19+
}
20+
]
21+
}

readme.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,30 @@
22

33
The go-ogc module provides Go packages for working with OGC APIs.
44

5-
## The api package
5+
[![Go Reference](https://pkg.go.dev/badge/github.com/planetlabs/go-ogc.svg)](https://pkg.go.dev/github.com/planetlabs/go-ogc)
6+
![Tests](https://github.com/planetlabs/go-ogc/actions/workflows/test.yml/badge.svg)
7+
8+
This repository contains the source for a set of [Golang packages](https://pkg.go.dev/github.com/planetlabs/go-ogc), an `xyz2ogc` command line utility, and examples of OGC API metadata documents. See below for additional documentation on each of these.
9+
10+
## Go packages
11+
12+
See the [package documentation]((https://pkg.go.dev/github.com/planetlabs/go-ogc)) for a complete reference. Below is a summary of each of the packages.
13+
14+
### The api package
615

716
The `api` package provides structs for implementing the following standards:
817

918
* [OGC API – Common](https://ogcapi.ogc.org/common/)
1019
* [OGC API – Tiles](https://ogcapi.ogc.org/tiles/)
1120
* [OGC API – Features](https://ogcapi.ogc.org/features/)
1221

13-
## The filter package
22+
### The filter package
1423

1524
The `filter` package provides structs for encoding and decoding CQL2 filters as JSON.
1625

17-
## xyz2ogc
26+
## The xyz2ogc command line utility
1827

19-
Generate [OGC API – Tiles](https://ogcapi.ogc.org/tiles/) metadata from exiting XYZ tilesets.
28+
The `xyz2ogc` command line utility can be used to generate [OGC API – Tiles](https://ogcapi.ogc.org/tiles/) metadata from exiting XYZ tilesets.
2029

2130
### Use
2231

@@ -148,3 +157,7 @@ The `Extent` field allows limiting the extent of the tileset. The extent is des
148157
URL = "https://example.com/limited-extent/{z}/{x}/{y}.png"
149158
Extent = [-120, 40, -110, 50]
150159
```
160+
161+
## OGC – API examples
162+
163+
See the [examples directory](./examples/) for example metadata documents for various OGC API standards.

0 commit comments

Comments
 (0)