# Geocode

> X marks the spot.

Page: https://docs.icepack.ai/ivr/geocode/

## Overview

The term geocode is used to describe a pair of coordinates. In general, we mostly handle routing requests which are on the face of planet earth so we've biased the terminology used here in that direction. We only support a handful of surface types at the moment.

1. Road network
2. Oblate spheroid (Haversine distance for routing)
3. Planar (straight line)
4. User-defined (by providing a complete matrix)

We still use the term geocode to describe the point-pairs in these contexts, but don't do the validity checks when the points aren't marked as being on the face of planet earth. We also do some checks around the values provided. We require that for geocodes to be valid, they should **not** be located at (0,0). The reason for this is that that location is in the ocean, and is typically an indication that a blank, or null value, has been served up as the longitude and latitude.

### Applicable models
* IVR7 `ivr7-kt461v8eoaif`
* IVR8 `ivr8-yni1c9k2swof`

<hr>

## Geocode
Either a longitude/latitude pair for routing on the face of planet earth (either road network or Haversine) or a point pair (for planar or user-defined matrices).

### Schema definition 

```protobuf
message Geocode {
  required float longitude = 1;   // X
  required float latitude = 2;    // Y
}
```


The longitude and latitude values should be provided in decimal degrees. The longitude corresponds to the x-axis and the latitude to the y-axis in planar or user-defined surfaces.

### Fields

longitude
: The horizontal decimal degrees (or x coordinate)

latitude
: The vertical decimal degrees (or y coordinate)

For earth-routing the longitude should be in the interval [-180,180] and the latitude [-90,90] excluding (0,0). No validation checks are applied to planar or user-defined surfaces.

### Examples

```protobuf
geocode {
  longitude: -6.28681087
  latitude: 53.3416138
}
```



<hr>

