Data quality — Part 118: Application of ISO 8000-115 to natural location identifiers

This document specifies requirements for natural location identifiers. These requirements supplement those of ISO 8000-115. The following are within the scope of this document: — requirements for the prefix element and a single sub-domain element in a location identifier; — requirements for representing latitude, longitude and storey or elevation of a location. The following are outside the scope of this document: — methods to identify latitude, longitude and elevation.

Qualité des données — Partie 118: Titre manque

General Information

Status
Published
Publication Date
10-Mar-2025
Current Stage
6060 - International Standard published
Start Date
11-Mar-2025
Due Date
17-Nov-2025
Completion Date
11-Mar-2025
Ref Project
Standard
ISO 8000-118:2025 - Data quality — Part 118: Application of ISO 8000-115 to natural location identifiers Released:11. 03. 2025
English language
29 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)


International
Standard
ISO 8000-118
First edition
Data quality —
2025-03
Part 118:
Application of ISO 8000-115 to
natural location identifiers
Reference number
© ISO 2025
All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may
be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on
the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below
or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii
Contents Page
Foreword .iv
Introduction .v
0.1 Foundations of the ISO 8000 series .v
0.2 Understanding more about the ISO 8000 series .vi
0.3 Role of this document .vi
0.4 Benefits of the ISO 8000 series . vii
1 Scope . 1
2 Normative references . 1
3 Terms and definitions . 1
4 Fundamental principles and assumptions . 1
4.1 Types of identifiers .1
4.1.1 General .1
4.1.2 Controlled identifiers .2
4.1.3 Natural identifiers . .2
4.2 Ownership and usability of identifiers .2
4.3 Geographic location identifiers .2
5 Natural location identifier representation . 3
5.1 General .3
5.2 Representation .3
5.3 Algorithms . .3
5.3.1 General .3
5.3.2 Identifier(latitude, longitude, elevation, elevationType) .4
5.3.3 EncodePoint(latitude, longitude).5
5.3.4 EncodeLatitude(latitude) .5
5.3.5 EncodeLongitude(longitude).6
5.3.6 EncodeElevation(elevation, elevationType) .6
5.3.7 EncodeStorey(storey) .7
5.3.8 EncodeGroundLevel(elevation) .8
5.3.9 EncodeDecimal(decimalPortion) .8
6 Supporting algorithms . 9
6.1 Common algorithms .9
6.2 Numeric encoding algorithms .9
6.2.1 General .9
6.2.2 Elimination of visually ambiguous encoding characters .9
6.2.3 EncodeBase14(number) .10
6.2.4 EncodeBase19(number) .10
6.2.5 EncodeBase32(number) .11
6.2.6 EncodeStoreyBase34(number) . 12
6.2.7 EncodeGroundBase34(number) .14
6.2.8 EncodeBaseGeneral(number, base, digits, table) .14
7 Requirements for natural location identifiers . 14
8 Conformance .15
Annex A (informative) Document identification .16
Annex B (informative) Encoding tables . 17
Annex C (informative) Example .25
Annex D (informative) Algorithms for representing natural location identifiers .26
Annex E (informative) Computer interpretable listings .28
Bibliography .29

