Object Types
All object types except for XYZ Tiles and QuadKeys can be stored in a collection. XYZ Tiles and QuadKeys are reserved for the SEARCH keyword only.
Lat/lon Point
The most basic object type is a point that is composed of a latitude and a longitude. There is an optional z
member that may be used for auxiliary data such as elevation or a timestamp.
SET fleet truck1 POINT 33.5123 -112.2693 # plain lat/lon
SET fleet truck1 POINT 33.5123 -112.2693 225 # lat/lon with z member
Bounding Box
A bounding box consists of two points. The first being the southwestern most point and the second is the northeastern most point.
SET fleet truck1 BOUNDS 30 -110 40 -100
Geohash
A geohash is a string representation of a point. With the length of the string indicating the precision of the point.
SET fleet truck1 HASH 9tbnthxzr # this would be equivlent to 'POINT 33.5123 -112.2693'
GeoJSON
GeoJSON is an industry standard format for representing a variety of object types including a point, multipoint, linestring, multilinestring, polygon, multipolygon, geometrycollection, feature, and featurecollection. Tile38 supports all of the standards with these exceptions.
- The
crs
member is not supported and will be ignored. The CRS84/WGS84 projection is assumed. - Any member that is not recognized (including
crs
) will be ignored. - All coordinates can be 2 or 3 axes. Less than 2 axes or more than 3 will result in a parsing error.
* All ignored members will not persist.
Important to note that all GeoJSON coordinates are in Longitude, Latitude order.
SET city tempe OBJECT '{"type":"Polygon","coordinates":[[[-111.9787,33.4411],[-111.8902,33.4377],[-111.8950,33.2892],[-111.9739,33.2932],[-111.9787,33.4411]]]}'
XYZ Tile
An XYZ tile is rectangle bounding area on earth that is represented by an X, Y coordinate and a Z (zoom) level. Check out maptiler.org for an interactive example.
QuadKey
A QuadKey used the same coordinate system as an XYZ tile except that the string representation is a string characters composed of 0, 1, 2, or 3. For a detailed explanation checkout The Bing Maps Tile System.
Sector
A circular sector polygon feature spanning the angle between two given bearings, a center point and a radius. A 0 degree bearing describes the geographic north.
WITHIN fleet SECTOR 33.5123 -112.2693 1000 0 90 # lat, lon, meters, bearing1 bearing2
This would return all objects in the fleet collection between a 0 degree and 90 degree angle from the origin point in the given radius in meters.