Geospatial data formats
It is important to point out that there are two main geospatial data formats used by geospatial functions in Athena. We’ll dive a bit deeper into the Well-Known Text (WKT) and JSON formats, along with a simple example you can try in your AWS account.
WKT
This common format, defined by the Open Geospatial Consortium (OGC), is universally digestible to represent points, lines, and geometries. Coordinates are listed out individually in plain ASCII text using a standardized format. Points, lines, and polygons can all be represented by providing the coordinates of the points that make up that geometry.
The format is very simple, most easily introduced with the POINT
term:
POINT (-111.5531807 40.6099522)
It should be noted that the latitude value is specified first in the numbered pair. The format for lines is very similar but provides a list of points that comprise the geometry:
LINESTRING (-111.5531807 40.6099522, -111.5506534 40.6139341...