This is the main namespace of the NVDB module, that contains several util classes for requesting NVDB norwegian web services that show data for roads, road objects and road events
- Source:
- mapspace-nvdb/bu.nvdb.jsdoc
Classes
Namespaces
Members
-
<static> AddAttributeDialog :Mapspace.nvdb.control.AddAttributeDialog
-
A kind-of singleton instance of
Mapspace.nvdb.control.AddAttributeDialog
.- Source:
- mapspace-nvdb/control/addattributedialog.js
-
<static> AddAttributeDialogListenerKey :ol.EventsKey|boolean
-
A kind-of singleton instance that stores the
ol.EventsKey
with the handler forMapspace.nvdb.AddAttributeDialog
. As the dialog is also a singleton, this listener key must be reset each time the dialog is used.- Source:
- mapspace-nvdb/control/addattributedialog.js
-
<static> AddRelatedLayerDialog :Mapspace.nvdb.control.AddRelatedLayerDialog
-
A kind-of singleton instance of
Mapspace.nvdb.control.AddRelatedLayerDialog
.- Source:
- mapspace-nvdb/control/addrelatedlayerdialog.js
-
<static> AddRelatedLayerDialogListenerKey :ol.EventsKey|boolean
-
A kind-of singleton instance that stores the
ol.EventsKey
with the handler forMapspace.nvdb.AddRelatedLayerDialog
. As the dialog is also a singleton, this listener key must be reset each time the dialog is used.- Source:
- mapspace-nvdb/control/addrelatedlayerdialog.js
-
<static> Cache :Mapspace.nvdb.CacheManager
-
A kind-of singleton instance of
Mapspace.nvdb.CacheManager
.- Source:
- mapspace-nvdb/cache.js
-
<static> CatalogDialog :Mapspace.nvdb.control.CatalogDialog
-
A kind-of singleton instance of
Mapspace.nvdb.control.CatalogDialog
.- Source:
- mapspace-nvdb/control/catalog.js
-
<static> CatalogDialogListenerKey :ol.EventsKey|boolean
-
A kind-of singleton instance that stores the
ol.EventsKey
with the handler forMapspace.nvdb.CatalogDialog
. As the dialog is also a singleton, this listener key must be reset each time the dialog is used.- Source:
- mapspace-nvdb/control/catalog.js
-
<static> ConfirmRemovalDialog :Mapspace.nvdb.control.ConfirmRemovalDialog
-
A kind-of singleton instance of
Mapspace.nvdb.control.ConfirmRemovalDialog
.- Source:
- mapspace-nvdb/control/confirmremovaldialog.js
-
<static> ConfirmRemovalDialogListenerKey :ol.EventsKey|boolean
-
A kind-of singleton instance that stores the
ol.EventsKey
with the handler forMapspace.nvdb.ConfirmRemovalDialog
. As the dialog is also a singleton, this listener key must be reset each time the dialog is used.- Source:
- mapspace-nvdb/control/confirmremovaldialog.js
-
<static> EditGeometryAttributeDialog :Mapspace.nvdb.control.EditGeometryAttributeDialog
-
A kind-of singleton instance of
Mapspace.nvdb.control.EditGeometryAttributeDialog
.- Source:
- mapspace-nvdb/control/editgeometryattributedialog.js
-
<static> EditGeometryAttributeDialogListenerKey :ol.EventsKey|boolean
-
A kind-of singleton instance that stores the
ol.EventsKey
with the handler forMapspace.nvdb.EditGeometryAttributeDialog
. As the dialog is also a singleton, this listener key must be reset each time the dialog is used.- Source:
- mapspace-nvdb/control/editgeometryattributedialog.js
-
<static> FilterModifiedDialog :Mapspace.nvdb.control.FilterModifiedDialog
-
A kind-of singleton instance of
Mapspace.nvdb.control.FilterModifiedDialog
.- Source:
- mapspace-nvdb/control/filtermodifieddialog.js
-
<static> FilterModifiedDialogListenerKey :ol.EventsKey|boolean
-
A kind-of singleton instance that stores the
ol.EventsKey
with the handler forMapspace.nvdb.FilterModifiedDialog
. As the dialog is also a singleton, this listener key must be reset each time the dialog is used.- Source:
- mapspace-nvdb/control/filtermodifieddialog.js
Methods
-
<static> addRelation(parent, parentLayer, child, childLayer)
-
Adds a feature as child of another feature.
Parameters:
Name Type Description parent
ol.Feature Parent feature.
parentLayer
Mapspace.nvdb.layer.RoadObjects Layer of parent feature.
child
ol.Feature Child feature.
childLayer
Mapspace.nvdb.layer.RoadObjects Layer of child feature.
- Source:
- mapspace-nvdb/index.js
Returns:
True if change was ok.
- Type
- boolean
-
<static> addRoadReference(feature, object1, object2)
-
Adds a road reference in a road object given by objects returned from NVDB services.
Parameters:
Name Type Argument Description feature
ol.Feature Feature.
object1
Mapspace.nvdb.LinearReferenceResultV3 Object.
object2
Mapspace.nvdb.LinearReferenceResultV3 <nullable>
Object.
- Source:
- mapspace-nvdb/index.js
Returns:
True if the feature has been changed.
- Type
- boolean
-
<static> containsLimits(filter)
-
Returns true if the first item in the filter is an array of limit conditions.
Parameters:
Name Type Description filter
Mapspace.Filter - Source:
- mapspace-nvdb/index.js
Returns:
- Type
- boolean
-
<static> filterEditableFeatures(features, includeRemoved)
-
Returns a new array of features filtering the ones that are editable from the passed ones.
Parameters:
Name Type Argument Description features
Array.<ol.Feature> Features.
includeRemoved
boolean <nullable>
If include features with 'blomaction' set to 'erasure'. By default is false.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- Array.<ol.Feature>
-
<static> fixAttributeGeometry(feature, wktFormat, descriptor, obj, force)
-
Fixes the attribute that contains the main geometry of the feature making that the WKT value matches the geometry of the feature. This matching is required due to two circunstances:
- NVDB features are created in Mapspace with geometry in Spherical Mercator projection but the attribute that contains the main geometry and any other geometry attribute come from NVDB services in EPSG:25833 no matter what projection is used in the request.
- NVDB features edited with older versions of Mapspace API did not save changes to geometries inside the corresponding attribute with the main geometry.
This function solves these problems. It is called internally when attributes of a feature are shown or when features are send to NVDB services so there is no need to call it anywhere else.
The attribute that contains the main geometry must be set in the feature in a property called
geomattribute
. Features of an object type that only has one geometry attribute defined in the descriptor have the property automatically set when loaded from NVDB services. If this property is undefined then the fix does nothing and send this feature to NVDB services will report an error explaining the problem and how to fix it.Requires that EPSG:25833 projection is loaded and that is the reason that
Mapspace.promises.getProjDefUsingBlomService('EPSG:25833')
is called when loading user data inMapspace.promises.getAllUserData
.Requires that original feature is previously stored in
Mapspace.nvdb.Cache
.Parameters:
Name Type Argument Description feature
ol.Feature Feature to fix.
wktFormat
ol.format.WKT A WKT formatter to use for geometry comparison.
descriptor
Mapspace.nvdb.ObjectTypeDescriptor A descriptor object with the metadata of the object type.
obj
Object <nullable>
An optional object with a
data
andupdate
keys in which the value of the attribute must be also stored.force
boolean <nullable>
An optional boolean. If it is true then the fix will be applied even if the feature is not set as a creation or modification. By default is false.
- Source:
- mapspace-nvdb/index.js
-
<static> fixCreationAction(feature)
-
Fixes the feature to ensure that the correct creation properties are set. Returns true if the feature required a fix, false otherwise.
Parameters:
Name Type Description feature
ol.Feature The feature.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- boolean
-
<static> fixEgenskaper(feature)
-
Fixes the feature to ensure that it has the Egenskaper property. Returns true if the feature required a fix, false otherwise.
Parameters:
Name Type Description feature
ol.Feature The feature.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- boolean
-
<static> fixErasureAction(feature)
-
Fixes the feature to ensure that the correct erasure properties are set. Returns true if the feature required a fix, false otherwise.
Parameters:
Name Type Description feature
ol.Feature The feature.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- boolean
-
<static> fixFeatureId(feature)
-
Fixes any error in the featureId of the feature. This function must be called only with features returned by 'Mapspace.promises.getExternalProviderTmpBackup' as a way to ensure uniqueness in the featureId.
Parameters:
Name Type Description feature
ol.Feature The feature.
- Source:
- mapspace-nvdb/index.js
-
<static> fixGeomAttributeProperty(feature, object)
-
Adds the
geomattribute
property to the feature, setting to null or a valid value if possible.Parameters:
Name Type Description feature
ol.Feature Feature.
object
Mapspace.nvdb.Object The NVDB object used to create the feature.
- Source:
- mapspace-nvdb/index.js
-
<static> fixRelationsId(feature)
-
Fixes any error in the ID that the feature can have for any related features. This function must be called with features returned from NVDB services and also by 'Mapspace.promises.getExternalProviderTmpBackup' as a way to ensure a unique and common way to have an ID.
Parameters:
Name Type Description feature
ol.Feature The feature.
- Source:
- mapspace-nvdb/index.js
-
<static> forceFeatureAddition(feature, layer)
-
Forces the addition of a NVDB feature in a layer.
Parameters:
Name Type Description feature
ol.Feature The feature that must exist. If the feature do not exist in the layer then returned feature is the new feature created. If feature exists then returned feature is the existing feature.
layer
Mapspace.nvdb.layer.RoadObjects The layer for the feature.
- Source:
- mapspace-nvdb/index.js
Returns:
The returned feature. This feature is not the passed one, but the feature that is in the layer.
- Type
- ol.Feature
-
<static> forceLayerAddition(feature, viewer)
-
Forces the addition of a NVDB layer if doesn't exist in the given viewer.
Parameters:
Name Type Description feature
ol.Feature The feature with type of the layer.
viewer
Mapspace.Viewer The viewer with the layer.
- Source:
- mapspace-nvdb/index.js
Returns:
The layer or null if feature is invalid.
-
<static> forceRoadsLayerAddition(viewer)
-
Forces the addition of a NVDB roads layer if doesn't exist in the given viewer.
Parameters:
Name Type Description viewer
Mapspace.Viewer The viewer with the layer.
- Source:
- mapspace-nvdb/index.js
Returns:
The layer or null if feature is invalid.
-
<static> getAttributeChanges(feature, orFeature, wktFormat)
-
Returns an object containing the information of added, modified and removed attributes in the passed feature.
Parameters:
Name Type Argument Description feature
ol.Feature The feature to check attributes for.
orFeature
ol.Feature <nullable>
The original feature from NVDB services. If not passed returns an object with no changes.
wktFormat
ol.format.WKT A WKT formatter to use for geometry comparison.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- Object
-
<static> getConditionRender(coddition, desc)
-
Returns a string render of the given condition using the provided descriptor.
Parameters:
Name Type Argument Description coddition
Mapspace.FilterCondition The condition.
desc
Mapspace.nvdb.ObjectTypeDescriptor <nullable>
The descriptor.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- string
-
<static> getDataType(desc)
-
Gets the datatype of an attribute as a number. Returns -1 if datatype should be ignored.
Parameters:
Name Type Description desc
Mapspace.nvdb.ObjectTypeAttribute The descriptor of the attribute.
- Source:
- mapspace-nvdb/index.js
Returns:
-
<static> getDefaultValueForAttribute(descriptor, attID)
-
Returns the default value for an attribute for a given object type.
Parameters:
Name Type Description descriptor
Mapspace.nvdb.ObjectTypeDescriptor Object type descriptor.
attID
number ID of the attribute.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- number | string | boolean | null
-
<static> getDescriptorPromises(typeIds)
-
Returns an array of Promises that request the object type descriptors for the given array of type IDs.
Parameters:
Name Type Description typeIds
Array.<number> Type IDs for the descriptors.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- Array.<Promise>
-
<static> getEnumValue(value, desc)
-
Returns the enum ID for a giving value or null if it is not an enum value.
Parameters:
Name Type Description value
* The current value.
desc
Mapspace.nvdb.ObjectTypeAttribute The descriptor of the attribute.
- Source:
- mapspace-nvdb/index.js
Returns:
The ID of the enum value or null.
- Type
- number
-
<static> getGeometryAttributes(descriptor, feature)
-
Returns the array of attribute definitions that of type geometry.
Parameters:
Name Type Argument Description descriptor
Mapspace.nvdb.ObjectTypeDescriptor Object type descriptor.
feature
ol.Feature <nullable>
An optional feature. If set then the attribute definitions returned will be only those that can contain the same type of geometry that the feature has.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- Array.<Mapspace.nvdb.ObjectTypeAttribute>
-
<static> getGeometryAttributeType(descriptor)
-
Returns the attribute ID that contains the main geometry for the given object type. A NVDB object type can contain multiple attributes of type
Geometry
. Only one of them is the one with main geometry. The other are additional geometries that help to describe the object. To find the main geometry we use theviktighet
value that can take any of theMapspace.nvdb.Importance
values. The main geometry is the attribute with geometry type that has the lowestviktighet
value. E.g. see https://datakatalogen.vegdata.no/199-Tr%C3%A6r, expand the "Geometri, xxx" entries and observe that typeId 5896 has the lowest number of the three spatial attributes.Parameters:
Name Type Description descriptor
Mapspace.nvdb.ObjectTypeDescriptor Object type descriptor.
- Source:
- mapspace-nvdb/index.js
Returns:
The number with attribute type ID or null if no one is found.
- Type
- number
-
<static> getJoinedFilter(layerFilter, ruleFilter)
-
Returns the filter that result in the join of a given layer filter and the filter equivalent to one classification rule. Returns null if both filters cannot resolve at the same time.
Parameters:
Name Type Description layerFilter
Mapspace.Filter Filter in the layer.
ruleFilter
Mapspace.Filter Filter equivalent to a giving classification rule, obtained using
convertRuleToFilter
in the layer.- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- Mapspace.Filter
-
<static> getRelatedChilds(feature)
-
Gets the direct related childs of the feature, or null if not related childs exists.
Parameters:
Name Type Description feature
ol.Feature The feature.
- Source:
- mapspace-nvdb/index.js
Returns:
The array of objects that contains the related child IDs or null.
- Type
- Array.<Mapspace.nvdb.Relationship>
-
<static> getRelatedFeatures(feature, relLayer)
-
Returns an array of related features in the given related layer.
Parameters:
Name Type Description feature
ol.Feature Feature.
relLayer
Mapspace.nvdb.layer.RoadObjects Related layer. This function does not check if the given layer is related or not to the given feature.
Array.<ol.Feature> - Source:
- mapspace-nvdb/index.js
-
<static> getRelatedLayers(viewer, layer)
-
Returns an array of layers in the viewer that can have a relation with the given layer.
Parameters:
Name Type Description viewer
Mapspace.Viewer layer
Mapspace.nvdb.layer.RoadObjects Layer.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- Array.<Mapspace.nvdb.layer.RoadObjects>
-
<static> getRelatedLayersFilterFunction(layer)
-
Returns a filter function that filter layers that can have a relation with the given layer.
Parameters:
Name Type Description layer
Mapspace.nvdb.layer.RoadObjects Layer.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- function | undefined
-
<static> getRelatedParents(feature)
-
Gets the direct related parents of the feature, or null if not related parents exists.
Parameters:
Name Type Description feature
ol.Feature The feature.
- Source:
- mapspace-nvdb/index.js
Returns:
The array of objects that contains the related parent IDs or null.
- Type
- Array.<Mapspace.nvdb.Relationship>
-
<static> getRelationshipChanges(feature, orFeature)
-
Returns an object containing the information of all changed relations, added, removed, or unchanged. Also returns if changes to relations must be sent as oppdater (update) or korriger (correction). in the passed feature.
Parameters:
Name Type Argument Description feature
ol.Feature The feature to check relationships for.
orFeature
ol.Feature <nullable>
The original feature from NVDB services. If not passed returns an object with no changes.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- Object
-
<static> getRequiredAttributes(descriptor, all)
-
Returns the array of required attributes and the default values for a given object type.
Parameters:
Name Type Description descriptor
Mapspace.nvdb.ObjectTypeDescriptor Object type descriptor.
all
boolean If true all required attributes will be returned, either tagged as PÅKREVD_ABSOLUTT or PÅKREVD_IKKE_ABSOLUTT.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- Array.<{id: number, defaultValue: (number|string|boolean|Object)}>
-
<static> getServicesFilter(filter)
-
Returns the filter string to use in service requests from the filter object.
Parameters:
Name Type Description filter
Mapspace.Filter The filter object.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- string
-
<static> getServicesLimits(filter)
-
Returns an object with the params to add to filter by limits. The limits must be the first item in the filter array.
Parameters:
Name Type Description filter
Mapspace.Filter The filter object.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- Object
-
<static> getStedfestingerReference(object1, object2)
-
Returns a Stedfestinger reference from objects from NVDB services.
Parameters:
Name Type Argument Description object1
Mapspace.nvdb.LinearReferenceResultV3 Object.
object2
Mapspace.nvdb.LinearReferenceResultV3 <nullable>
Object.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- Object
-
<static> getVegsystemReference(object1, object2)
-
Returns a Vegsystem reference from objects from NVDB services.
Parameters:
Name Type Argument Description object1
Mapspace.nvdb.LinearReferenceResultV3 Object.
object2
Mapspace.nvdb.LinearReferenceResultV3 <nullable>
Object.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- Object
-
<static> isFromBlom(feature)
-
Returns true if feature is from Terratec storage.
Parameters:
Name Type Description feature
ol.Feature The feature.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- boolean
-
<static> isFromNVDB(feature)
-
Returns true if feature is from NVDB server storage.
Parameters:
Name Type Description feature
ol.Feature The feature.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- boolean
-
<static> isIgnoredAttribute(att)
-
Returns true if the passed attribute is one to be ignored.
Parameters:
Name Type Description att
Mapspace.nvdb.ObjectValue The object with the attribute.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- boolean
-
<static> isNVDBEditor()
-
Returns true if the current user has any permission for edit NVDB data.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- boolean
-
<static> isNVDBProductionEditor()
-
Returns true if the current user has permission to edit NVDB data in NVDB Production environment.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- boolean
-
<static> isNVDBSuperUser()
-
Returns true if the current user is superuser and has any permission for NVDB data.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- boolean
-
<static> isNVDBUser()
-
Returns true if the current user has any permission for NVDB data.
- Source:
- mapspace-nvdb/index.js
Returns:
- Type
- boolean
-
<static> removeRelation(parent, child)
-
Removes a feature as child of another feature.
Parameters:
Name Type Description parent
ol.Feature Parent feature.
child
ol.Feature Child feature.
- Source:
- mapspace-nvdb/index.js
-
<static> removeRoadReference(feature, kortform)
-
Removes a road reference in a road object given by the
kortform
name.Parameters:
Name Type Description feature
ol.Feature Feature.
kortform
string The
kortform
name.- Source:
- mapspace-nvdb/index.js
Returns:
True if the feature has been changed.
- Type
- boolean
Type Definitions
-
Category
-
A category of object types.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description id
number ID.
navn
strnig Name.
kortnavn
string Short name.
sorteringsnummer
number Sorting number.
beskrivelse
string Description.
startdato
string Date.
-
ChangeSet
-
A collection of changes made to NVDB objects ready to be sent to NVDB Write services. See https://apiskriv.vegdata.no/1__endringssett/oppbygging.html
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description datakatalogversjon
string Data directory version.
ansvarlig
string | undefined Name of a system user in NVDB.
eksternRef
string | undefined An optional reference for project.
kontekst
string | undefined An optional CDATA block that allow to send extra info.
registrer
Object The collection of new created objects.
oppdater
Object The collection of modifications to existing objects.
lukk
Object The collection of objects that has been deprecated with a finish date and can be saved as historical.
korriger
Object The collection of objects that has been fixed due to errors in them.
fjern
Object The collection of objects that can be fully removed from the database (usually due to an error when created).
-
ChangeSetAttribute
-
Attribute value of an object.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description typeId
number ID of the attribute.
verdi
Array.<(string|boolean|number)> | undefined Value. This must be present when the value is not one inside a list of allowed values. Valid values for booleans include 'JA', 'ja' or 'true' as string, or true as boolean, and 'NEI', 'nei' or 'false' as string, or false as boolean.
enum
Array.<number> | undefined Value ID. This can be present, instead of 'verdi', when the value is one inside a list of allowed values.
binaer
Object | undefined Binary Object Type (BLOB). The attribute 'ressursId' must specify the unique ID of a binary object uploaded to the NVDB API Write via the binary object endpoint. The 'format' is the media type for the binary object, for example, 'image/png'.
geometri
Mapspace.nvdb.ChangeSetGeometry | undefined Geometry. Only present for the geometry of the object.
struktur
Mapspace.nvdb.ChangeSetStructure | undefined Structure. Only present for any attribute with structures of data.
operasjon
string | undefined For partial updates. Use 'oppdater' when the attributes has been created or modified, or 'slett' when the attribute has been deleted.
-
ChangeSetClosedObject
-
A closed object in NVDB.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description typeId
number The ID of the type of object.
nvdbId
string The ID of the object in NVDB database.
versjon
string The version what the client thinks is the latest version of the road object.
lukkadato
string The end date to be set on the road object version.
kaskadelukking
string Indicates whether daughter path objects should also be closed down in the hierarchy. If this is added 'NEI' and there are subsidiary objects that are strongly linked (association type of composition), the change set will be rejected with validation errors, because such daughter objects must have parent objects. Values= JA or NEI.
-
ChangeSetCreatedObject
-
A new created object in NVDB.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Argument Description typeId
number The ID of the type of object.
tempId
string The temporary ID for the new object.
gyldighetsperiode
Mapspace.nvdb.ChangeSetDate Initial and end date for the lifetime of the object.
egenskaper
Array.<Mapspace.nvdb.ChangeSetAttribute> Attributes.
assosiasjoner
Array.<Mapspace.nvdb.ChangeSetRelation> Related objects.
stedfesting
Mapspace.nvdb.ChangeSetRoadConnection <nullable>
Connection with the road network.
-
ChangeSetDate
-
Initial and end date for the lifetime of an object.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description startdato
string Initial date.
sluttdato
string | undefined An optional end date that when it is expected that the road object is planned to be removed.
-
ChangeSetFixedObject
-
A fix to an object in NVDB.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description typeId
number The ID of the type of object.
nvdbId
string The ID of the object in NVDB database.
versjon
string The version what the client thinks is the latest version of the road object.
validering
Object Validation parameters for the correction. 'lestFraNvdb' is the time when the road object version was originally loaded from NVDB API Read, in NVDB time, that can be extracted using the URL https://www.vegvesen.no/nvdb/api/v3/status.
gyldighetsperiode
Mapspace.nvdb.ChangeSetDate Initial and end date for the lifetime of the object.
egenskaper
Array.<Mapspace.nvdb.ChangeSetAttribute> Attributes.
assosiasjoner
Array.<Mapspace.nvdb.ChangeSetRelation> Related objects.
stedfesting
Mapspace.nvdb.ChangeSetRoadConnection Connection with the road network.
-
ChangeSetGeometry
-
Geometry object for a change in NVDB database.
- målemetode: specifies the method for measuring in ground view (x, y) and height (z) when the method is the same as for measurement in ground view. The value is a number code and is taken from the "short name" in the value https://nvdbapiles-v3.atlas.vegvesen.no/vegobjekttyper/793/9543
- målemetodeHøyde: indicates the method of measuring height. Height measurement method is specified if a different measurement method is used than for base view. The value is a number code and is taken from the "short name" in the value https://nvdbapiles-v3.atlas.vegvesen.no/vegobjekttyper/793/9544
- nøyaktighet: indicates the point standard deviation in the base view for points as well as cross deviation for lines. The value is given in cm. For value range see https://nvdbapiles-v3.atlas.vegvesen.no/vegobjekttyper/793/9551
- nøyaktighetHøyde: indicates accuracy of height in cm. Specify only if accuracy other than for basic sketch. For value range see https://nvdbapiles-v3.atlas.vegvesen.no/vegobjekttyper/793/9552
- synbarhet: indicates how well the road object was visible during the survey. If the visibility was good / normal, this sub-element can be omitted. The value is a number code and is taken from the "short name" in the value https://nvdbapiles-v3.atlas.vegvesen.no/vegobjekttyper/793/9545
- toleranse: indicates numerical tolerance (maximum deviation) on the geometry measurement. The value is given in cm. For value range see https://nvdbapiles-v3.atlas.vegvesen.no/vegobjekttyper/793/9783
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description srid
number The Spatial Reference System ID, as an EPSG code.
wkt
string The WKT representation of the geometry.
lengde
number | undefined The length, if the geometry has one, in meters and in 3D if it is a 3D geometry.
datafangstdato
string | undefined The date of measurement recording and is formatted in accordance with the ISO 8601 standard. For example: 2016-09-09.
temakode
number | undefined A categorization of the geometry used in the exchange format SOSI. For data type and value range see: https://nvdbapiles-v3.atlas.vegvesen.no/vegobjekttyper/793/9784.
medium
number | undefined The location of the road object in relation to the ground surface. The value is a number code and is taken from the "short name" in the value: https://nvdbapiles-v3.atlas.vegvesen.no/vegobjekttyper/793/9792.
kommune
number | undefined The four-digit number of the municipality where the road object is located. The municipality number must always have four digits, that is, if necessary with leading zero.
høydereferanse
number | undefined Whether coordinate registration is performed on the top or bottom of the road object. The value is a number code and is taken from the "short name" in the value: https://nvdbapiles-v3.atlas.vegvesen.no/vegobjekttyper/793/9546.
sosinavn
string | undefined The name of the geometry object in the SOSI standard, typically 'POINT', 'CURVE' or 'FLATE'.
referansegeometri
boolean | undefined Whether the geometry is derived from the road network connection and thus not a full intrinsic geometry.
verifiseringsdato
string | undefined The date when the geometry was determined to be in accordance with reality. The date is formatted in accordance with the ISO 8601 standard.
oppdateringsdato
string | undefined The date of the last change of geometry or geometry attributes. This may be different from the data capture date because recorded data may be stored for a shorter or longer period before it is entered into NVDB. The date is formatted in accordance with the ISO 8601 standard.
prosesshistorikk
string | undefined A free text description of the processes that the coordinates have gone through that may have an impact on their quality and use. Process history may include information on transformations. The type of information provided is often given in other standards, such as quality and quality assurance.
kvalitet
Object | undefined Describes various quality parameters for the geometry.
-
ChangeSetModifiedObject
-
A modification to an object in NVDB.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description typeId
number The ID of the type of object.
nvdbId
string The ID of the object in NVDB database.
versjon
string The version what the client thinks is the latest version of the road object.
gyldighetsperiode
Mapspace.nvdb.ChangeSetDate Initial and end date for the lifetime of the object.
egenskaper
Array.<Mapspace.nvdb.ChangeSetAttribute> Attributes.
assosiasjoner
Array.<Mapspace.nvdb.ChangeSetRelation> Related objects.
stedfesting
Mapspace.nvdb.ChangeSetRoadConnection Connection with the road network.
-
ChangeSetObject
-
Any object with changes for NVDB.
- Source:
- mapspace-nvdb/typedefs.js
-
ChangeSetRelation
-
Relation of an object.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description typeId
number ID of the object to relate to.
tempId
Array.<string> Temporary IDs of the objects related.
nvdbId
Array.<number> NVDB IDs of the objects related.
-
ChangeSetRemovedObject
-
A removed object in NVDB.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description typeId
number The ID of the type of object.
nvdbId
string The ID of the object in NVDB database.
versjon
string The version what the client thinks is the latest version of the road object.
kaskadefjerning
string Whether daughter road objects should also have reduced history down the hierarchy. If this is added 'NEI' and there are subsidiaries that are strongly linked (association type composition), the change set will be rejected with validation errors, because such daughter objects must have parent objects.
-
ChangesetReport
-
An object with all information about a changeset status report.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description uuid
string ID of the changeset.
features
Array.<ol.Feature> Features of the changeset.
report
Mapspace.nvdb.Report | Error Status report of the changeset or an error if the status could not be retrieved.
-
ChangeSetRoadConnection
-
The connection to the road network of an object.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description punkt
Object | undefined Object with a 'veglenkesekvensNvdbId' with the ID of the segment to connect to and a 'posisjon' with a value with the position inside the segment.
linje
Object | undefined Object with a 'veglenkesekvensNvdbId' with the ID of the segment to connect to and a 'fra' with the start position and 'til' with the end position inside the segment.
sving
Object | undefined A turn connection that describes a connection to a junction in the road network.
-
ChangeSetStructure
-
Structure data for a change in an object in NVDB database.
- Source:
- mapspace-nvdb/typedefs.js
-
DataType
-
Types of data.
For V2 see https://www.vegvesen.no/nvdb/api/v2/vegobjekttyper/datatyper For V3 see https://nvdbapiles-v3.atlas.vegvesen.no/vegobjekttyper/datatyper
Name Value Mapspace.nvdb.DataType.STRING 1 Mapspace.nvdb.DataType.NUMBER 2 Mapspace.nvdb.DataType.DATE 8 Mapspace.nvdb.DataType.SHORTDATE 9 Mapspace.nvdb.DataType.TIME 10 Mapspace.nvdb.DataType.STRUCT 26 Mapspace.nvdb.DataType.BINARY 27 Mapspace.nvdb.DataType.BOOLEAN 28 Mapspace.nvdb.DataType.CHARS 29 Mapspace.nvdb.DataType.STRING_ENUM 30 Mapspace.nvdb.DataType.NUMBER_ENUM 31 Mapspace.nvdb.DataType.AUTO 32 Mapspace.nvdb.DataType.LIST 38 Mapspace.nvdb.DataType.RELATION 39 Mapspace.nvdb.DataType.POINT 17 Mapspace.nvdb.DataType.POLYLINE 18 Mapspace.nvdb.DataType.POLYGON 19 Mapspace.nvdb.DataType.NODE 24 Mapspace.nvdb.DataType.UNSUPPORTED -1 - Source:
- mapspace-nvdb/enums.js
-
FeatureServerActionType
-
Types of actions that can be done in a feature when send to the server. This types of actions are specific actions of NVDB features. This actions must complement the ones in
Mapspace.FeatureServerActionType
in this way:- Mapspace.FeatureServerActionType.CREATION: corresponds to REGISTRER.
- Mapspace.FeatureServerActionType.MODIFICATION: matches OPPDATER and KORRIGER.
- Mapspace.FeatureServerActionType.ERASURE: matches LUKK and FJERN.
Name Value Mapspace.nvdb.FeatureServerActionType.REGISTRER The feature is a new one. Mapspace.nvdb.FeatureServerActionType.OPPDATER A new version of the feature is created. Mapspace.nvdb.FeatureServerActionType.KORRIGER A minor correction that do not requires a new version. Mapspace.nvdb.FeatureServerActionType.LUKK The feature is closed and desmantled and do not exists anymore, saved in the historic data. Mapspace.nvdb.FeatureServerActionType.FJERN The feature is a failure and must be deleted. - Source:
- mapspace-nvdb/enums.js
-
FilterModifiedOptions
-
Options to filter modified NVDB features.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description showAll
boolean | undefined Shows all the modified features and ignore the rest of options. By default is true.
startDate
string | undefined Starting date to filter. By default is undefined, which means no start date is used to filter. Format of date is the same used in NVDB metadata: yyyy-mm-dd.
endDate
string | undefined Ending date to filter. By default is undefined, which means no end date is used to filter. Format of date is the same used in NVDB metadata: yyyy-mm-dd.
objectTypes
Array.<number> | undefined It can be an array of object type IDs. If array is empty or undefined no filter is done.
modificationTypes
Array.<Mapspace.FeatureServerActionType> | undefined It can be an array of types of modifications. If array is empty or undefined no filter is done.
-
Geometry
-
Geometry object from the NVDB service.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description wkt
string | undefined Geometry in WKT format. When 'EPSG:4326' is used to request the goemtry, be aware that NVDB return WKT in 'lat lon z' format and not in 'lon lat z' format.
srid
number | undefined The SRID code, without EPSG prefix, of the geometry coordinates.
-
Importance
-
Codes for
viktighet
value that indicates the importance of an attribute.Name Value Description Mapspace.nvdb.Importance.IKKE_SATT 99 Not set Mapspace.nvdb.Importance.PÅKREVD_ABSOLUTT 1 A road object can not be stored in NVDB without this property type having value Mapspace.nvdb.Importance.PÅKREVD_IKKE_ABSOLUTT 2 The property type must be registered, but road objects that lack value must not be rejected Mapspace.nvdb.Importance.BETINGET 3 The property type must be registered, if relevant or if given criteria are met Mapspace.nvdb.Importance.OPSJONELL 4 It is optional to register the property type Mapspace.nvdb.Importance.MINDRE_VIKTIG 5 It is optional to register the property type Mapspace.nvdb.Importance.HISTORISK 6 The property type must not be registered - Source:
- mapspace-nvdb/enums.js
-
LinearReferenceResultV3
-
The result when requesting a linear reference to NVDB services.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description vegsystemreferanse
Mapspace.nvdb.LinearReferenceV3 Referencia.
veglenkesekvens
Object geometri
Mapspace.nvdb.Geometry The geometry.
avstand
number Length in meters from position lookup.
kommune
number Municipality ID.
-
LinearReferenceV3
-
Linear reference for a NVDB road object. See https://api.vegdata.no/v3/vegsystemreferanse.html See also http://nvdbtransportportal.vegdata.no/konsept4_roadreference.html
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description vegsystem
Object | undefined strekning
Object | undefined Reference to the section(strekning) and subsection (delstrekning) of a road.
kryssystem
Object | undefined Reference to a bifurcation that is part of a junction.
sideanlegg
Object | undefined Reference to a bifurcation that is not part of a junction.
kortform
string | undefined Short form of the reference.
-
LocationV3
-
Object with the location information of a NVDB road object, in version 3.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description kommuner
Array.<number> | undefined Municipality IDs.
fylker
Array.<number> | undefined County IDs.
kontraktsområder
Array.<{id: number, nummer: number, navn: string}> | undefined Contract areas this road object is associated with.
riksvegruter
Array.<{id: number, navn: string, nummer: string, beskrivelse: string, periode: string}> | undefined Roads this object is associated with.
vegsystemreferanser
Array.<Mapspace.nvdb.LinearReferenceV3> | undefined Road system references for the location of the road object.
stedfestinger
Array.<{veglenkesekvensid: number, relativPosisjon: number, kortform: string, startposisjon: number, sluttposisjon: number}> | undefined Road link sequences the road object is located on.
geometri
Mapspace.nvdb.Geometry | undefined The geometry.
-
NameFilterDescName
-
Name filter descriptive names.
Name Value Description Mapspace.nvdb.NameFilterDescName.REGION Region Region Mapspace.nvdb.NameFilterDescName.COUNTY Fylke County Mapspace.nvdb.NameFilterDescName.ROAD Vegkategori Road type Mapspace.nvdb.NameFilterDescName.MUNICIPALITY Kommune Municipality Mapspace.nvdb.NameFilterDescName.ROUTE Riksvegrute National road route Mapspace.nvdb.NameFilterDescName.CONTRACT Kontraktsområde Contract area - Source:
- mapspace-nvdb/enums.js
-
NameFilterType
-
Name filter types. The values are the param name accepted in URLs.
Name Value Description Mapspace.nvdb.NameFilterType.REGION region Region Mapspace.nvdb.NameFilterType.COUNTY fylke County Mapspace.nvdb.NameFilterType.ROAD vegsystemreferanse Road type Mapspace.nvdb.NameFilterType.MUNICIPALITY kommune Municipality Mapspace.nvdb.NameFilterType.ROUTE riksvegrute National road route Mapspace.nvdb.NameFilterType.CONTRACT kontraksomrade Contract area - Source:
- mapspace-nvdb/enums.js
-
Object
-
Object from the NVDB service.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description id
number | undefined ID. Roads do not have this attribute.
geometri
Mapspace.nvdb.Geometry | undefined The geometry.
href
string | undefined The URL to request individual data for the object, if needed.
metadata
Mapspace.nvdb.ObjectMetadata | undefined The metadata of the object.
egenskaper
Array.<Object> | undefined The list of attributes of the object.
lokasjon
Object | undefined The spatial reference of the object.
relasjoner
Object | undefined The relationships with other objects.
-
ObjectCategoryDefinition
-
Object with the definition of one category of NVDB objects.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description id
number ID number.
name
string Name.
-
ObjectType
-
Type of object.
Name Value Mapspace.nvdb.ObjectType.ROAD road Mapspace.nvdb.ObjectType.ITEM item - Source:
- mapspace-nvdb/enums.js
-
ObjectTypeAttribute
-
Object with an NVDB attribute descriptor.
- 1 - PÅKREVD_ABSOLUTT (REQUIRED_ABSOLUT). A road object cannot be stored in NVDB without this attribute type having value.
- 2 - PÅKREVD (REQUIRED). The attribute type must be registered, but road objects that are missing value should not be rejected.
- 3 - BETINGET (CONDITION). The attribute type must be registered, if applicable or if given criteria are met.
- 4 - OPSJONELL (OPTIONAL). It is optional to register the attribute type.
- 7 - SPESIALINFORMAJSON (SPECIAL INFORMATION). It is optional to register the attribute type.
- 9 - HISTORISK (HISTORICAL). The attribute type should not be registered.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description id
string Attribute ID.
navn
string Attribute name.
beskrivelse
string Attribute description.
datatype
string Datatype ID.
datatype_tekst
string | undefined Datatype name.
liste
string True if the attribute is a list of values.
sensitivitet
string Indicates whether the attribute type has sensitive type values. '0' if available to public, '1' if not.
sorteringsnummer
string Sorting number.
veiledning
string Additional attribute description.
viktighet
string Specifies whether attribute type requirements are required:
viktighet_tekst
string Name of the requirement: PÅKREVD_ABSOLUTT, PÅKREVD, BETINGET, OPSJONELL, SPESIALINFORMAJSON, HISTORISK.
sosinvdbnavn
string Name used in data delivery.
tillatte_verdier
Array.<Mapspace.nvdb.ObjectTypeAttributeValue> List of allowed values.
feltlengde
string Specifies how many characters the value can have. Includes number of decimal places and decimal places, but does not include characters.
enhet
Mapspace.nvdb.ObjectTypeAttributeUnit Unit definition.
styringsparametere
Mapspace.nvdb.ObjectTypeAttributeRequirements Requirements for the attribute.
-
ObjectTypeAttributeRequirements
-
Object with the requirements for a NVDB attribute.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description avledet
string Specifies whether the attribute type is derived and is calculated automatically: 'true'- Derived, 'false' - Not derived.
obligatorisk_verdi
string If the attribute is required or not. 'true' is required, 'false' if not.
-
ObjectTypeAttributeShort
-
Object with a short descriptor of an NVDB attribute.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description id
string Attribute ID.
navn
string Attribute name.
datatype
string Datatype ID.
datatype_tekst
string | undefined Datatype name.
-
ObjectTypeAttributeUnit
-
Object with a descriptor for the unit of measure in a NVDB attribute.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description id
string Unit ID.
kortnavn
string Short name of the unit.
navn
string Name of the unit.
-
ObjectTypeAttributeValue
-
Object with a descriptor for an allowed value in a NVDB attribute.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description id
string Allowed attribute value ID.
kortnavn
string Short form of the allowed attribute value.
navn
string | undefined The allowed attribute value in V2 NVDB services.
verdi
string | undefined The allowed attribute value in V3 NVDB services.
sorteringsnummer
string Sorting number.
-
ObjectTypeDefinition
-
Object with the definition of one NVDB type of object. Notice that keys in this object are in Norweigan language and not translated to english for easier use of NVDB JSON format.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description id
number ID number.
navn
string Name.
beskrivelse
string Description.
stedfesting
string Type of geometry. Points(
PUNKT
) or lines (LINJE
).objektliste_dato
string Date of the objects.
veiledning
string Guidance.
sosinvdbnavn
string Internal name.
sorteringsnummer
number Sorting name.
kategorier
Array.<Mapspace.nvdb.ObjectCategoryDefinition> Categories.
-
ObjectTypeDefinitionShort
-
Object with the short definition of one NVDB type of object.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description id
number ID number.
navn
string Name.
-
ObjectTypeDescriptor
-
Object with the description of one NVDB type of object. Notice that keys in this object are in Norweigan language and not translated to english for easier use of NVDB JSON format.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description id
string ID of the object type.
navn
string Name of the object type.
beskrivelse
string Description of the object type.
stedfesting
string Geometry type.
veiledning
string Additional description.
sosinavn
string Name of object type in SOSI standard.
sosinvdbnavn
string Name used in data delivery.
sorteringsnummer
string Sort number for the attribute type.
kategorier
Array.<Mapspace.nvdb.ObjectCategoryDefinition> Categories the object type belongs to.
egenskapstyper
Array.<Mapspace.nvdb.ObjectTypeAttribute> Description of attributes.
relasjonstyper
string Description of relationships.
styringsparametere
string Description of requirements.
-
ObjectValue
-
Object with one value for an attribute.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description id
string ID of the attribute.
datatype
number Integer with the datatype of the attribute.
navn
string Name of the attribute.
egenskapstype
string String with the type of attribute.
verdi
string | number | boolean Value of the attribute.
-
ProgressCodes
-
Progress codes returned by NVDB Write service.
Name Value Mapspace.nvdb.ProgressCodes.NOT_STARTED IKKE_STARTET Mapspace.nvdb.ProgressCodes.PROCESSING BEHANDLES Mapspace.nvdb.ProgressCodes.WAITING VENTER Mapspace.nvdb.ProgressCodes.REJECTED AVVIST Mapspace.nvdb.ProgressCodes.DONE UTFØRT Mapspace.nvdb.ProgressCodes.READY UTFØRT_OG_ETTERBEHANDLET Mapspace.nvdb.ProgressCodes.CANCELLED KANSELLERT - Source:
- mapspace-nvdb/enums.js
-
Relationship
-
Object that contains the information about an array of features of a given type related to another feature. Type of relationship (parent or child) is not stored in this object.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description id
number ID of the type of relationship.
listeid
number Alternate ID of the type of relationship.
type
Object Type of the objects contained in the relationship. It is an object with an
id
(number, type of object) andnavn
(string, name of the type of object).vegobjekter
Array.<string> Array of IDs of features.
-
Report
-
A report object from NVDB Write Services.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description mottatt
string Date for reception of changeset.
fremdrift
Mapspace.nvdb.ProgressCodes Type of results. Values for example can be AVVIST = Rejected, UTFØRT = Done, or UTFØRT_OG_ETTERBEHANDLET = Done and objects ready in Read API.
fremdriftOppdatert
string Date of progress update.
resultat
Mapspace.nvdb.ReportResult Results of the report.
eier
string Name of owner.
klient
string Name of client.
apiversjon
number Write API version.
transaksjon
Object Object containing two values: oppdragId (an ID for the changeset operation); tidspunkt (data registered for changeset action).
ressurer
Array.<string> Array with URL links to other services that return information of the changeset.
-
ReportFeature
-
A report object for one feature from NVDB Write Services.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description tempId
string | undefined Temporary ID used with feature.
nvdbId
string | undefined NVDB ID of the feature.
versjon
string | undefined Version of the feature.
feil
Array.<Mapspace.nvdb.ReportMessage> | undefined Errors.
advarsler
Array.<Mapspace.nvdb.ReportMessage> | undefined Warnings.
notabener
Array.<Mapspace.nvdb.ReportMessage> | undefined Notes.
-
ReportMessage
-
One object containing one message from a report from NVDB Write Services.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description melding
string | undefined The text message.
kode
string | undefined The code or type of message.
referanse
string | undefined A URL link to the web page with more information regarding the message.
-
ReportResult
-
The results of a report from NVDB Write Services.
- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description feil
Array.<Mapspace.nvdb.ReportMessage> | undefined Errors.
advarsler
Array.<Mapspace.nvdb.ReportMessage> | undefined Warnings.
notabener
Array.<Mapspace.nvdb.ReportMessage> | undefined Notes.
vegobjekter
Array.<Mapspace.nvdb.ReportFeature> | undefined Results for individual features.
-
ServicesOptions
-
Options for
Mapspace.nvdb.Services
.- Source:
- mapspace-nvdb/typedefs.js
Properties:
Name Type Description xclient
string | undefined X-Client value for headers.
xcontact
string | undefined X-Kontaktperson value for headers.
type
Mapspace.nvdb.ObjectType | undefined Type of object to request, if a road or an item in a road. By default is
Mapspace.nvdb.ObjectType.ROAD
.typeId
number | undefined ID as a number of the type of object to request. This typeId is only used when type is
Mapspace.nvdb.ObjectType.ITEM
. For example, a rest space (Døgnhvileplass) is typeId = 809. By default is 3, that is road screens (Skjerm).filter
string | undefined The filter to apply to requests.
limits
Object | undefined The optional object with the params to add to requests to filter results by limits.