Skip to content

Commit a3f9a88

Browse files
committed
s/OGC Features API/OGC API - Features/g
1 parent 7006d99 commit a3f9a88

File tree

8 files changed

+39
-39
lines changed

8 files changed

+39
-39
lines changed

workshop/content/docs/outputs/ogcfeatures.md renamed to workshop/content/docs/outputs/ogcapi-features.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
# OGC Features API
1+
# OGC API - Features
22

33
## Overview
44

5-
In this exercise we'll be configuring MapServer to serve out data using the
6-
MapServer's [OGC Features API](https://mapserver.org/ogc/ogc_api.html). See the [OGC Features Overview](https://github.com/opengeospatial/ogcapi-features/blob/master/ogcapi-ogc-org-features-overview.md) page for more details.
5+
In this exercise we'll be configuring MapServer to serve out data using
6+
MapServer's [OGC API - Features](https://mapserver.org/ogc/ogc_api.html). See the [OGC API - Features Overview](https://ogcapi.ogc.org/features/overview.html) page for more details.
77

88
<div class="map">
9-
<iframe src="https://geographika.github.io/getting-started-with-mapserver-demo/ogcfeatures.html"></iframe>
9+
<iframe src="https://geographika.github.io/getting-started-with-mapserver-demo/ogcapi-features.html"></iframe>
1010
</div>
1111

1212

1313
## Configuring your Mapfile
1414

1515
As with other OGC services most configuration is done using `METADATA` blocks.
16-
The prefix for the OGC Features API metadata settings is `oga_`.
16+
The prefix for the OGC API - Features metadata settings is `oga_`.
1717

18-
To enable the OGC Features API enable it in the `WEB` `METADATA`, using either
18+
To enable the OGC API - Features enable it in the `WEB` `METADATA`, using either
1919
`ows_enable_request` or `oga_enable_request`. We also need to set the `oga_onlineresource` value to the root of the service:
2020

2121
```scala
2222
WEB
2323
METADATA
2424
...
2525
ows_enable_request "*" # this enables all OGC requests
26-
oga_onlineresource "/ogcfeatures/ogcapi"
26+
oga_onlineresource "/ogcapi-features/ogcapi"
2727
END
2828
END
2929
```
@@ -58,31 +58,31 @@ The key part of the `CONFIG` file are the `MAPS` section where a URL paths are p
5858

5959
```scala
6060
MAPS
61-
OGCFEATURES "/etc/mapserver/ogcfeatures.map"
61+
OGCFEATURES "/etc/mapserver/ogcapi-features.map"
6262
END
6363
```
6464

65-
The other relevant setting is the environment variable `OGCAPI_HTML_TEMPLATE_DIRECTORY` in the `ENV` section. This points to a folder containing templates used to create the HTML interface when browsing the OGC Features API:
65+
The other relevant setting is the environment variable `OGCAPI_HTML_TEMPLATE_DIRECTORY` in the `ENV` section. This points to a folder containing templates used to create the HTML interface when browsing the OGC API - Features:
6666

6767
```scala
6868
ENV
6969
OGCAPI_HTML_TEMPLATE_DIRECTORY "/usr/local/share/mapserver/ogcapi/templates/html-bootstrap4/"
7070
END
7171
```
7272

73-
## Browsing the OGC Features API Collections
73+
## Browsing the OGC API - Features Collections
7474

75-
The OGC Features API can be viewed as HTML pages, which are rendered using templates provided by MapServer. They can also be accessed as JSON.
75+
The OGC API - Features can be viewed as HTML pages, which are rendered using templates provided by MapServer. They can also be accessed as JSON.
7676

7777
The services use hierarchical URLs for example:
7878

79-
* The root of the service is at <http://localhost:5000/ogcfeatures/ogcapi/>
80-
* The feature collections are listed at <http://localhost:5000/ogcfeatures/ogcapi/collections?f=html>
81-
* The Polygon feature collection is available at <http://localhost:5000/ogcfeatures/ogcapi/collections/pois_polygon?f=html>
79+
* The root of the service is at <http://localhost:5000/ogcapi-features/ogcapi/>
80+
* The feature collections are listed at <http://localhost:5000/ogcapi-features/ogcapi/collections?f=html>
81+
* The Polygon feature collection is available at <http://localhost:5000/ogcapi-features/ogcapi/collections/pois_polygon?f=html>
8282

