This document describes the API published by Statens Vegvesen for accessing data from the National Road Database (NVDB) using Web Services
Contents
This document is intended for website and mobile developers who want to NVDB data in their application. It provides an introduction to using the API and reference material on the available parameters.
Use of the API is subject to a query limit of 2,500 requests per day.
Example: Invoking the GetCatalogue method either via WSDL or HTTP-GET will return the exposed catalogue from the service
View GetCatalogue
Response
<RoadAttributeCatalogue xmlns="http://schemas.datacontract.org/2004/07/RoadInfoServiceContracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<RoadAttributes>
<RoadAttributeType>
<Columns>
<RoadAttributeTypeValue>
<DataType>enum</DataType>
<Name>Fartsgrense</Name>
</RoadAttributeTypeValue>
</Columns>
<Description>Fartsgrense</Description>
<ID>105</ID>
<Name>Fartsgrense</Name>
</RoadAttributeType>
<RoadAttributeType>...</RoadAttributeType>
<RoadAttributeType>...</RoadAttributeType>
</RoadAttributes>
</RoadAttributeCatalogue>
easting - Easting for value for the location (UTM33 - X, WGS84 - longitude)northing - Northing for value for the location (UTM33 - Y, WGS84 - latitude)coordinateSystem - CoordinateSystem used for coordinates (UTM33 or WGS84)ViewDate - Viewdate to use when looking at roadnetbufferMeters - Buffer to use when finding closest roadTopologyLevel - TopologyLevel to use when looking at roadnetsearchRoadCategories - RoadCategories to filter against when snapping aginst roadnet (Commaseparated string of categories or empty to ignore)searchRoadStatus - RoadStatuses to filter against when snapping aginst roadnet (Commaseparated string of statuses or empty to ignore)searchRoadNumber - Roadnumber to filter against when snapping against roadnet (number or empty to ignore)REST Usage:
search - Input for search, a RoadReference either including RoadNumer or including both roadnumber and roadnumbersegment (0600RV00007 or 0600RV00007001)ViewDate - Viewdate to use when looking at roadnetTopologyLevel - TopologyLevel to use when looking at roadnetREST Usage:
roadReference - Roadreference to get data forviewDate - Date to use when viewing the roadnet (Format: YYYY-MM-DD)topologyLevel - Topologylevel to use when snapping against the roadnet (Overview, Roadway, Lane)REST Usage:
nvdbLinkId - NVDB LinkID linkRelLen - RelativeLength along link (0..1) viewDate - Date to use when viewing the roadnet (Format: YYYY-MM-DD)REST Usage:
easting - Easting coordinate (X for UTM33, Longitude for WGS84)northing - Northing coordinate (Y for UTM33, Latitude for WGS84)coordinateSystem - CoordinateSystem used for coordinates (UTM33 or WGS84)viewDate - (optional) Date to use when viewing the roadnet (Format: YYYY-MM-DD)bufferMeters - (optional) Buffer to use when snapping against the roadnettopologyLevel - (optional) Topologylevel to use when snapping against the roadnet (Overview, Roadway, Lane)searchRoadCategories - (optional) RoadCategories to filter against when snapping aginst roadnet (Commaseparated string of categories or empty to ignore)searchRoadStatus - (optional) RoadStatuses to filter against when snapping aginst roadnet (Commaseparated string of statuses or empty to ignore)searchRoadNumber - (optional) Roadnumber to filter with when snapping aginst roadnetMethod supporting GET
Example: RoadInfoService/GetRoadDataForLocation?easting=258079&northing=6654855&coordinateSystem=UTM33
Response
<RoadDataCollection xmlns="http://schemas.datacontract.org/2004/07/RoadInfoServiceContracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<RoadDataItems>
<RoadDataItem i:type="RoadDataPointItem">
<Attributes>
<RoadDataItemAttribute>
<AttributeName>Fartsgrense</AttributeName>
<AttributeValue>50</AttributeValue>
</RoadDataItemAttribute>
</Attributes>
<ItemTypeID>105</ItemTypeID>
<RoadReferenceAtLocation>
<County>3</County>
<LaneCode>1#2</LaneCode>
<Measure>0.54257987711362732</Measure>
<Municipality>1</Municipality>
<ReflinkOID>604335</ReflinkOID>
<RoadCategory>K</RoadCategory>
<RoadNetPosition>
<SRID>25833</SRID>
<X>258084.67045553171</X>
<Y>6654862.8981344905</Y>
</RoadNetPosition>
<RoadNumber>13070</RoadNumber>
<RoadNumberSegment>1</RoadNumberSegment>
<RoadNumberSegmentDistance>3796</RoadNumberSegmentDistance>
<RoadStatus>V</RoadStatus>
<RoadnetHeading>305.67640757583558</RoadnetHeading>
<TextualRoadReference>0301KV1307000103796</TextualRoadReference>
</RoadReferenceAtLocation>
</RoadDataItem>
<RoadDataItem i:type="RoadDataPointItem">...</RoadDataItem>
</RoadDataItems>
</RoadDataCollection>
featureTypeID - (integer) The type that data should be extracted forpolygon - The polygon describing the area (The polygon must be closed!)Exposed via rest using HTTP-POST
<GetRoadDataInAreaRequest xmlns="http://schemas.datacontract.org/2004/07/RoadInfoServiceContracts">
<featureTypeID>45</featureTypeID>
<polygon>
<CoordinateSystem>UTM33</CoordinateSystem>
<PolygonPoints>
<Point>
<X>256123.75</X>
<Y>6621849.75</Y>
</Point>
<Point>
<X>260524.25</X>
<Y>6631497</Y>
</Point>
<Point>
<X>253923.5</X>
<Y>6634543.5</Y>
</Point>
<Point>
<X>250877</X>
<Y>6625742.5</Y>
</Point>
<Point>
<X>256123.75</X>
<Y>6621849.75</Y>
</Point>
</PolygonPoints>
</polygon>
</GetRoadDataInAreaRequest>
Example response
<RoadDataCollection xmlns="http://schemas.datacontract.org/2004/07/RoadInfoServiceContracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<RoadDataItems>
<RoadDataItem i:type="RoadDataPointItem">
<Attributes>
<RoadDataItemAttribute>
<AttributeName>Navn</AttributeName>
<AttributeValue>Oslofjordtunnelen</AttributeValue>
</RoadDataItemAttribute>
<RoadDataItemAttribute>
<AttributeName>Takst liten bil</AttributeName>
<AttributeValue>60</AttributeValue>
</RoadDataItemAttribute>
<RoadDataItemAttribute>
<AttributeName>Takst stor bil</AttributeName>
<AttributeValue>130</AttributeValue>
</RoadDataItemAttribute>
</Attributes>
<ItemTypeID>45</ItemTypeID>
<RoadReferenceAtLocation>
<County>2</County>
<LaneCode>1#2</LaneCode>
<Measure>0.059387705426161</Measure>
<Municipality>0</Municipality>
<ReflinkOID>443429</ReflinkOID>
<RoadCategory>R</RoadCategory>
<RoadNetPosition>
<SRID>25833</SRID>
<X>255635.99969713949</X>
<Y>6625176.9635178018</Y>
</RoadNetPosition>
<RoadNumber>23</RoadNumber>
<RoadNumberSegment>1</RoadNumberSegment>
<RoadNumberSegmentDistance>5704</RoadNumberSegmentDistance>
<RoadStatus>V</RoadStatus>
<TextualRoadReference>0200RV0002300105704</TextualRoadReference>
</RoadReferenceAtLocation>
</RoadDataItem>
</RoadDataItems>
</RoadDataCollection>
polygon - The polygon describing the area (The polygon must be closed!)ViewDate - (Optional) ViewDate to receive the roadnetwork for (default today)TopologyLevel - (Optional) TopologyLevel to receive road network for (default Roadway)Exposed via rest using HTTP-POST
<GetRoadReferencesInAreaRequest xmlns="http://schemas.datacontract.org/2004/07/RoadInfoServiceContracts">
<ViewDate>
2015-08-13T00:00:00Z
</ViewDate>
<TopologyLevel>
Roadway
</TopologyLevel>
<polygon>
<CoordinateSystem>UTM33</CoordinateSystem>
<PolygonPoints>
<Point>
<X>254343.46</X>
<Y>6624313.97</Y>
</Point>
<Point>
<X>254369.96</X>
<Y>6624500.16</Y>
</Point>
<Point>
<X>254225.80</X>
<Y>6624582.72</Y>
</Point>
<Point>
<X>254084.67</X>
<Y>6624387.53</Y>
</Point>
<Point>
<X>254343.46</X>
<Y>6624313.97</Y>
</Point>
</PolygonPoints>
</polygon>
</GetRoadReferencesInAreaRequest>
Example response
<arrayofroadreference xmlns="http://schemas.datacontract.org/2004/07/RoadInfoServiceContracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<roadreference i:type="RoadLineReference">
<county>3</county>
<LaneCode>1#2</LaneCode>
<municipality>1</municipality>
<reflinkoid>605153</reflinkoid>
<roadcategory>K</roadcategory>
<roadnumber>15877</roadnumber>
<roadnumbersegment>1</roadnumbersegment>
<roadstatus>V</roadstatus>
<textualroadreference>0301KV15877001 00000-00098</textualroadreference>
<frommeasure>0</frommeasure>
<geometrytransformationapplied i:nil="true" />
<roadnumbersegmentenddistance>98</roadnumbersegmentenddistance>
<roadnumbersegmentstartdistance>0</roadnumbersegmentstartdistance>
<tomeasure>0.3320075</tomeasure>
<wktgeometry>LINESTRING (261042.700000001 6650002.5, 261027.5 6650009.6, 261008.4 6650022.3, 260978 6650043.4, 260959.4 6650054.3)</wktgeometry>
</roadreference>
<roadreference i:type="RoadLineReference">
<county>3</county>
<municipality>1</municipality>
<reflinkoid>604813</reflinkoid>
<roadcategory>K</roadcategory>
<roadnumber>14719</roadnumber>
<roadnumbersegment>1</roadnumbersegment>
<roadstatus>V</roadstatus>
<textualroadreference>0301KV14719001 00181-00265</textualroadreference>
<frommeasure>0.68388864</frommeasure>
<geometrytransformationapplied i:nil="true" />
<roadnumbersegmentenddistance>265</roadnumbersegmentenddistance>
<roadnumbersegmentstartdistance>181</roadnumbersegmentstartdistance>
<tomeasure>1</tomeasure>
<wktgeometry>LINESTRING (260715.9 6650040.2, 260707.3 6650046.4, 260691.1 6650059.4, 260661.9 6650082.8, 260651.2 6650093.4)</wktgeometry>
</roadreference>
</arrayofroadreference>
startEasting - Easting coordinate for startpoint (X for UTM33, Longitude for WGS84)startNorthing - Northing coordinate for startpoint (Y for UTM33, Latitude for WGS84)endEasting - Easting coordinate for endpoint (X for UTM33, Longitude for WGS84)endNorthing - Northing coordinate for endpoint (Y for UTM33, Latitude for WGS84)viewDate - Date to use when viewing the roadnet (Format: YYYY-MM-DD)TopologyLevel - [Optional, default is Roadway] TopologyLevel to use when snapping against roadnet and returning dataSearchRoadCategories - (optional) Filter of RoadCategories to look at when looking at roadnet (commaseparated string: E,R,F)SearchRoadStatuses - (optional) Filter of RoadStatuses to look at when looking at roadnet (commaseparated string: V,W,S) SearchRoadNumber - (optional) Filter of RoadNumber to look at when looking at roadnet (number)RouteType - (optional) Control what type of route that should be calculated. CostBased (default) calculates a route that is allowed for a vehicle to drive. LengthBased calculated the shortest (topologically correct) route.REST Usage:
Points - Array of points to calculate route for (At least one per each road in the route)ViewDate -Date to use when viewing the roadnetSearchRoadCategories - (optional) Filter of RoadCategories to look at when looking at roadnetSearchRoadStatuses - (optional) Filter of RoadStatuses to look at when looking at roadnetSearchRoadNumber - (optional) Filter of RoadNumber to look at when looking at roadnetIncludeRoadAttributeTypes - Array of Attribute ID:s to include in returned dataReturnRoadReferencesOnRoute - True to return the roadsegments of the route (else only roaddata on the route is returned)TopologyLevel - TopologyLevel to use when snapping against roadnet and returning dataRouteType - (optional) Control what type of route that should be calculated. CostBased (default) calculates a route that is allowed for a vehicle to drive. LengthBased calculated the shortest (topologically correct) route.reflinkOID - NVDB ReflinkOIDrellen - Relative position (0..1) on RefLinkViewDate - Viewdate to use when looking at roadnetREST Usage:
roadreference - Roadreferencestring Ex: 1500EV0003902907618ViewDate - Viewdate to use when looking at roadnetTopologyLevel - TopologyLevel (Overview, Roadway, Lane) to use when looking at roadnetREST Usage:
roadreference - Roadreferencestring Ex: 1500EV0003902907618REST Usage:
reflinkOID - NVDBLink OIDrellen - Relative length on Link (0..1)REST Usage:
easting - Easting coordinate (UTM33)northing - Northing coordinate (UTM33)REST Usage:
Using the map below you can test the services directly. When you click a location in the map the REST services are called and the data is display in the map
Søk Vegreferanse: Topology-Level:Road Reference
The method GetDatainArea extracts data within a given polygon for a specified featuretype
Choose FeatureType
Polygon
Beskrivning