iii
Foreword
ISO (the International Organization for Standardization) is a worldwide federation of national standards
bodies (ISO member bodies). The work of preparing International Standards is normally carried out through
ISO technical committees. Each member body interested in a subject for which a technical committee
has been established has the right to be represented on that committee. International organizations,
governmental and non-governmental, in liaison with ISO, also take part in the work. ISO collaborates closely
with the International Electrotechnical Commission (IEC) on all matters of electrotechnical standardization.
The procedures used to develop this document and those intended for its further maintenance are described
in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the different types
of ISO document should be noted. This document was drafted in accordance with the editorial rules of the
ISO/IEC Directives, Part 2 (see www.iso.org/directives).
ISO draws attention to the possibility that the implementation of this document may involve the use of (a)
patent(s). ISO takes no position concerning the evidence, validity or applicability of any claimed patent
rights in respect thereof. As of the date of publication of this document, ISO had not received notice of (a)
patent(s) which may be required to implement this document. However, implementers are cautioned that
this may not represent the latest information, which may be obtained from the patent database available at
www.iso.org/patents. ISO shall not be held responsible for identifying any or all such patent rights.
Any trade name used in this document is information given for the convenience of users and does not
constitute an endorsement.
For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions
related to conformity assessment, as well as information about ISO’s adherence to the World Trade
Organization (WTO) principles in the Technical Barriers to Trade (TBT), see www.iso.org/iso/foreword.html.
This document was prepared by Technical Committee ISO/TC 184, Automation systems and integration,
Subcommittee SC 4, Industrial data.
A list of all parts in the ISO 8000 series can be found on the ISO website.
Any feedback or questions on this document should be directed to the user’s national standards body. A
complete listing of these bodies can be found at www.iso.org/members.html.

iv
Introduction
0.1 Foundations of the ISO 8000 series
Digital data deliver value by enhancing all aspects of organizational performance including:
— operational effectiveness and efficiency;
— safety and security;
— reputation with customers and the wider public;
— compliance with statutory regulations;
— innovation;
— consumer costs, revenues and stock prices.
In addition, many organizations are now addressing these considerations with reference to the United
1)
Nations Sustainable Development Goals .
2)
The influence on performance originates from data being the formalized representation of information .
This information enables organizations to make reliable decisions. This decision making can be performed
by human beings directly and also by automated data processing including artificial intelligence systems.
Through widespread adoption of digital computing and associated communication technologies,
organizations become dependent on digital data. This dependency amplifies the negative consequences of
lack of quality in these data. These consequences are the decrease of organizational performance.
The biggest impact of digital data comes from two key factors:
— the data having a structure that reflects the nature of the subject matter;
EXAMPLE 1 A research scientist writes a report using a software application for word processing. This report
includes a table that uses a clear, logical layout to show results from an experiment. These results indicate how
material properties vary with temperature. The report is read by a designer, who uses the results to create a
product that works in a range of different operating temperatures.
— the data being computer processable (machine readable) rather than just being for a person to read and
understand.
EXAMPLE 2 A research scientist uses a database system to store the results of experiments on a material.
This system controls the format of different values in the data set. The system generates an output file of
digital data. This file is processed by a software application for engineering analysis. The application
determines the optimum geometry when using the material to make a product.
[2]
ISO 9000 explains that quality is not an abstract concept of absolute perfection. Quality is actually the
conformance of characteristics to requirements. This conformance means that any item of data can be of high
quality for one purpose but not for a different purpose. The quality is different because the requirements are
different between the two purposes.
EXAMPLE 3 Time data are processed by calendar applications and also by control systems for propulsion units
on spacecraft. These data include start times for meetings in a calendar application and activation times in a control
system. These start times require less precision than the activation times.
1) https://sdgs.un.org/goals
[1]
2) ISO 8000-2 defines information as “knowledge concerning objects, such as facts, events, things, processes, or
ideas, including concepts, that within a certain context has a particular meaning”.

