Web Services
The platform offers an application-programming interface (API) that provides developers with the ability to search, discover, assess and access data and information products such as maps, images, photos and documents.
- Map Services
- Open Government API
- GeoLocation API
- Elevation API
- Maps for HTML
- NapGen (NAP XML Generator)
Map Services
Note :
- A wide variety of map services is available on the Open Government Portal.
- More information on the Geospatial Standards and Operational Policies for Web Map Services (WMS)
Service* | Description | Protocol | Language | Description and visualization on Open Government Portal |
---|---|---|---|---|
CBMT3978 / CBCT3978 | Canada Base Map – Transportation Service (tiled) / Carte de base du Canada - Transport (tuilé) | REST tiled, WMTS | English/ French | View CBMT |
CBMT / CBCT | Canada Base Map – Transportation Service (WMS) / Carte de base du Canada - Transport (WMS) | WMS | English/ French | View CBMT |
canvec_en / canvec_fr | Topographic data of Canada - CanVec Series / Données topographiques du Canada - Série CanVec | WMS | English/ French | View CanVec |
railway_en / railway_fr | National Railway Network - NRWN - GeoBase Series / Réseau ferroviaire national - RFN - Série GéoBase | WMS | English/ French | View Railway |
hydro_network_en / hydro_network_fr | National Hydro Network - NHN - GeoBase Series / Réseau hydrographique national - RHN - Série GéoBase | WMS | English/ French | View Hydro |
arcticsdi_en | Canada Arctic SDI Base Map / Carte de base du Canada Arctic SDI | WMS | English | -Not available on OpenCanada |
elevation_en / elevation_fr | Elevation Data Web Mapping Service – DEM – DSM / Service de cartographie Web pour les données d'élévation - MNE - MNS | WMS | English/ French | View Elevation |
CBME_CBCE_HS_RO_3978 | The Canada Base Map - Elevation (CBME) (tiled) / Carte de base du Canada – Élévation (CBCE) (tuilé) | REST tiled | Bilingual | -Not available on OpenCanada |
coverage_HRDEM_en / coverage_HRDEM_fr | Coverage of the high resolution digital elevation model (HRDEM) product - CanElevation Series / Couverture du produit Modèle numérique d'élévation haute résolution (MNEHR) - Série CanElevation | REST | English/ French | View Coverage HRDEM |
HRDEM Mosaic Derived Products | High Resolution Digital Elevation Model Mosaic (HRDEM Mosaic) - CanElevation Series/ Mosaïque du Modèle numérique d'élévation de haute résolution (Mosaïque MNEHR) - Série CanÉlévation | WMS | No linguistic content | View WMS HRDEM Mosaic |
HRDEM Mosaic Derived Products | High Resolution Digital Elevation Model Mosaic (HRDEM Mosaic) - CanElevation Series/ Mosaïque du Modèle numérique d'élévation de haute résolution (Mosaïque MNEHR) - Série CanÉlévation | WCS | No linguistic content | View WCS HRDEM Mosaic |
NTS_SNRC | NTS grid / Grille SNRC | REST | Bilingual | -Not available on OpenCanada |
UTM | UTM grid / Grille UTM | REST | Bilingual | -Not available on OpenCanada |
Graticule/Grid | Grid of longitude and latitude lines / Quadrillage des lignes de longitude et latitude | REST | Bilingual | -Not available on OpenCanada |
*Copy link URL in a WMS Client, for example in GIS software and applications.
Open Government API
The Government of Canada aims to publish data in an open format and provide people with easy and reliable access to data, all while reducing barriers to entry, promoting innovation and eliminating unnecessary costs for businesses using the data.
Structured data is usually in the form of text but follows a specific format giving it machine readability. Some more complex formats may be in binary format such as maps and GIS related files. You will find many different formats in the Open Government Portal. More information on Working with Data and Application Programming Interfaces is available on the Open Government Portal.
GeoLocation API
Overview
The Geolocation service allows end users to get the geographic location of named features. The current service allows the location of following features:
- Street addresses
- Street names
- Streets intersection
- Place names such as towns, villages, municipalities, parks
- Natural geographical features such as lakes, islands, rivers, mountains
- Postal codes (FSA code only - first three characters)
- Map numbers from the National Topographic System (NTS)
For a complete description and request examples, please see the section Geolocation Service.
Delimitation Service
Description
The service provides access to geometry extents (delimitation) for various type of tessellation of the Canadian landmass. The service currently offers delimitations from the following coverages:
- Drainage Areas (detailed or generalized geometries)
- Landsat Footprints
- Map Sheets from the National Topographic System (NTS)
For a complete description and request examples, please see the section Delimitation Service.
Elevation API
End User Documentation
Elevation API provides information about the relief based on two data source:
Canadian Digital Elevation Model (CDEM)
Canadian Digital Surface Model (CDSM)
For a complete description and request examples, please see the section Elevation API.
Maps for HTML
Users have the ability to easily create their own customizable maps in a web browser. To create a map in your web page using open geospatial data, you simply write an HTML element, as follows:
<!DOCTYPE html>
<html>
<head>
<title>My First web Map</title>
<script type="module" src="https://geogratis.gc.ca/mapml/client/web-map/mapml-viewer.js" crossorigin></script>
</head>
<body>
<mapml-viewer zoom="3" lat="66.9413186" lon="-83.9229196" width="800" height="640" projection="CBMTILE" controls> <layer- src="https://geogratis.gc.ca/mapml/en/cbmtile/cbmt" label="Canada Base map" checked ></layer->
</mapml-viewer>
</body>
</html>
The above HTML code will render a customizable, interactive map in most web browsers:
Further information about how to mark up an HTML document to create maps with the custom HTML map element can be found in the Maps for HTML - Tutorial.
Map Markup Language
MapML allows browsers to render and users to interact with maps directly, as illustrated above. Typical web services require specialized client software, but MapML is designed for use in the browser, to be consumed by the
MapML services
Discover Map Markup Language (MapML) services listed by projection.
For Further Information
Further information about MapML can be found in the specification. In order to receive community support with using the custom map element and MapML, please consider participating in the Maps for HTML Community Group and contributing via Github.
NapGen (NAP XML Generator)
Overview
NapGen generates NAP-conformant XML for a database.
NAP (North American Profile of ISO 19115:2003 — Geographic Information — Metadata) is a National Standard of Canada. It is a recommendation on organizing geographic information. NAP includes a schema which defines placeholders for data and their relationships.
With NapGen, you interactively navigate a tree of placeholders to map them to database data. NapGen then generates a NAP-conformant XML file for each database record and applies schema-based validation to the generated XML.
NapGen includes a tool - NAP File Validator. You can use it to validate an XML file according to the NAP schema.
Operating Environment
NapGen is web-based (served up by Apache running on 32-bit Windows 7 or XP).
You can use it with Google Chrome, Microsoft Internet Explorer, and Mozilla Firefox.
The supported DBMSes are Microsoft SQL Server, Oracle, and PostgreSQL.
Installation
To install NapGen, download the distribution zip, un-zip it, then click on the file aaaReadme.html.
Page details
- Date modified: