# Geospatial Components

The core module relies on the following basic geospatial concepts:

• Geocoordinates are WGS-84 coordinates expressed in decimal degrees and, latitude and longitude pairs, in this order. Valid values are between -90 and 90, and -180 and 180.

• A line string is an ordered sequence of geocoordinates (a polygonal chain) that you can use, for example, to represent the shape of a road segment.

• The Location Library uses a fraction to represent the position of a point M on a line string starting at a point P. The fraction is the ratio of the length of the partial line string PM to the length of the full line string.

In the example below, the total length of the line string is 400 (100 + 75 + 50 + 75 + 100), the length of the partial line string PM is 205 (100 + 75 + 30). So the fraction representing the position of M on the line string is 0.5125 (205 / 400).

Figure: The fraction representing the position of M on the line string is 0.5125

### Note

The Location Library uses fractions to specify sections of a line string on which a property applies. For more information, see RangeBasedPropertyMap.

• A bounding box in the Location Library is defined using geocoordinates.

• Coordinates are (projected) two-dimensional Cartesian coordinates. You can use coordinates to simplify distance calculations. As a consequence, many components of the Location Library, including proximity search and map matching, use coordinates internally.

• A geo-projection (map projection) is a transformation from geocoordinates to coordinates. The GeoProjection interface allows you to specify the desired projection. Currently, the Location Library provides one fast and reasonably accurate geographical projection, the sinusoidal projection that returns a locally flattened approximation of the Earth's surface around the provided center. This approximation has an error that is less than 1% for distances up to 10 km when the latitude is between +85 and -85 degrees.

### Note

Geo-projection introduces distance and angle distortions, which can limit the accuracy of calculations using it. To ensure precision, do not use coordinates that are too close to the poles or too far away from each other.