GeoGratis Web Services

The GeoGratis 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.

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

Note: Please note that the service is also available via the https protocol.

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.

Canada Base Map (CBM)

"Continuous base mapping coverage from national to local scales in a single, easy-to-use, cartographically designed, web mapping service."

Overview

The Canada Base Map - Transportation (CBMT) web mapping services of the Earth Sciences Sector (ESS) at Natural Resources Canada (NRCan) are intended primarily for online mapping application users and developers. These services are available in multiple formats and projections including: WMS, WMTS, ESRI REST, SOAP, Lambert Conformal Conic (ESPG:3978), Web Mercator (EPSG:3857), etc.

These services can be accessed at no cost and without restrictions according to the terms of the license at Open Government Licence – Canada.

This collection of base map services have been created to provide locational context with an emphasis on transportation networks over which thematic information can be overlaid. Cartography (colour, symbology, etc.) of the base map has been specifically designed so that thematic information will be more prominent than the locational information. The range of viewing scales for this service is between 1:200 000 000 and 1:1 000 for Dynamic and between 1:200 000 000 and 1: 18 000 for Cached. Features from the following datasets are used by the CBMT service: CanVec, GeoBase, and the National Topographic Data Base (NTDB).

Canada Base Map – Transportation (CBMT) URLs:

ArcGIS Server

WMS (Web Mapping Service) Server

Canada Base Map – Elevation (CBME) URLs:

ArcGIS Server

Service Requests

The CBMT WMS adequately supports mandatory operations (GetCapabilities and GetMap) as defined in the OGC WMS standard, version 1.3.0. If available, the other operations do not guarantee any results.

Data sources used

The data sources used in the CBMT service vary depending on the scale requested. The table below describes the use of these sources based on the scale requested in the query.

Data Source Data Scale Minimum Scale Maximum Scale
CanVec 1:50 000 1:1 000 1:115 000
NTDB 1:250 000 1:115 001 1:550 000
CanVec - Atlas of Canada 1:1 000 000 1:550 001 1:2 750 000
CanVec - Atlas of Canada 1:5 000 000 1:2 750 001 1:13 750 000
CanVec - Atlas of Canada 1:15 000 000 1:13 750 001 1:200 000 000

WMS - Toporama

The Toporama Web Mapping Service (Toporama WMS) of the Earth Sciences Sector (ESS) at Natural Resources Canada (NRCan) is an Internet service that is intended mainly for online map application users and developers. These services are available in multiple projections.

These services can be accessed at no cost and without restrictions according to the terms of the license at Open Government Licence – Canada.

This service can be used to build a customized map using the best baseline data from the ESS for a given scale. They are grouped together under 16 information themes developed, depending on the scale, using the CanVec product.

Main URLs for the Toporama WMS by official language:

  • Toporama WMS English*: http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en
  • Toporama WMS French*: http://wms.ess-ws.nrcan.gc.ca/wms/toporama_fr

*For use in a WMS Client, for example in GIS software and applications.

Service requests

The Toporama WMS adequately supports the operations required (GetCapabilities and GetMap) as defined in the OGC WMS standard, version 1.3.0. If available, the other operations do not guarantee any results.

GetCapabilities is an operation that produces a descriptive XML document including general information on the Toporama WMS, along with the description of each data layer. Example of this type of request addressed to Toporama WMS.

GetMap is an operation that allows the user to obtain a raster map containing the requested layers selected from all the available layers as defined in the document produced by the GetCapabilities operation. This operation requires several arguments to define elements such as the data layers, region, projection, size, image format, etc. The complete list of arguments required is available in the aforementioned OGC document. Example of a GetMap operation request.

Data sources used

The data sources used vary depending on the scale requested. The table below describes the use of these sources based on the scale requested in the query.

Data Source Data Scale Minimum Scale Maximum Scale
CanVec 1:50 000 1:1 000 1:115 000
NTDB 1:250 000 1:115 001 1:550 000
CanVec - Atlas of Canada 1:1 000 000 1:550 001 1:2 750 000
CanVec - Atlas of Canada 1:5 000 000 1:2 750 001 1:13 750 000
CanVec - Atlas of Canada 1:15 000 000 1:13 750 001 1:200 000 000

Maps for HTML

GeoGratis offers users the ability to easily create their own customizable maps in a web browser. To create a map in your web page using GeoGratis' open geospatial data, you simply write an HTML element, as follows:

<!DOCTYPE html>
<html>
   <head>
     <title>My First web Map</title>
     <script src="http://geogratis.gc.ca/mapml/client/bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
     <link rel="import" href="http://geogratis.gc.ca/mapml/client/bower_components/web-map/web-map.html">
   </head>
   <body>
     <map is="web-map" zoom="3" lat="66.9413186" lon="-83.9229196" width="800" height="640" projection="CBMTILE" controls>
       <layer- src="http://geogratis.gc.ca/mapml/en/cbmtile/cbmt" label="Canada Base map" checked ></layer->
     </map>
   </body>
</html>

The above HTML code will render a customizable, interactive map in most web browsers:

Web Maps - Canada Base Map

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 <map> custom HTML element at plain web URLs. GeoGratis offers several sources of MapML, in various projections.

MapML services

Search for and discover NRCan MapML services in our GeoGratis catalogue.

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.

Distribution Zip