Skip to content

Commit 87f8c05

Browse files
authored
promote OGC APIs (#188)
1 parent 0c05c18 commit 87f8c05

File tree

2 files changed

+131
-152
lines changed

2 files changed

+131
-152
lines changed

workshop/jupyter/content/notebooks/10-remote-data.ipynb

Lines changed: 130 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,136 @@
3030
"Documentation: https://owslib.readthedocs.io\n"
3131
]
3232
},
33+
{
34+
"cell_type": "markdown",
35+
"metadata": {},
36+
"source": [
37+
"## OGC API\n",
38+
"In recent yeays OGC has been developing a family of Standards that improves, and will eventually replace, the OGC Web Service Standards (WMS, WFS, WCS, WPS, etc.) These newer Standards build upon the legacy of the OGC Web Service Standards, but define resource-centric APIs that take advantage of modern web development practices. They are designed to make it easy for ANYONE to provide and use geospatial data on the web, and to integrate this data with ANY other type of information. "
39+
]
40+
},
41+
{
42+
"cell_type": "markdown",
43+
"metadata": {
44+
"editable": true,
45+
"slideshow": {
46+
"slide_type": ""
47+
},
48+
"tags": []
49+
},
50+
"source": [
51+
"### Fetch from OGC API Features\n",
52+
"Although this may sound very advanced, this is actually one of \n",
53+
"the simpler OGC APIs. See also the [OWSLib Manual for OAFeat](https://owslib.readthedocs.io/en/latest/usage.html#ogc-api).\n"
54+
]
55+
},
56+
{
57+
"cell_type": "code",
58+
"execution_count": null,
59+
"metadata": {
60+
"editable": true,
61+
"pycharm": {
62+
"name": "#%%\n"
63+
},
64+
"slideshow": {
65+
"slide_type": ""
66+
},
67+
"tags": []
68+
},
69+
"outputs": [],
70+
"source": [
71+
"from owslib.ogcapi.features import Features\n",
72+
"oa_feat = Features('https://demo.pygeoapi.io/master')\n",
73+
"oa_feat.links"
74+
]
75+
},
76+
{
77+
"cell_type": "code",
78+
"execution_count": null,
79+
"metadata": {
80+
"editable": true,
81+
"pycharm": {
82+
"name": "#%%\n"
83+
},
84+
"slideshow": {
85+
"slide_type": ""
86+
},
87+
"tags": []
88+
},
89+
"outputs": [],
90+
"source": [
91+
"# Open API Specification v3 - API document\n",
92+
"api = oa_feat.api() # OpenAPI definition\n",
93+
"api"
94+
]
95+
},
96+
{
97+
"cell_type": "code",
98+
"execution_count": null,
99+
"metadata": {
100+
"editable": true,
101+
"pycharm": {
102+
"name": "#%%\n"
103+
},
104+
"slideshow": {
105+
"slide_type": ""
106+
},
107+
"tags": []
108+
},
109+
"outputs": [],
110+
"source": [
111+
"# Conformance stuff\n",
112+
"print(f'This OGC API Features endpoint conforms to {oa_feat.conformance()}')"
113+
]
114+
},
115+
{
116+
"cell_type": "code",
117+
"execution_count": null,
118+
"metadata": {
119+
"editable": true,
120+
"pycharm": {
121+
"name": "#%%\n"
122+
},
123+
"slideshow": {
124+
"slide_type": ""
125+
},
126+
"tags": []
127+
},
128+
"outputs": [],
129+
"source": [
130+
"# Get collections (datasets) in endpoint\n",
131+
"collections = oa_feat.collections()\n",
132+
"print(f'This OGC API Features endpoint has {len(collections)} datasets')"
133+
]
134+
},
135+
{
136+
"cell_type": "code",
137+
"execution_count": null,
138+
"metadata": {
139+
"editable": true,
140+
"pycharm": {
141+
"name": "#%%\n"
142+
},
143+
"slideshow": {
144+
"slide_type": ""
145+
},
146+
"tags": []
147+
},
148+
"outputs": [],
149+
"source": [
150+
"# Get items (paged) in Lakes collection\n",
151+
"lakes = oa_feat.collection('lakes')\n",
152+
"lakes_query = oa_feat.collection_items('lakes')\n",
153+
"lakes_query['features'][0]"
154+
]
155+
},
156+
{
157+
"cell_type": "markdown",
158+
"metadata": {},
159+
"source": [
160+
"If you are interested in learning more about OGC API, check out the [OGC API Workshop](https://ogcapi-workshop.ogc.org/). If you want to publish your data using OGC API, check out the [Dive into pygeoapi Workshop](https://dive.pygeoapi.io/); the latter also has more examples on how-to consume data from OGC API, using various clients."
161+
]
162+
},
33163
{
34164
"cell_type": "markdown",
35165
"metadata": {},
@@ -530,136 +660,6 @@
530660
"print(json.dumps(parsed, indent=2, sort_keys=True))"
531661
]
532662
},
533-
{
534-
"cell_type": "markdown",
535-
"metadata": {},
536-
"source": [
537-
"## OGC API\n",
538-
"In recent yeays OGC has been developing a family of Standards that improves, and will eventually replace, the OGC Web Service Standards (WMS, WFS, WCS, WPS, etc.) These newer Standards build upon the legacy of the OGC Web Service Standards, but define resource-centric APIs that take advantage of modern web development practices. They are designed to make it easy for ANYONE to provide and use geospatial data on the web, and to integrate this data with ANY other type of information. "
539-
]
540-
},
541-
{
542-
"cell_type": "markdown",
543-
"metadata": {
544-
"editable": true,
545-
"slideshow": {
546-
"slide_type": ""
547-
},
548-
"tags": []
549-
},
550-
"source": [
551-
"### Fetch from OGC API Features\n",
552-
"Although this may sound very advanced, this is actually one of \n",
553-
"the simpler OGC APIs. See also the [OWSLib Manual for OAFeat](https://owslib.readthedocs.io/en/latest/usage.html#ogc-api).\n"
554-
]
555-
},
556-
{
557-
"cell_type": "code",
558-
"execution_count": null,
559-
"metadata": {
560-
"editable": true,
561-
"pycharm": {
562-
"name": "#%%\n"
563-
},
564-
"slideshow": {
565-
"slide_type": ""
566-
},
567-
"tags": []
568-
},
569-
"outputs": [],
570-
"source": [
571-
"from owslib.ogcapi.features import Features\n",
572-
"oa_feat = Features('https://demo.pygeoapi.io/master')\n",
573-
"oa_feat.links"
574-
]
575-
},
576-
{
577-
"cell_type": "code",
578-
"execution_count": null,
579-
"metadata": {
580-
"editable": true,
581-
"pycharm": {
582-
"name": "#%%\n"
583-
},
584-
"slideshow": {
585-
"slide_type": ""
586-
},
587-
"tags": []
588-
},
589-
"outputs": [],
590-
"source": [
591-
"# Open API Specification v3 - API document\n",
592-
"api = oa_feat.api() # OpenAPI definition\n",
593-
"api"
594-
]
595-
},
596-
{
597-
"cell_type": "code",
598-
"execution_count": null,
599-
"metadata": {
600-
"editable": true,
601-
"pycharm": {
602-
"name": "#%%\n"
603-
},
604-
"slideshow": {
605-
"slide_type": ""
606-
},
607-
"tags": []
608-
},
609-
"outputs": [],
610-
"source": [
611-
"# Conformance stuff\n",
612-
"print(f'This OGC API Features endpoint conforms to {oa_feat.conformance()}')"
613-
]
614-
},
615-
{
616-
"cell_type": "code",
617-
"execution_count": null,
618-
"metadata": {
619-
"editable": true,
620-
"pycharm": {
621-
"name": "#%%\n"
622-
},
623-
"slideshow": {
624-
"slide_type": ""
625-
},
626-
"tags": []
627-
},
628-
"outputs": [],
629-
"source": [
630-
"# Get collections (datasets) in endpoint\n",
631-
"collections = oa_feat.collections()\n",
632-
"print(f'This OGC API Features endpoint has {len(collections)} datasets')"
633-
]
634-
},
635-
{
636-
"cell_type": "code",
637-
"execution_count": null,
638-
"metadata": {
639-
"editable": true,
640-
"pycharm": {
641-
"name": "#%%\n"
642-
},
643-
"slideshow": {
644-
"slide_type": ""
645-
},
646-
"tags": []
647-
},
648-
"outputs": [],
649-
"source": [
650-
"# Get items (paged) in Lakes collection\n",
651-
"lakes = oa_feat.collection('lakes')\n",
652-
"lakes_query = oa_feat.collection_items('lakes')\n",
653-
"lakes_query['features'][0]"
654-
]
655-
},
656-
{
657-
"cell_type": "markdown",
658-
"metadata": {},
659-
"source": [
660-
"If you are interested in learning more about OGC API, check out the [OGC API Workshop](https://ogcapi-workshop.ogc.org/). If you want to publish your data using OGC API, check out the [Dive into pygeoapi Workshop](https://dive.pygeoapi.io/); the latter also has more examples on how-to consume data from OGC API, using various clients."
661-
]
662-
},
663663
{
664664
"cell_type": "markdown",
665665
"metadata": {
@@ -931,27 +931,6 @@
931931
"---\n",
932932
"[<- Publishing](09-publishing.ipynb) | [Emerging technology and trends ->](11-emerging-technology-trends.ipynb)"
933933
]
934-
},
935-
{
936-
"cell_type": "code",
937-
"execution_count": null,
938-
"metadata": {},
939-
"outputs": [],
940-
"source": []
941-
},
942-
{
943-
"cell_type": "code",
944-
"execution_count": null,
945-
"metadata": {},
946-
"outputs": [],
947-
"source": []
948-
},
949-
{
950-
"cell_type": "code",
951-
"execution_count": null,
952-
"metadata": {},
953-
"outputs": [],
954-
"source": []
955934
}
956935
],
957936
"metadata": {

workshop/jupyter/content/notebooks/11-emerging-technology-trends.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
"source": [
218218
"# Using QGIS\n",
219219
"\n",
220-
"QGIS currently (2021) supports the following OGC API standards:\n",
220+
"QGIS also supports a growing number of OGC API standards, including:\n",
221221
"\n",
222222
"- OGC API - Features\n",
223223
"- OGC API - Records"

0 commit comments

Comments
 (0)