new JSONFeature()
- Source:
- mapspace-nvdb/format/jsonfeature.js
Extends
- ol.format.JSONFeature
Methods
-
invertGeomCoords(geom)
-
Inverts the longitude and latitude order in coords. NVDB geometries have always a [latitude, longitude, heigth] orden, which is something weird and do not comply with WKT standard.
Parameters:
Name Type Description geomol.geom.Geometry The geometry.
- Source:
- mapspace-nvdb/format/jsonfeature.js
-
writeAttributesChangeSet(feature, descriptor [, opt_origin] [, opt_korrigers])
-
Writes the attributes and geometry of a feature to a JSON object that follow the NVDB format for sending changes through the Writing (Skriv) Service. For modified features this function writes only the modified attributes or geometry using NVDB partial updates format.
Parameters:
Name Type Argument Description featureol.Feature The feature created or modified.
descriptorMapspace.nvdb.ObjectTypeDescriptor The descriptor object for the type of object the feature belongs to.
opt_originol.Feature <optional>
An optional original feature.
opt_korrigersboolean <optional>
An optional boolean indicating if return the korrigers or oppdaters. By default is false and return oppdaters.
- Source:
- mapspace-nvdb/format/jsonfeature.js
Returns:
An array of objects.
- Type
- Array.<Mapspace.nvdb.ChangeSetAttribute>
-
writeFeatureChangeSet(feature, descriptor, tDate [, opt_origin] [, opt_korrigers])
-
Writes a feature to a JSON object that follow the NVDB format for sending changes through the Writing (Skriv) Service.
Parameters:
Name Type Argument Description featureol.Feature The feature created, modified or removed.
descriptorMapspace.nvdb.ObjectTypeDescriptor The descriptor object for the type of object the feature belongs to.
tDatestring The date to use as transaction date.
opt_originol.Feature <optional>
An optional original feature.
opt_korrigersboolean <optional>
An optional boolean indicating if return the korrigers or oppdaters. By default is false and return oppdaters.
- Source:
- mapspace-nvdb/format/jsonfeature.js
Returns:
An object or null if anything goes wrong.
-
writeFeaturesChangeSet(features, descriptors, originalFeatures, status, errors)
-
Writes an array of features to a JSON object that follow the NVDB format for sending changes through the Writing (Skriv) Service.
Parameters:
Name Type Description featuresArray.<ol.Feature> The features created, modified or removed.
descriptorsArray.<Mapspace.nvdb.ObjectTypeDescriptor> The array of descriptor objects for the types of object the features belong to.
originalFeaturesArray.<?ol.Feature> The original version of the features passed. For created features nnull must be used.
statusObject An object with two properties (version and transactionDate) containing the version for current catalog and the transaction date to use. This value can be obtained using the promise obtained through
Mapspace.nvdb.Services#getStatus.errorsArray.<Object> An array of
Mapspace.SchemaValidationErrorin which store the errors found during validation in the API of the changeset.- Source:
- mapspace-nvdb/format/jsonfeature.js
Returns:
An object.
-
writeRelationsChangeSet(feature [, opt_origin] [, opt_korrigers])
-
Writes the relations of a feature to a JSON object that follow the NVDB format for sending changes through the Writing (Skriv) Service. This function writes only relations that are additions or removals to be added to a delvisOppdater or delvisKorriger section in the changeset.
Parameters:
Name Type Argument Description featureol.Feature The feature created or modified.
opt_originol.Feature <optional>
An optional original feature.
opt_korrigersboolean <optional>
An optional boolean indicating if return the korrigers or oppdaters. By default is false and return oppdaters.
- Source:
- mapspace-nvdb/format/jsonfeature.js
Returns:
An array of objects.
- Type
- Array.<Mapspace.nvdb.ChangeSetRelation>
-
writeRoadConnectionsChangeSet(feature [, opt_origin])
-
Writes the road connections of a feature to a JSON object that follow the NVDB format for sending changes through the Writing (Skriv) Service. This function writes all the road connections, not only the modified ones, and do not use NVDB partial updates format.
Parameters:
Name Type Argument Description featureol.Feature The feature created or modified.
opt_originol.Feature <optional>
An optional original feature.
- Source:
- mapspace-nvdb/format/jsonfeature.js
Returns:
An array of objects.
- Type
- Array.<Mapspace.nvdb.ChangeSetRoadConnection>