Skip to main content
Skip table of contents

dlpx-core:Lat_Long Coordinates

Based >Extensible Algorithm Framework

The Lat_Long Coordinates algorithm is an instance of the Regex Decompose Algorithm Framework.

This algorithm recognizes and masks only the EPSG:4326 coordinate system (WGS84) containing latitude and longitude.

Lat_Long Coordinates algorithm should only be used for string or numeric data types and does not support spatial or geometric column data-types.

The algorithm can mask latitude & longitude individually and also a combination of latitude and longitude in that order separated by delimiters-comma or space. The supported formats are:

Name

Format

Explanation

valid ranges

Valid examples that the algorithm can mask

DD -
Decimal degrees

DD.DDDDDDD°<dir>

DD: Degrees

[-90, +90] for latitude
[-180, +180] for longitude.

41.40338

41.40338°

+39°98212343

-79.945790

89.1424342N

137.234543°E

+39°98212343,-79.945790

DDDDDD: Decimal
degrees

[0000-99999999]

DMM-Degrees, Decimal Minutes

DD°MM.MMMM'<dir>

DD: Degrees

[-90, +90] for latitude
[-180, +180] for longitude.

41 24.2028

2 10.4418

65°24.342N

+84°59.1234'

MM: Minutes

[0, 59]

MMMM': Decimal minutes

[000-9999]

DMS-Degrees Minutes Seconds

DD°MM' SS.SS"<dir>

DD: Degrees

[-90, +90] for latitude
[-180, +180] for longitude.

41°24'12.2"N

41°16'35.8"N

2°10'26"E

173°41′53.88″W

MM': Minutes

[0, 59]

SS: Seconds

[0, 59]

SS”: Decimal Seconds

[0, 99]

<dir> can be one of the four directions - N, S, E & W

The algorithm will preserve the degrees (DD), the prefix direction (+/-), the direction character suffix (N, E, W, S) at the end, and any non-digits (symbols – .,°,,',",). It masks the decimal parts to valid decimals, minutes, and seconds (0-59) to valid minutes and seconds (0-59) respectively.

Valid input masking examples:

  • +41.939390+41.684362

  • 41°24'12.2"N41°16'35.8"N

  • 41°24'12"N 2°10'26"E41°16'35"N 2°50'05"E

  • 41 24.2028, 2 10.441841 16.3542, 2 50.5383

  • 32°00′05″N 173°41′53″W32°15′07″N 173°30′02″W

  • +41.939390+41.684362

Fallback action and non-conforming inputs:

The above coordinate formats of latitude and longitude are one of the most widely adopted coordinate systems. There are several other coordinate formats and spatial systems which can be found online. When the current algorithm is used to mask such coordinates, they are treated as non-conforming inputs as they do not match any of the regex patterns defined in the algorithm. For all such data, a fallback action masks or redacts all the digits of the input value to “0” keeping the format, directions, degrees, minutes, seconds symbols, and any other characters intact. As a result, non-conformant events are not produced for this algorithm.

Non-conforming input masking examples:

  • 41°65'35.8"N00°00'00.0"N

  • 189.98212343°W000.00000000°W

  • ABCxyz391ABCxyz000

To keep the algorithm regexes reasonably simple and readable (which also impacts performance), the outermost values of the allowed latitude and longitude ranges are also masked or redacted to 0.

  • 90°00′00.0″N00°00′00.0″N

  • 180°00′00.00″W000°00′00.00″W

  • -90°00′00.0″-00°00′00.0″

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.