SQL Extensions
HEAVY.AI implements a number of custom extension functions to SQL.
Rendering
The following table describes SQL extensions available for the HEAVY.AI implementation of Vega.
SQL SELECT
| Function | Arguments and Return |
|---|---|
convert_meters_to_merc_pixel_width(meters, lon, lat, min_lon, max_lon, img_width, min_width) | Converts a distance in meters in a longitudinal direction from a latitude/longitude coordinate to a pixel size using mercator projection:
Returns: Floating-point value in pixel units. Can be used for the width of a symbol or a point in Vega. |
convert_meters_to_merc_pixel_height(meters, lon, lat, min_lat, max_lat, img_height, min_height) | Converts a distance in meters in a latitudinal direction from a latitude/longitude coordinate to a pixel size, using mercator projection:
Returns: Floating-point value in pixel units. Can be used for the height of a symbol or a point in Vega. |
convert_meters_to_pixel_width(meters, pt, min_lon, max_lon, img_width, min_width) | Converts a distance in meters in a longitudinal direction from a latitude/longitude POINT to a pixel size. Supports only mercator-projected points.
Returns: Floating-point value in pixel units. Can be used for the width of a symbol or a point in Vega. |
convert_meters_to_pixel_height(meters, pt, min_lat, max_lat, img_height, min_height) | Converts a distance in meters in a latitudinal direction from an EPSG:4326 POINT to a pixel size. Currently only supports mercator-projected points:
Returns: Floating-point value in pixel units. Can be used for the height of a symbol or a point in Vega. |
is_point_in_merc_view(lon, lat, min_lon, max_lon, min_lat, max_lat) | Returns true if a latitude/longitude coordinate is within a mercator-projected view defined by
Returns:True if the point is within the view defined by the |
is_point_size_in_merc_view(lon, lat, meters, min_lon, max_lon, min_lat, max_lat) | Returns true if a latitude/longitude coordinate, offset by a distance in meters, is within a mercator-projected view defined by
Returns: True if the point is within the view defined by the |
is_point_in_view(pt, min_lon, max_lon, min_lat, max_lat) | Returns true if a latitude/longitude POINT defined in EPSG:4326 is within a mercator-projected view defined by
Returns: True if the point is within the view defined by |
is_point_size_in_view(pt, meters, min_lon, max_lon, min_lat, max_lat) | Returns true if a latitude/longitude POINT defined in EPSG:4326 is within a mercator-projected view defined by
Returns: True if a latitude/longitude POINT defined in EPSG:4326, offset by a distance in meters, is within the view defined by |