v
The nature of digital data is fundamental to establishing requirements that are relevant to the specific
decisions that are made by each organization.
[3]
EXAMPLE 4 ISO 8000-1 identifies that data have syntactic (format), semantic (meaning) and pragmatic
(usefulness) characteristics.
To support the delivery of high-quality data, the ISO 8000 series addresses:
— data governance, data quality management and maturity assessment;
[4]
EXAMPLE 5 ISO 8000-61 specifies a process reference model for data quality management.
— creating and applying requirements for data and information;
[5]
EXAMPLE 6 ISO 8000-110 specifies how to exchange characteristic data that are master data.
— monitoring and measuring information and data quality;
[6]
EXAMPLE 7 ISO 8000-8 specifies approaches to measuring information and data quality.
— improving data and, consequently, information quality;
[7]
EXAMPLE 8 ISO/TS 8000-81 specifies an approach to data profiling, which identifies opportunities to improve
data quality.
— issues that are specific to the type of content in a data set.
[8]
EXAMPLE 9 ISO/TS 8000-311 specifies how to address quality considerations for product shape data.
Data quality management covers all aspects of data processing, including creating, collecting, storing,
maintaining, transferring, exploiting and presenting data to deliver information.
Effective data quality management is systemic and systematic, requiring an understanding of the root causes
of data quality issues. This understanding is the basis for not just correcting existing nonconformities but
for also implementing solutions that prevent future reoccurrence of those nonconformities.
EXAMPLE 10 If a data set includes dates in multiple formats including “yyyy-mm-dd”, “mm-dd-yy” and “dd-mm-yy”,
then data cleansing can correct the consistency of the values. Such cleansing requires additional information, however,
to resolve ambiguous entries (such as, “04-05-20”, which can be a representation of many different dates including 4
May 2020, 5 April 2020 and 20 May 2004). The cleansing also cannot address any process issues and people issues,
including training, that have caused the inconsistency.
0.2 Understanding more about the ISO 8000 series
[3]
ISO 8000-1 provides a detailed explanation of the structure and scope of the whole ISO 8000 series.
[1]3)
ISO 8000-2 specifies the single, common vocabulary for the ISO 8000 series. This vocabulary is ideal
[1]
reading material by which to understand the overall subject matter of data quality. ISO 8000-2 presents
the vocabulary structured by a series of topic areas (for example, terms relating to quality and terms relating
to data and information).
[3] [1] [6] 4)
ISO has identified ISO 8000-1 , ISO 8000-2 and ISO 8000-8 as horizontal deliverables .
0.3 Role of this document
As a contribution to the overall capability of the ISO 8000 series, this document specifies how to generate an
unambiguous natural location identifier.
Organizations can use this document on its own or in conjunction with other parts of the ISO 8000 series.
3) The content is available on the ISO Online Browsing Platform: https://www.iso.org/obp
4) Deliverable dealing with a subject relevant to a number of committees or sectors or of crucial importance to ensure
coherence across standardization deliverables.

vi
This document supports activities that affect:
— one or more information systems;
— data flows within the organization and with external organizations;
— any phase of the data life cycle.
[9]
Annex A contains an identifier that conforms to ISO/IEC 8824-1 . The identifier unambiguously identifies
this document in an open information system.
0.4 Benefits of the ISO 8000 series
By implementing parts of the ISO 8000 series to improve organizational performance, an organization
achieves the following benefits:
— objective validation of the foundations for digital transformation of the organization;
— a sustainable basis for data in digital form becoming a fundamental asset class that the organization
relies on to deliver value;
— securing evidence-based trust from other parties (including supply chain partners and regulators) about
the repeatability and reliability of data and information processing in the organization;
— portability of data with resulting protection against loss of intellectual property and re-usability across
the organization and applications;
— effective and efficient interoperability between all parties in a supply chain to achieve traceability of
data back to original sources;
— readiness to acquire or supply services where the other party expects to work with common understanding
of explicit data requirements.

vii
International Standard ISO 8000-118:2025(en)
Data quality —
Part 118:
Application of ISO 8000-115 to natural location identifiers
1 Scope
This document specifies requirements for natural location identifiers. These requirements supplement
[10]
those of ISO 8000-115 .
The following are within the scope of this document:
— requirements for the prefix element and a single sub-domain element in a location identifier;
— requirements for representing latitude, longitude and storey or elevation of a location.
The following are outside the scope of this document:
— methods to identify latitude, longitude and elevation.
2 Normative references
The following documents are referred to in the text in such a way that some or all of their content constitutes
requirements of this document. For dated references, only the edition cited applies. For undated references,
the latest edition of the referenced document (including any amendments) applies.
ISO 8000-2, Data quality — Part 2: Vocabulary
ISO 8000-115, Data quality — Part 115: Master data: Exchange of quality identifiers: Syntactic, semantic and
resolution requirements
3 Terms and definitions
For the purposes of this document, the terms and definitions given in ISO 8000-2 apply.
ISO and IEC maintain terminological databases for use in standardization at the following addresses:
— ISO Online browsing platform: available at https:// www .iso .org/ obp
— IEC Electropedia: available at https:// www .electropedia .org/
4 Fundamental principles and assumptions
4.1 Types of identifiers
4.1.1 General
Organizations issue identifiers for many purposes. Identifiers are one of two types:
a) controlled identifiers (see 4.1.2);
b) natural identifiers (see 4.1.3).