83-
## Adding OGC Features to OpenLayers
83+
## Adding OGC API - Features to OpenLayers
8484

85-
As the OGC Features API returns GeoJSON, adding a vector layer to OpenLayers is straightforward. We simply pass in the URL pointing to the collection items:
85+
As the OGC API - Features returns GeoJSON, adding a vector layer to OpenLayers is straightforward. We simply pass in the URL pointing to the collection items:
8686

8787
```js
8888
new VectorLayer({
@@ -91,7 +91,7 @@ new VectorLayer({
9191
'stroke-width': 1.3,
9292
},
9393
source: new Vector({
94-
url: mapserverUrl + 'ogcfeatures/ogcapi/collections/pois_polygon/items?f=json&limit=500',
94+
url: mapserverUrl + 'ogcapi-features/ogcapi/collections/pois_polygon/items?f=json&limit=500',
9595
format: new GeoJSON(),
9696
}),
9797
}),
@@ -101,25 +101,25 @@ new VectorLayer({
101101

102102
!!! example
103103

104-
- Direct MapServer request: <http://localhost:5000/ogcfeatures/ogcapi/>
105-
- Direct MapServer request: <http://localhost:5000/ogcfeatures/ogcapi/collections/pois/items?f=html>
106-
- Local OpenLayers example: <http://localhost:5001/ogcfeatures.html>
104+
- Direct MapServer request: <http://localhost:5000/ogcapi-features/ogcapi/>
105+
- Direct MapServer request: <http://localhost:5000/ogcapi-features/ogcapi/collections/pois/items?f=html>
106+
- Local OpenLayers example: <http://localhost:5001/ogcapi-features.html>
107107

108-
??? JavaScript "ogcfeatures.js"
108+
??? JavaScript "ogcapi-features.js"
109109

110110
``` js
111-
--8<-- "ogcfeatures.js"
111+
--8<-- "ogcapi-features.js"
112112
```
113113

114-
??? Mapfile "ogcfeatures.map"
114+
??? Mapfile "ogcapi-features.map"
115115

116116
``` scala
117-
--8<-- "ogcfeatures.map"
117+
--8<-- "ogcapi-features.map"
118118
```
119119

120120
## Exercises
121121

122-
1. Modify the `workshop\exercises\mapfiles\railways.map` to enable the OGC Features API. You will need to add a new entry to the `MAPS` section in `workshop\exercises\mapfiles\mapserver.conf` and restart the Docker container to be able to browse the OGC Features API interface.
122+
1. Modify the `workshop\exercises\mapfiles\railways.map` to enable the OGC API - Features. You will need to add a new entry to the `MAPS` section in `workshop\exercises\mapfiles\mapserver.conf` and restart the Docker container to be able to browse the OGC API - Features interface.
123123

124124
```scala
125125
MAPS
@@ -132,10 +132,10 @@ new VectorLayer({
132132

133133
!!! tip
134134

135-
You need to add `TEMPLATE "void"` to each of the layers you want to make available through the OGC Features API.
135+
You need to add `TEMPLATE "void"` to each of the layers you want to make available through the OGC API - Features.
136136
[TEMPLATE](https://mapserver.org/mapfile/layer.html#mapfile-layer-template) is a left-over from when HTML templates were used to return features, and allows the layer to be queried.
137137

138-
Once setup correctly you should be able to browse the OGC Features API at <http://localhost:5000/railways/ogcapi/>.
138+
Once setup correctly you should be able to browse the OGC API - Features at <http://localhost:5000/railways/ogcapi/>.
139139

140140
## Possible Errors
141141

@@ -147,4 +147,4 @@ new VectorLayer({
147147
}
148148
```
149149

150-
`oga_html_template_directory` can be set either at the Mapfile level or in the CONFIG file. Mapfile takes precedence.
150+
`oga_html_template_directory` can be set either at the Mapfile level or in the CONFIG file. Mapfile takes precedence.

workshop/content/docs/outputs/wms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Prefixes are used to configure different types of web service. For example:
2020

2121
- `wms_` is used for WMS services, for example `"wms_title"` can be set in the `WEB` `METADATA` block to set the title of the WMS service. This will be seen when read with client applications such as QGIS.
2222
- `wfs_` is used for Web Feature Services.
23-
- `oga_` is used for the new [OGC Features API](ogcfeatures.md).
23+
- `oga_` is used for the new [OGC API - Features](ogcapi-features.md).
2424

2525
!!! tip
2626

workshop/content/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ nav:
2727
- WFS: outputs/wfs.md
2828
- Tiles: outputs/tiles.md
2929
- Vector Tiles: outputs/vector-tiles.md
30-
- OGC Features API: outputs/ogcfeatures.md
30+
- OGC API - Features: outputs/ogcapi-features.md
3131
- Advanced:
3232
- Vector Symbols: advanced/symbols.md
3333
- Clusters: advanced/clusters.md

workshop/exercises/app/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h2>Outputs</h2>
2828
<li><a href="wfs.html">WFS</a></li>
2929
<li><a href="tiles.html">Tiles Mode</a></li>
3030
<li><a href="vector-tiles.html">Vector Tiles</a></li>
31-
<li><a href="ogcfeatures.html">OGC Features API</a></li>
31+
<li><a href="ogcapi-features.html">OGC API - Features</a></li>
3232
</ul>
3333
<h2>Advanced</h2>
3434
<ul>
@@ -46,4 +46,4 @@ <h2>Miscellaneous</h2>
4646
<script type="module" src="./js/index.js"></script>
4747
</body>
4848

49-
</html>
49+
</html>

workshop/exercises/app/js/ogcfeatures.js renamed to workshop/exercises/app/js/ogcapi-features.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const layers = [
1818
'stroke-width': 1.3,
1919
},
2020
source: new Vector({
21-
url: mapserverUrl + 'ogcfeatures/ogcapi/collections/pois_polygon/items?f=json&limit=500',
21+
url: mapserverUrl + 'ogcapi-features/ogcapi/collections/pois_polygon/items?f=json&limit=500',
2222
format: new GeoJSON(),
2323
}),
2424
}),

workshop/exercises/app/ogcfeatures.html renamed to workshop/exercises/app/ogcapi-features.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
<link rel="icon" type="image/x-icon" href="https://openlayers.org/favicon.ico" />
66
<link rel="stylesheet" href="node_modules/ol/ol.css">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8-
<title>OGC Features API</title>
8+
<title>OGC API - Features</title>
99
</head>
1010
<body>
1111
<div id="map"></div>
12-
<script type="module" src="./js/ogcfeatures.js"></script>
12+
<script type="module" src="./js/ogcapi-features.js"></script>
1313
</body>
1414
</html>

workshop/exercises/mapfiles/mapserver.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ CONFIG
5858
# Map Aliases
5959
#
6060
MAPS
61-
OGCFEATURES "/etc/mapserver/ogcfeatures.map"
61+
OGCAPI-FEATURES "/etc/mapserver/ogcapi-features.map"
6262
END
6363

6464
END

workshop/exercises/mapfiles/ogcfeatures.map renamed to workshop/exercises/mapfiles/ogcapi-features.map

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MAP
2-
NAME "OGC Features"
2+
NAME "OGC API - Features"
33
EXTENT 17.77 43.31 17.83 43.36
44
UNITS DD
55
SIZE 600 600
@@ -13,7 +13,7 @@ MAP
1313
"ows_title" "OSM Features"
1414
"ows_enable_request" "*" # this enables all OGC requests
1515
"ows_srs" "EPSG:4326 EPSG:3857"
16-
"oga_onlineresource" "/ogcfeatures/ogcapi"
16+
"oga_onlineresource" "/ogcapi-features/ogcapi"
1717
# "oga_html_template_directory"
1818
# "oga_enable_request" "*"
1919
END
@@ -49,4 +49,4 @@ MAP
4949
CONNECTION "data/osm/mostar/pois_a.fgb"
5050
END
5151

52-
END
52+
END

0 commit comments

Comments
 (0)