GeoPoint
Represents a geographical coordinate. Precision is up to 7 digits (~11 =mm / 0.43 inch).
- Kotlin Definition:
GeoPointDefinition - Kotlin Value:
GeoPoint - Maryk Yaml Definition:
GeoPoint
Usage options
Section titled “Usage options”- Value
- Map key or value
- Inside List/Set
Validation Options
Section titled “Validation Options”required- default truefinal- default false
Other options
Section titled “Other options”default- the default value to be used if value was not set.
Examples
Section titled “Examples”Example of a GeoPoint property definition for use within a Model
val location by geoPoint( index = 1u, required = true, final = true, default = GeoPoint(52.0906448, 5.1212607))Example of a separate Enum property definition
val def = GeoPointDefinition( required = true, final = true, default = GeoPoint(52.0906448, 5.1212607))Storage Byte representation
Section titled “Storage Byte representation”The values are encoded as 2 integers in full format each taking 4 bytes for a total of 8 bytes. The integer is calculated by multiplying the latitude/longitude by 10000000 and is rounded so it is accurate to 7 digits.
Transport Byte representation
Section titled “Transport Byte representation”The latitude and longitude value are combined into one Long by bitshifting the latitude as int
in the front of the long and the longitude in the back. This is encoded as a little endian
encoded long compatible with fixed64 encoding in ProtoBuf.
String representation
Section titled “String representation”The two doubles separated by a comma: 52.0906448,5.1212607