4.1.2 Controlled identifiers
Controlled identifiers are issued by an organization that maintains the characteristic data associated with
the identifier. These identifiers are, therefore, managed by the organization, which is also responsible for
maintaining an identifier registry.
EXAMPLE 1 Controlled identifiers include part numbers, batch numbers and serial numbers, each of which are
issued by manufacturers.
EXAMPLE 2 Controlled identifiers include personal identifiers issued by governments, universities and companies.
Each controlled identifier depends on completion of a master data record containing characteristic data
to differentiate the identified item within a particular domain. This dependence means resolution of the
identifier requires access to the underlying master data that are controlled by the issuing organization.
A controlled identifier is created by, and therefore belongs to, the issuing organization.
4.1.3 Natural identifiers
A natural identifier derives from the characteristics of the identified item, where those characteristics make
the item unique within a particular domain. The identifier can be created by applying an algorithm to the
characteristics of the item.
EXAMPLE 1 Natural identifiers include life science identifiers, which are persistent, globally unique identifiers for
biological objects.
EXAMPLE 2 Natural identifiers include those generated by cryptographic hash functions (to create document and
virus signatures) and cyclic redundancy check digits (error-detecting codes to highlight changes to raw data in data
transfers).
As a natural identifier derives from accessible information, the identifier is not subject to the control of one
owning organization.
4.2 Ownership and usability of identifiers
Controlled identifiers belong to the issuing organization.
Unless the controlled identifier is in the public domain, data containing controlled identifiers can end up
becoming a joint work under copyright law.
The issuing organization for a controlled identifier can, for instance, restrict use of the identifier only to
retrieve licensed content provided by the issuer of the identifier.
For natural identifiers, if the algorithm used to generate it is proprietary, then the resulting identifier is
proprietary. In this case, both the use of the algorithm and the resulting identifier will be subject to license.
If the natural identifier uses an algorithm that is in the public domain, published as an open standard or
can be used without license, then the resulting identifier is a public or open identifier that is usable without
license.
4.3 Geographic location identifiers
A geographic location identifier represents the identity of a geographical point location.
In order to identify a geographic point location on Earth, a unique, natural identifier can be generated from
the corresponding coordinate of the location within a geodetic coordinate reference system.

