You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: workshop/content/docs/outputs/ogcapi-features.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,29 +1,29 @@
1
-
# OGC Features API
1
+
# OGC API - Features
2
2
3
3
## Overview
4
4
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.
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_`.
17
17
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
19
19
`ows_enable_request` or `oga_enable_request`. We also need to set the `oga_onlineresource` value to the root of the service:
20
20
21
21
```scala
22
22
WEB
23
23
METADATA
24
24
...
25
25
ows_enable_request "*"#this enables all OGC requests
26
-
oga_onlineresource "/ogcfeatures/ogcapi"
26
+
oga_onlineresource "/ogcapi-features/ogcapi"
27
27
END
28
28
END
29
29
```
@@ -58,31 +58,31 @@ The key part of the `CONFIG` file are the `MAPS` section where a URL paths are p
58
58
59
59
```scala
60
60
MAPS
61
-
OGCFEATURES"/etc/mapserver/ogcfeatures.map"
61
+
OGCFEATURES"/etc/mapserver/ogcapi-features.map"
62
62
END
63
63
```
64
64
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:
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.
76
76
77
77
The services use hierarchical URLs for example:
78
78
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>
82
82
83
-
## Adding OGC Features to OpenLayers
83
+
## Adding OGC API - Features to OpenLayers
84
84
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:
- 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>
107
107
108
-
??? JavaScript "ogcfeatures.js"
108
+
??? JavaScript "ogcapi-features.js"
109
109
110
110
``` js
111
-
--8<-- "ogcfeatures.js"
111
+
--8<-- "ogcapi-features.js"
112
112
```
113
113
114
-
??? Mapfile "ogcfeatures.map"
114
+
??? Mapfile "ogcapi-features.map"
115
115
116
116
``` scala
117
-
--8<-- "ogcfeatures.map"
117
+
--8<-- "ogcapi-features.map"
118
118
```
119
119
120
120
## Exercises
121
121
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.
123
123
124
124
```scala
125
125
MAPS
@@ -132,10 +132,10 @@ new VectorLayer({
132
132
133
133
!!! tip
134
134
135
-
You need to add `TEMPLATE "void"` to each of the layers you want to make available through the OGCFeaturesAPI.
135
+
You need to add `TEMPLATE "void"` to each of the layers you want to make available through the OGCAPI-Features.
136
136
[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.
137
137
138
-
Once setup correctly you should be able to browse the OGCFeaturesAPI at <http://localhost:5000/railways/ogcapi/>.
138
+
Once setup correctly you should be able to browse the OGCAPI-Features at <http://localhost:5000/railways/ogcapi/>.
139
139
140
140
##PossibleErrors
141
141
@@ -147,4 +147,4 @@ new VectorLayer({
147
147
}
148
148
```
149
149
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.
Copy file name to clipboardExpand all lines: workshop/content/docs/outputs/wms.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Prefixes are used to configure different types of web service. For example:
20
20
21
21
-`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.
22
22
-`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).
0 commit comments