Special fields (purpose)

The GeoSpock database is optimized for event and location based datasets. For best performance, it is important that events and locations are fully defined. This requires some fields to be annotated with a purpose, to indicate how the data in the field should be optimized to provide high performance querying. You should include purpose for the following fields:

Field Description Source format purpose key pair

Example

latitude

The latitude for the event or location

This is restricted to sqlType REAL or DOUBLE

Latitude source data must be specified in its decimal form (eg. -30.5) and each value will be validated based on the min/max range of latitude and longitude (ie. -90⇔+90 for latitude, -180⇔+180 for longitude)

purpose: "LATITUDE"
{
    “id”: “event_latitude”,
    “sourceFieldName”: “lat1”,
    “purpose”: “LATITUDE”,
    “sqlType”: “DOUBLE”
}
longitude

The longitude for the event or location

This is restricted to sqlType REAL or DOUBLE

Longitude source data must be specified in its decimal form (eg. -30.5) and each value will be validated based on the min/max range of latitude and longitude (ie. -90⇔+90 for latitude, -180⇔+180 for longitude)

 

purpose: "LONGITUDE"
{
    “id”: “event_latitude”,
    “sourceFieldName”: “lat1”,
    “purpose”: “LATITUDE”,
    “sqlType”: “DOUBLE”
}
source ID The ID of the device or individual that associated with the event or location

Source ID fields can be specified in either a textual or integer form, by specifying either a textual or integer sqlType: VARCHAR, TINYINT, SMALLINT, INTEGER, BIGINT.

Validation on Source ID fields will be the same as that for either Integer or Text fields (depending on which is chosen)

 

purpose: "SOURCE_ID"
{
“id”: “device_id”,
“sourceFieldName”: “guid”,
“purpose”: “SOURCE_ID”,
“sqlType”: “SMALLINT”
}