Geographic location identifiers are bound to a particular geodetic coordinate reference system as a datum
(which is also known as a “reference frame”).
NOTE There are multiple realizations of geodetic datums. These realizations include the series of the World
[11] [12]
Geodetic System (WGS) , which is used by the Global Positioning System (GPS) , the International Terrestrial
[13]
Reference Frame (ITRF), which is a precise scientific realization ; and the European Terrestrial Reference Frame
[14]
(ETRF), which is the EU-recommended reference frame .
Clients of global navigation satellite systems have become pervasive, not only in mapping devices and
surveying equipment but also in mobile phones and Internet-of-Things devices. These clients can easily
calculate geographic location identifiers on demand by using a simple, open algorithm.
5 Natural location identifier representation
5.1 General
The natural location identifier is a geographic location identifier that provides a unique identifier for a
geographic point location in three dimensions.
The natural location identifier is a natural identifier because the identifier is generated from intrinsic
characteristics of a geographic point location. These characteristics are the coordinates of the location
within a geodetic coordinate system. The characteristics are not assigned by an individual person or an
organization.
In practice, the natural location identifier provides a lossless conversion of the coordinates for a geographic
point location, allowing the translation of the identifier to the original coordinates within the chosen
geodetic coordinate system and corresponding reference frame.
5.2 Representation
This document uses the following characteristics as the basis for the natural location identifier:
[11]
— the coordinates (latitude and longitude) of the location according to the World Geodetic System 1984 ;
— elevation coordinates, in the form of either ground-level distance or a storey identifier.
A natural location identifier consists of the following elements:
— a prefix element as the string “ISO”;
— a sub-domain element as the string “.NLI”;
— an identifier element consisting of the character “:” followed by the encoding of the coordinates and
elevation using the algorithms specified by 5.3 and Clause 6.
[10]
NOTE 1 The identifier conforms to requirements of ISO 8000-115 by consisting of a prefix element, an optional
sub-domain element and an identifier element.
For an example of the encoding and representation of a natural location identifier described in this document,
see Annex C.
NOTE 2 Data tables used for encoding values of the natural location identifier provided in Annex B are provided in
the public domain and not subject to copyright (see Annex E).
5.3 Algorithms
5.3.1 General
A core set of algorithms enable generation of a natural location identifier (see Table 5-1).

Table 5-1 — Necessary algorithms to generate natural location identifiers
Algorithm Description
Generates the natural location identifier from a geo-
Identifier(latitude, longitude, elevation, elevationType)
graphic point location representation (see 5.3.2)
Encodes a geographic point location of a geodetic coor-
EncodePoint(latitude, longitude) dinate reference system into a string of characters (see
5.3.3)
Encodes the latitude of a geographic point location of
EncodeLatitude(latitude) a geodetic coordinate reference system into a string of
characters (see 5.3.4)
Encodes the longitude of a geographic point location of
EncodeLongitude(longitude) a geodetic coordinate reference system into a string of
characters (see 5.3.5)
Encodes an elevation coordinate of a discrete elevation
EncodeElevation(elevation, elevationType)
reference system into a string of characters (see 5.3.6)
Encodes the storey identifier into a string of characters
EncodeStorey(elevation)
(see 5.3.7)
Encodes the ground-level distance into a string of charac-
EncodeGroundLevel(elevation)
ters (see 5.3.8)
Encodes the decimal portion of a decimal number into a
EncodeDecimal(decimalPortion)
string of characters (see 5.3.9)
NOTE See Annex D for a list and a diagram showing the dependencies for all the algorithms specified by this document.
5.3.2 Identifier(latitude, longitude, elevation, elevationType)
This algorithm generates the natural location identifier from a geographic point location representation (see
Table 5-2). The natural location identifier is output as a string.
Table 5-2 — Inputs to the algorithm Identifier
Input Description
latitude Number from –90 to +90, in decimal form, representing
an angular degree, with a maximum of six decimal places
longitude Number from –180 to +180, in decimal form, representing
an angular degree, with a maximum of six decimal places
elevation Storey identifier or ground-level distance
elevationType The elevation type as either the string “storey” or
“ground”
The method for this algorithm consists of the following steps:
a) add the string “ISO.NLI:” at the start of the identifier;
b) encode the geographic point location using the EncodePoint algorithm;
c) encode the elevation using the EncodeElevation algorithm;
d) concatenate the string “ISO.NLI:” with the encoded strings for the geographic point location and the
elevation.
The pseudocode for the algorithm Identifier is as follows (where symbols have the meaning specified by
[15]
ECMA-262 ):
Identifier(latitude, longitude, elevation, elevationType)
return CONCAT(
"ISO.NLI:",
EncodePoint(latitude, longitude),

EncodeElevation(elevation, elevationType)
)
5.3.3 EncodePoint(latitude, longitude)
This algorithm encodes a geographic point location according to a geodetic coordinate reference system into
a string of characters (see Table 5-3). The string is the output of the algorithm. This algorithm is called by
the algorithm Identifier (see 5.3.2) for the purpose of encoding a natural location identifier.
Table 5-3 — Inputs to the algorithm EncodePoint
Input Description
latitude Number from –90 to +90, in decimal form, representing
an angular degree, with a maximum of six decimal places
longitude Number from –180 to +180, in decimal form, representing
an angular degree, with a maximum of six decimal places
The method for this algorithm consists of the following steps:
a) encode latitude using the EncodeLatitude algorithm;
b) encode longitude using the EncodeLongitude algorithm;
c) concatenate the encoded strings of latitude and longitude.
The pseudocode for the EncodePoint algorithm is as follows (where symbols have the meaning specified by
[15]
ECMA-262 ):
EncodePoint(latitude, longitude)return
CONCAT(EncodeLatitude(latitude),EncodeLongitude(longitude))
5.3.4 EncodeLatitude(latitude)
This algorithm encodes the latitude of a geographic point location according to a geodetic coordinate
reference system into a string of characters (see Table 5-4). The string is the output of the algorithm. This
algorithm is called by the algorithm EncodePoint (see 5.3.3) for the purpose of encoding a geographic point
location.
Table 5-4 — Inputs to the algorithm EncodeLatitude
Input Description
latitude Number from –90 to +90, in decimal form, representing
an angular degree, with a maximum of six decimal places
The method for this algorithm consists of the following steps:
a) normalize the input value by adding 90 to set the midpoint to represent 0 degrees;
b) encode the numeral portion by using the EncodeBase14 algorithm on the numeral portion;
c) encode the decimal portion by using the EncodeDecimal algorithm on the decimal portion;
d) concatenate the encodings of the numeral and decimal portions.
EXAMPLE 1 The latitude encoding for 0 degrees is the string “66”.
EXAMPLE 2 The latitude encoding for –90 is the string “00”; for +90, the string is “CC”.
EXAMPLE 3 The latitude encoding for –79,25 is padded into the string “–079.250000”.
The pseudocode for the algorithm EncodeLatitude is as follows (where symbols have the meaning specified
[15]
by ECMA-262 ):
EncodeLatitude(latitude)if not –90 <= latitude <= 90raise out of bounds errorendifreturn
CONCAT(EncodeLatitudeNumeral(latitude),EncodeDecimal(getDecimal(latitude)))

