Vectortiles from Kartverket are designed to offer the speed and performance of todays cache (tile) services but with flexible styling, provided through a data service and client side rendering.
The first pilot service (landtopo) delivers data covering the whole of Norway and includes our most detailed 1:3000 data at higher zoom levels and generalised data at lower zoom levels for better performance.
The vectortiles service can be used with most of the mainstream web mapping libraries, including mapbox, maplibre, openlayers, leaflet as well GIS clients such as QGIS. The functionality through these clients and libraries vary, but all have in common that they provide easy access to both predefined and user defined styles as well as the fast performance expected in todays web applications. This means that the user is in full control of which data to show, which styles to use and is able to customise the map to a specific need.
In addition to the styling flexibility provided, increased user interaction is made possible through access to feature level information. This data can either be provided to the user as information, or used as input to further processes.
The tilejson specification was designed as an open way to provide map metadata, and defines the structure for a json manifest document.
The url to the tilejson manifest document for the landtopo sevice is: https://cache.kartverket.no/test/vectortiles/tilejson/landtopo.json
The url can be used to specify service information in various clients. More info information can be found here: https://github.com/mapbox/tilejson-spec
https://github.com/kartverket/vectorTilesDemo ( with https://github.com/openlayers/ol-mapbox-style )
The services can be used natively in QGIS from version 3.14 and up, or through a plugin. The mapbox styles have to be converted to qgis styles on the fly, so the performance may not be as good as in a mapbox client and some styles may not translate perfectly.
Remember to set the projection of the window to epsg:3857.
The styles for vectortile are contained in their own file and written in json. All style files contain:
https://vectortiles.kartverket.no/styles/v1/landtopo/style.json
We currently provide just 1 default style so that it is possible to use and look at the service with no extra work needed. This styles have been designed to mirror the cartography of our topo4 raster tile services, so is quite complex and long.There are some examples of different styles in style subfolder styles.
However, it is relatively easy for a user to create a custom style using either a text editor or an online style editor such as maputnik or fresco. in addition to changing the style of the data, its also possible to remove layers or change the drawing order of the layers. By doing this, the user can create a style that is customised to a specific need.
Thumbnails of styles Code examples
maputnik is an opensource visual editor application for vectortiles services. It's possible to build and run locally, but it also comes with a free web gui which can be used with Kartverkets vectortiles services.
More information about using maputnik can be found here: https://github.com/maputnik/editor/wiki
One standard font (otherwise known as 'glyphs') are also available from Kartverket:
opensansregular
and can be used through this url:
https://cache.kartverket.no/test/fonts/{fontstack}/{range}.pbf
(The application will replace the fontstack and range variables automatically as long as one of the above font names are defined as a text-font within a layer. For example: "text-font": ["OpenSansRegular"])
Several other fonts are available from the OpenMapTiles. Just follow the instructions to include them in your own styles.
We've tried to simplify the data model as much as possible to make it easier to build user defined styles. In effect, the service contains 21 layers, but each layer contains multiple feature types that can be filtered and styled as needed.
Most of the layers contain a mix of data sources from our Kartdata and FKB data products. Because the models for these 2 datasets are very different, not all the attributes will contain values. Some features will have full attribute values for the first 14 zoom levels, but limited values from level 15 to 19, and vice versa.
Every layer has an 'objtype' attribute which contains information about what type of feature the object is, for example the objtype attribute in the adm_boundaries layer includes the values; 'national boundary', 'county', 'municipality' and 'territorial boundary'.
All layers contain the attribute objtype: (object type), which describes the specific object type for each individual feature. Certain layers, like adm_grenser and arealdekke, only contain this one attribute.
Several layers also contain one or more of the following attributes
In addition there are other layer-specific attributes, such as betjeningsgrad, tilgjhengelighet, hoyde, makshoyde, vannbredde vegkategori, motorvegtype, rutemerking, belysning or retningsverdi.
Layers such as veglinjer or bygningspunkt might contain one or more of these.
adm_grenser
This layer contains country, municipality and district data. The geometry type is polygon so its possible to either shown areas or outlines.
objtype
tekst
Contains area names, heights and addresses. This is a point type layer, however the features are displayed as labels rather than icons
objtype
vegnavn
Separate text layer containing road names and numbers. This too is a point layer but had to be separated from the tekst layer due to the inclusion of several attributes which are only required for vegnavn. Se Codelist for more information.
objtype
vegstatus: refers to the status of the road. Existing, temporary etc. -Values: - P: Approved planned road - V: Existing road
vegnummer: road number
gatenavn: street name. For example: Main Street
vegkategori: Indicates road type. Examples: private road, European route etc. -Values: - E: Europaveg/ European Route - F: Fylkesveg/ County Road - K: Kommunal veg/ District Road - P: Privat veg/Private Road - R: Riksveg/ National Road - S: Skogsbilveg/ Forest Road
medium: the location of the object relative to the earth's surface
bygninger
The bygninger layer is a polygon layers which includes all buildings as areas. These are only shown on lower zoom levels (12 and under). On higher zoom levels buildings are represented as points
objtype
bygningspunkter holds quite an extensive number of objtype values, the most common one being 'Bygning'. The others are rarely used. Se Codelist for more information.
subtype: contains 114 different subtypes which indicates byilding type, ordered by numbers. The bygnigner subtypes correspond to the bygningspunkter subtypes
examples: 511 = hotel, 671 = church, 970 = hospital with ER
bygningspunkter
Buildings represented with points and icons on higher zoom levels (11 and over). on lower zoom levels the buildings are represented as polygons.
objtype
bygningspunkter holds quite an extensive number of objtype values, the most common one being 'Bygning'. The others are rarely used. See codelists for more information.
subtype: contains 114 different subtypes which indicates byilding type, ordered by numbers, Se Codelist for more information. The bygnigner subtypes correspond to the bygningspunkter subtypes
examples: 511 = hotel, 671 = church, 970 = hospital with ER
betjeningsgrad: description of which service functions are available. Only applicable to public cabins (subtypes 956 and 56)
tilgjengelighet: Describes whether a building is locked or open. Only applicable to public cabins
hoydelag
A polygon layer which represents the overall landscape elevation, visualized with a colour gradient. Represented in meters above sea level. Generated from a DTM
objtype
makshoyde: Max height in meters, given in intervals of 500m (N250,N500) or 600m (N2000), between 500-3000m
hoydekurver
Landscape elevation represented in meters above sea level in a line layer. Used for drawing contour lines. Generated from a DTM Se Codelist for more information.
Attributes:
objtype
medium: Describes ground surface type
hoyde: height in meters of each contour line. The vertical distance between them varies with zoom levels, from 10m intervals (zoom level 14 and below) to 600m (zoom level 8). From -20m - 2400m.
pois
Points of interest, these are usually visualized with an icon or a circle. Contains landscape-related points of interest such as trigonometric points, mountain peaks etc.
objtype: The majority of these objtypes are only applicable to specific zoom level intervals. Se Codelist for more information. TrigonometriskPunkt and Terrengpunkt are available on all zoom levels
medium: Describes ground surface type for topographic and terrain points. Only available for TrigonometriskPunkt and Terrengpunkt
hoyde: Specific height of each point, given in meters. Only available for TrigonometriskPunkt and Terrengpunkt. A separate layer holds all water area polygons
vannlinje
Vannlinje contains all water lines, mostly rivers. Water polygons can be found in the Arealdekke layer (land cover). At Zoom level 14 and down rivers are shown as polygons (Arealdekke)
objtype
Vannlinje holds quite an extensive number of objtype values which are only available from zoom level 14 and under. Se Codelist for more information.
vannbredde: Rough classification of watercourses according to average width over longer expanses. Only applicable for features with objtype 'ElvBekk' and for zoom levels 8-13
arealdekke
Polygon layer which contains information on land cover, including both natural and industrial cover, as well as water bodies such as oceans and lakes
objtype: There are 30 different values for objtype. Information on all of these can be found in Codelist. Below follows an unofficial subdivision of all 30 values by theme/topic:
naturinfo
Line layer outlining all protected sites and national parks, as well as "land cover line data"
objtype
vegflater
Road infrastructure presented as a polygon layer. This layer is only available on zoom levels 14 and higher. On higher zoom levels the road infrastructure is represented using the road infrastructure line layer Se Codelist for more information.
Attributes:
objtype
medium: the location of the object relative to the earth's surface.
Road infrastructure presented as a line layer. This layer is only available on zoom levels 13 and lower. On higher zoom levels the road infrastructure is represented using the road infrastructure polygon layer Se Codelist for more information.
objtype
vegkategori: Indicates road type. Examples: private road, European route etc. Only applicable for features with objtype 'Vegsenterlinje'
motorvegtype: Sub-classification of roadway type. Only applicable for features with objtype 'Vegsenterlinje'
medium: the location of the object relative to the earth's surface.
vegavgrensning
Line layer representing outlines of roads and paths, including roadways, pavements and cycle paths. This layer is only available on zoom levels 14 and higher
objtype: There are 16 different objtypes within the vegavgresning layer. the 7 most abundant of these are listed below
medium: the location of the object relative to the earth's surface.
stier
A line layer containing all roads, paths and trails in the terrain or on uncultivated land. Se Codelist for more information.
objtype
rutemerking: States whether the trail is marked or not . Only applicable for features with objtype 'Sti'
belysning: States whether trail route is lit up or not. Only applicable for features with objtype 'Sti' and on zoom levels 14 and higher
jernbane
Line layer which represents a single or several parallel tracks as part of a railway line. Se Codelist for more information.
Attributes:
objtype
subtype: Describes railway type. Only applicable for features with objtype 'bane' on zoom levels 10 and higher
medium: The location of the object relative to the earth's surface.
ferger
Line layer representing all routes serviced by ferries
objtype
passasjerferjestrekning: ferry route for transportation of people and goods. Wherever bilferjestrekning and passasjerferjestrekning coincide the objtype bilferjestrekning will be used
samferdsel punkt
All point data related to infrastructure, including stations, airports and parking spaces. Several of these features are also available as polygon features through anleggsomrader or arealdekke on higher zoom levels Se Codelist for more information.
Attributes:
objtype
subtype: Only applicable for features with objtype 'Lufthavn'. Indicate the aircraft type suitable to land at the specific site
anleggslinjer
Installation and construction line type data. Includes construction lines, outlines and boundaries, as well as electrical wires and lines conducting electrical power over large distances
objtype: There is a quite extensive list of different values for anleggslinjer objtype. All values can be found in code lists. Some examples include:
anleggspunkter
Installation and construction point type data. Includes construction points, suck as towers, wind turbines etc.
objtype: There is a quite extensive list of different values for anleggslinjer objtype. All values can be found in code lists. Some examples include:
anleggsomrader
Installation and construction polygon type data. Only available on zoom levels 13 and higher
objtype: There is a quite extensive list of different values for anleggsomrader objtype, several of which correspond to objtypes in anleggslinjer and anleggspunkter. All values can be found in code lists. Some examples include :
Table view of layers - ala ordnance survey Fields explanation
The data in the service comes from 3 products:
Kartdata (general topographic data N5000 - N50) FKB (1:5000 topographic data) Matrikkel (cadastral data)
These data sources can be further explored within the Norwegian national geoportal
In depth information about which object types are available on which zoom levels can be found in the zoom levels overview document
Are there any code examples available?
we have some code examples at the top of this page, and within the seperate 'examples' folder.
Will these services work in desktop GIS clients?
Some, but not all. A qgis example can be found at the top of the page, but we do not have a comprehensive list over which clients currently support vectortiles services.
Is technical support available?
Technical questions can be asked with the issues section of this github project, or directly to the email address:
What projections are the services available in?
Currently the services are available in only google mercator (EPSG:3857) and UTM33N (EPSG:25833)
Can I use the vectortiles service as a download service?
No. These services have been designed and customised to be view services only, we kindly ask that they are used as such.
Which other vectortiles services are Kartverket planning?
We'll soon be providing services for marine topographic data, ports and hiking and bridleway trails. But with the number fo open datasets available from Kartverket, we're sure there'll be others to follow, stay tuned!