Version 1.0 (GeoServer / OGC Services)
This document describes how to integrate Provincial GIS data hosted on a GIS Server instance into external web and desktop applications. GeoServer is an open‑source server that implements industry‑standard OGC (Open Geospatial Consortium) protocols: WMS (Web Map Service), WFS (Web Feature Service), WCS (Web Coverage Service), and WMTS (Web Map Tile Service). These protocols allow any OGC‑compliant client – from web mapping libraries to desktop GIS software – to access and display geospatial data.
By following this guide, developers will be able to:
All endpoints are based on the provincial GeoServer instance at https://gis.ecotp.gov.za/geoserver/ecpg/wms.
The base URL for all OGC services is:
https://gis.ecotp.gov.za/geoserver/ecpg/wms
Individual service endpoints are accessed by appending the service name and version:
| Service | Typical Endpoint (with required parameters) |
|---|---|
| WMS | https://gis.ecotp.gov.za/geoserver/ecpg/wms?service=WMS&version=1.3.0&request=... |
| WFS | https://gis.ecotp.gov.za/geoserver/ecpg/wfs?service=WFS&version=2.0.0&request=... |
| WCS | https://gis.ecotp.gov.za/geoserver/ecpg/wcs?service=WCS&version=2.0.1&request=... |
| WMTS | https://gis.ecotp.gov.za/geoserver/ecpg/gwc/service/wmts?request=GetCapabilities |
| REST | https://gis.ecotp.gov.za/geoserver/ecpg/rest/... (admin) |
Note: GeoServer also supports tiled WMS via GeoWebCache, which can be accessed through the same WMS endpoint with additional tiled=true parameter or through dedicated WMTS.
Access to public data layers may be unrestricted. However, some layers (e.g., sensitive cadastral information) require authentication.
If authentication is required, use HTTP Basic Authentication with a username and password provided by the Provincial GIS department.
Example with curl:
curl -u username:password "https://gis.ecotp.gov.za/geoserver/ecpg/wfs?service=WFS&version=2.0.0&request=GetCapabilities"
Alternatively, an API key may be passed as a query parameter or header. Consult the specific layer metadata for requirements.
Before accessing data, you need to know which layers are available and their properties. GeoServer provides GetCapabilities documents for each service.
Request the WMS capabilities to get a list of all vector and raster layers that can be displayed as maps.
URL:
GET https://gis.ecotp.gov.za/geoserver/ecpg/wms?service=WMS&version=1.3.0&request=GetCapabilities
Response: XML document describing:
Key element: <Layer> – each layer has a <Name> that you will use in subsequent requests (e.g., province:parcels).
For vector feature access, request the WFS capabilities.
URL:
GET https://gis.ecotp.gov.za/geoserver/ecpg/wfs?service=WFS&version=2.0.0&request=GetCapabilities
Response: XML describing feature types (layers) and their attribute schemas. The <Name> (e.g., province:roads) is used in WFS requests.
For raster coverages (elevation, satellite imagery, etc.):
URL:
GET https://gis.ecotp.gov.za/geoserver/ecpg/wcs?service=WCS&version=2.0.1&request=GetCapabilities
Response: XML with coverage offerings and their formats.
WMS is used to retrieve georeferenced map images (PNG, JPEG, etc.) for display in web or desktop applications.
Mandatory parameters:
service=WMSversion=1.3.0request=GetMaplayers – comma‑separated list of layer names (e.g., province:parcels,province:roads)styles – empty or style names (e.g., "" for default)bbox – bounding box in the coordinate system of the map (for WMS 1.3.0, order depends on CRS axis orientation; usually minx,miny,maxx,maxy for EPSG:4326)width – image width in pixelsheight – image height in pixelsformat – image format (e.g., image/png, image/jpeg)crs – coordinate reference system (e.g., EPSG:4326, EPSG:3857)Example GetMap URL:
https://gis.ecotp.gov.za/geoserver/ecpg/wms?service=WMS&version=1.3.0&request=GetMap
&layers=province:parcels&styles=&bbox=-124,48,-122,49&width=800&height=600
&format=image/png&crs=EPSG:4326
Response: The requested image (PNG, JPEG, etc.).
import Map from 'ol/Map';
import View from 'ol/View';
import TileLayer from 'ol/layer/Tile';
import TileWMS from 'ol/source/TileWMS';
const parcels = new TileLayer({
source: new TileWMS({
url: 'https://gis.ecotp.gov.za/geoserver/ecpg/wms',
params: {
'LAYERS': 'province:parcels',
'TILED': true
},
serverType: 'geoserver'
})
});
const map = new Map({
target: 'map',
layers: [parcels],
view: new View({
projection: 'EPSG:3857',
center: [-13600000, 6400000],
zoom: 8
})
});
https://gis.ecotp.gov.za/geoserver/ecpg/wms?.https://gis.ecotp.gov.za/geoserver/ecpg/wms?WFS allows you to query and download actual geometry and attribute data in formats like GML, GeoJSON, Shapefile, etc.
Mandatory parameters:
service=WFSversion=2.0.0 (or 1.1.0)request=GetFeaturetypeNames – feature type name(s) (e.g., province:parcels)outputFormat – desired format (e.g., application/json for GeoJSON, shape-zip for zipped shapefile, gml3 for GML)Optional parameters:
bbox – spatial filter (in WGS84 or layer's CRS)filter – XML or CQL filter for attribute constraintspropertyName – comma‑separated list of attributes to returnmaxFeatures – limit number of featuressrsName – output CRS (e.g., EPSG:4326)Example GetFeature URL (GeoJSON):
https://gis.ecotp.gov.za/geoserver/ecpg/wfs?service=WFS&version=2.0.0&request=GetFeature
&typeNames=province:parcels&bbox=-124,48,-122,49&outputFormat=application/json
&maxFeatures=100
Response: GeoJSON FeatureCollection.
GeoServer supports CQL (Common Query Language) for flexible filtering. Use the cql_filter parameter.
Example: Find parcels with area > 5000 and owner name containing "Smith"
&cql_filter=area > 5000 AND owner LIKE '%Smith%'
URL encoding is required.
const url = 'https://gis.ecotp.gov.za/geoserver/ecpg/wfs?service=WFS&version=2.0.0' +
'&request=GetFeature&typeNames=province:parcels' +
'&bbox=-124,48,-122,49&outputFormat=application/json&maxFeatures=50';
fetch(url)
.then(response => response.json())
.then(data => {
console.log('Received', data.features.length, 'features');
// process GeoJSON
});
https://gis.ecotp.gov.za/geoserver/ecpg/wfsprovince:parcels), choose desired format (e.g., GeoJSON), and click Add.https://gis.ecotp.gov.za/geoserver/ecpg/wfs?WCS provides access to raw raster data (coverages) such as digital elevation models, land cover grids, etc. Data can be downloaded in formats like GeoTIFF.
Mandatory parameters:
service=WCSversion=2.0.1request=GetCoveragecoverageId – identifier of the coverage (e.g., province:dem)format – desired format (e.g., image/tiff, application/x‑netcdf)Optional parameters:
subset – spatial and temporal subsets (e.g., subset=Lat(48,49), subset=Long(-124,-122))scaleFactor or width/height – scalingcrs – output CRSExample GetCoverage URL (GeoTIFF):
https://gis.ecotp.gov.za/geoserver/ecpg/wcs?service=WCS&version=2.0.1&request=GetCoverage
&coverageId=province:dem&format=image/tiff&subset=Lat(48,49)&subset=Long(-124,-122)
Response: Binary GeoTIFF file.
For high‑performance web mapping, GeoServer includes GeoWebCache, which provides tiles in WMTS and other formats. WMTS offers static tiles (vector or raster) at predefined zoom levels.
Mandatory parameters:
service=WMTSrequest=GetTileversion=1.0.0layer – layer name (e.g., province:parcels)style – style name (e.g., default)format – tile format (e.g., image/png, application/vnd.mapbox-vector-tile for vector tiles)tileMatrixSet – tiling scheme (e.g., EPSG:900913, EPSG:4326)tileMatrix – zoom leveltileRow – row indextileCol – column indexAlternatively, use the simplified XYZ template often used by web maps:
https://gis.ecotp.gov.za/geoserver/ecpg/gwc/service/wmts?layer=province:parcels&style=&tilematrixset=EPSG:900913&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix={z}&TileCol={x}&TileRow={y}
L.tileLayer('https://gis.ecotp.gov.za/geoserver/ecpg/gwc/service/wmts?' +
'layer=province:parcels&style=&tilematrixset=EPSG:900913' +
'&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png' +
'&TileMatrix={z}&TileCol={x}&TileRow={y}', {
maxZoom: 18,
attribution: 'Provincial GIS'
}).addTo(map);
For vector tiles (MVT), set Format=application/vnd.mapbox-vector-tile and use a library like Mapbox GL JS or OpenLayers.
GeoServer provides a RESTful API for administrative tasks such as creating workspaces, uploading data, and managing styles. This API is not intended for general data access, but may be used by advanced integrators for automation.
Base URL: https://gis.ecotp.gov.za/geoserver/ecpg/rest/
Authentication is required (usually HTTP Basic). For full documentation, see the GeoServer REST API reference.
Example: Get list of workspaces:
curl -u username:password https://gis.ecotp.gov.za/geoserver/ecpg/rest/workspaces.json
GeoServer returns standard OGC exception reports in XML or JSON (depending on format requested). HTTP status codes indicate the nature of the error:
200 – Successful request (even if no data, e.g., empty WFS response).400 – Bad request (invalid parameters).401 – Unauthorized (missing/invalid credentials).404 – Not found (layer, feature, or resource).500 – Internal server error.Example WFS Exception (XML):
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows" version="2.0.0">
<ows:Exception exceptionCode="InvalidParameterValue" locator="typeNames">
<ows:ExceptionText>Unknown feature type 'province:nonexistent'</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
In JSON outputFormat, the exception may be returned as a JSON object with "ows:ExceptionReport".
maxFeatures and bounding boxes to avoid large transfers. For bulk data, consider using the REST API or file downloads.EPSG:3857 (Web Mercator) for display. The server supports reprojection on the fly, but pre‑projected tiles are faster.X‑RateLimit-* headers if present.Common EPSG codes available:
EPSG:4326 – WGS 84 (latitude/longitude)EPSG:4326 – WGS 84 (latitude/longitude)See layer metadata for native CRS.
| Parameter | Description |
|---|---|
version | Service version (WMS:1.3.0, WFS:2.0.0, WCS:2.0.1) |
request | Operation (GetMap, GetFeature, GetCoverage, GetCapabilities) |
layers (WMS) / typeNames (WFS) | Layer(s) to query |
bbox | Bounding box (minx,miny,maxx,maxy) in CRS coordinates |
crs (WMS) / srsName (WFS) | Output coordinate reference system |
format / outputFormat | Response format (image/png, application/json, shape‑zip, etc.) |
width / height | Image dimensions (WMS only) |
cql_filter | CQL filter expression (WFS) |
maxFeatures | Maximum number of features to return (WFS) |
| Version | Date | Changes |
|---|---|---|
| 1.0 | 20256-02-18 | Initial GeoServer‑focused release. |
For further assistance, contact Langalethu.Majola@ecotp.gov.za or visit the Provincial GIS Developer Portal.