The pseudocode for the algorithm EncodeLatitudeNumeral is as follows (where symbols have the meaning
[15]
specified by ECMA-262 ):
EncodeLatitudeNumeral(latitude)latitudeNumeral = floor(latitude) + 90return
EncodeBase14(latitudeNumeral)
NOTE See Clause B.2 for the values returned by this algorithm.
5.3.5 EncodeLongitude(longitude)
This algorithm encodes the latitude of a geographic point location according to a geodetic coordinate
reference system into a string of characters (see Table 5-5). The string is the output of the algorithm. This
algorithm is called by the algorithm EncodePoint (see 5.3.3) for the purpose of encoding a geographic point
location.
Table 5-5 — Inputs to the algorithm EncodeLongitude
Input Description
longitude Number from –180 to 180, representing an angular de-
gree, with a maximum of six decimal places
The method for this algorithm consists of the following steps:
a) normalize the value by adding 180 to set the midpoint to represent 0 degrees;
b) encode the numeral portion by using the EncodeBase14 algorithm on the numeral portion;
c) encode the decimal portion by using the EncodeDecimal algorithm on the decimal portion;
d) concatenate the encodings of the numeral and decimal portions.
EXAMPLE 1 The latitude encoding for 0 degrees is the string “99”.
EXAMPLE 2 The latitude encoding for –180 is the string “00”; for +180, the string is “YY”.
The pseudocode for the algorithm EncodeLongitude is (where symbols have the meaning specified by ECMA-
[15]
262 ):
EncodeLongitude(longitude)if not −180 <= latitude <= 180raise out of bounds errorendifreturn
CONCAT(encodeLongitudeNumeral(longitude),EncodeDecimal(getDecimal(longitude)))
The pseudocode for the algorithm EncodeLongitudeNumeral is (where symbols have the meaning specified
[15]
by ECMA-262 ):
EncodeLongitudeNumeral(longitude)longitudeNumeral = floor(longitude) + 180return
EncodeBase19(longitudeNumeral)
NOTE See Clause B.3 for the values returned by this algorithm.
5.3.6 EncodeElevation(elevation, elevationType)
This algorithm encodes an elevation coordinate according to a discrete elevation reference system into a
string of characters (see Table 5-5). The string is the output of the algorithm. This algorithm is called by the
algorithm Identifier (see 5.3.2) for the purpose of encoding a natural location identifier.
Table 5-6 — Inputs to the algorithm EncodeElevation
Input Description
elevation Storey identifier or ground-level distance
elevationType Indicates the elevation type as either the string “storey”
or “ground”
The method for this algorithm consists of the following steps:
a) if the elevation type is “storey”, then the elevation value is a storey identifier and returns the results of
the EncodeStorey algorithm;
b) if the elevation type is “ground”, then the elevation value indicates ground-level distance and returns
the results of the EncodeGroundLevel algorithm.
The pseudocode for the algorithm EncodeElevation is as follows (where symbols have the meaning specified
[15]
by ECMA-262 ):
EncodeElevation(elevation, elevationType)if elevationType = "storey" thenreturn
EncodeStorey(elevation)elsif elevationType = "ground" thenreturn EncodeGroundLevel(elevation)
elseraise unknown elevation type errorendif
NOTE While decoding an natural location identifier, if the number of characters is 14, then the elevation portion
represents storey information. If the number of characters is 15, then the elevation portion represents ground-level
distance information.
5.3.7 EncodeStorey(storey)
This algorithm encodes the storey identifier into a string of characters (see Table 5-7). The string is the
output of the algorithm. This algorithm is called by the algorithm EncodeElevation (see 5.3.6) for the
purpose of encoding an elevation that is represented by a storey identifier.
Table 5-7 — Inputs to the algorithm EncodeStorey
Input Description
storey Identifier of the storey as an integer between –578 and
+577
The storey identifier:
— has either a plus or minus sign;
— has a value range of –578 to +577;
— represents a ground floor as “0”;
— represents floors above the ground floor using positive numbers;
— represents floors below the ground floor using negative numbers.
The method for this algorithm consists of the following steps:
a) normalize the input by adding 578 to set the midpoint as representing the ground storey;
b) encode the storey identifier using the EncodeBase34 algorithm;
c) return the encoded storey identifier.
EXAMPLE 1 The storey encoding for the ground floor is the string “H0”.
EXAMPLE 2 The storey encoding for the fifth floor is the string “H5”.
EXAMPLE 3 The storey encoding for the second storey below the ground floor is the string “GW”.
The pseudocode for the algorithm EncodeStorey is as follows (where symbols have the meaning specified by
[15]
ECMA-262 ):
EncodeStorey(storey)if not −578 =< storey <= 577raise out of bounds errorendifstorey = storey
+ 578return EncodeBase34(storey)

5.3.8 EncodeGroundLevel(elevation)
This algorithm encodes the ground-level distance into a string of characters (see Table 5-8). The string is
the output of the algorithm. This algorithm is called by the algorithm EncodeElevation (see 5.3.6) for the
purpose of encoding an elevation that is represented by a ground-level distance.
Table 5-8 — Inputs to the algorithm EncodeGroundLevel
Input Description
groundLevel Ground-level distance as an integer between –1 000 and
+1 000
The ground-level distance is the rounded distance in metres from ground level, where:
— distance above ground level is represented by positive numbers;
— distance below ground level is represented by negative numbers;
— ground-level distance is rounded to the nearest metre;
— values beyond –19 651 and +19 651 are rejected (representing 19 651 m below or 19 651 m above
ground level).
Ground level is encoded in base-34 as the midpoint (H00), where the distance is 0 m.
The method for this algorithm consists of the following steps:
a) normalize the input by adding 19 652 , which sets the midpoint to represent the ground level;
b) encode the ground-level distance using the EncodeBase34 algorithm (see 6.2.7);
c) return the encoded storey identifier.
[15]
The pseudocode for the algorithm is (where symbols have the meaning specified by ECMA-262 ):
EncodeGroundLevel(groundLevel)if not −19652 <= groundLevel <= 19651raise out of bounds
errorendifgroundLevel = groundLevel + 19652return EncodeBase34(groundLevel)
NOTE See Clause B.5 for values of this encoding.
5.3.9 EncodeDecimal(decimalPortion)
This algorithm encodes the decimal portion of a decimal number into a string (see Table 5-9). The string
is the output of the algorithm. This algorithm is called by the algorithms EncodeLatitude (see 5.3.4) and
EncodeLongitude (see 5.3.5) for the purpose of encoding the decimal portions of latitude and longitude,
respectively.
Table 5-9 — Inputs to the algorithm EncodeDecimal
Input Description
decimalPortion Decimal portion of a decimal number
The method for this algorithm consists of the following steps:
a) split the decimal portion into groups of three digits;
b) for each digit group, treat the group of digits as a three-digit integer and encode the number using the
EncodeBase32 algorithm, padding the group with one or two “0” characters as suffix to give three digits
if the group does not have sufficient digits;
c) concatenate the encoded strings of the digit groups.
[15]
The pseudocode for the algorithm is (where symbols have the meaning specified by ECMA-262 ):

EncodeDecimal(decimalPortion)encoding = ""do forall digitGroupNumber : ∈ every 3 digits in
decimalPortionencoding += EncodeBase32(digitGroupNumber)enddoreturn encoding
6 Supporting algorithms
6.1 Common algorithms
The base algorithms are:
— “concat(string1, … stringN)”, which combines the input strings into a single string;
— “floor(number)”, which outputs the largest integer less than or equal to the input number;
— “getDecimal(number)”, which outputs (as a number) the decimal portion of the input number.
NOTE The mechanisms of common algorithms are platform-specific and provide trivial functionality. This
document, therefore, does not explicitly specify these algorithms.
6.2 Numeric encoding algorithms
6.2.1 General
The natural location identifier uses numeric encoding to compress the values of the components.
This compression is performed by the following algorithms:
— “EncodeBase14(number)”, which returns a base−14 encoded string of the input number (see 6.2.3);
— “EncodeBase19(number)”, which returns a base−19 encoded string of the input number (see 6.2.4);
— “EncodeBase32(number)”, which returns a base−32 encoded string of the input number (see 6.2.5);
— “EncodeStoreyBase34(number)”, which returns a base−34 encoded string of the input number (see 6.2.6);
— “EncodeGroundBase34(number)”, which returns a base−34 encoded string of the input number (see 5.3.8);
— “EncodeBaseGeneral(number, base, digits, table)”, which returns a base-encoded string of the input
number, using the symbols provided by the table (see 5.3.9).
NOTE The encoding algorithms specified by this document are different from and, therefore, not compatible with
[16]
those specified by RFC 4648 .
6.2.2 Elimination of visually ambiguous encoding characters
In typical base-n encodings intended for machine-readability, such as the base-32 and base-64 encoding
[16]
algorithms in RFC 4648 , the character range of numeric characters “0” to “9” is used together with the
Latin alphabet of “A” to “Z” as encoding characters.
However, in an encoding intended to be visually identified by humans, visually ambiguous encoding
characters can cause misidentification.
In particular, the following character pairs are visually ambiguous:
— the uppercase letter “I” and the numeric character “1”;
— the uppercase letter “O” and the numeric character “0”.
To pre
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.

Loading comments...