Packages

t

com.databricks.sql

h3Functions

trait h3Functions extends AnyRef

Annotations
@Py4JWhitelist() @Stable()
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. h3Functions
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  9. def h3_boundaryasgeojson(e: Column): Column

    Returns the boundary of an H3 cell in GeoJSON format.

    Returns the boundary of an H3 cell in GeoJSON format.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  10. def h3_boundaryaswkb(e: Column): Column

    Returns the boundary of an H3 cell in WKB format.

    Returns the boundary of an H3 cell in WKB format.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  11. def h3_boundaryaswkt(e: Column): Column

    Returns the boundary of an H3 cell in WKT format.

    Returns the boundary of an H3 cell in WKT format.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  12. def h3_centerasgeojson(e: Column): Column

    Returns the center of an H3 cell in GeoJSON format.

    Returns the center of an H3 cell in GeoJSON format.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  13. def h3_centeraswkb(e: Column): Column

    Returns the center of an H3 cell in WKB format.

    Returns the center of an H3 cell in WKB format.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  14. def h3_centeraswkt(e: Column): Column

    Returns the center of an H3 cell in WKT format.

    Returns the center of an H3 cell in WKT format.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  15. def h3_compact(e: Column): Column

    Compacts the input set of H3 cell IDs as best as possible.

    Compacts the input set of H3 cell IDs as best as possible.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  16. def h3_coverash3(e1: Column, e2: Column): Column

    Returns an array of cell IDs represented as long integers, corresponding to hexagons or pentagons of the specified resolution that minimally cover the input linear or areal geography.

    Returns an array of cell IDs represented as long integers, corresponding to hexagons or pentagons of the specified resolution that minimally cover the input linear or areal geography. The expression emits an error if the input geography type is not supported, or if an error is found when parsing the input representation of the geography. The acceptable input representations are WKT, GeoJSON, and WKB. In the first two cases the input is expected to be of type STRING, whereas in the last case the input is expected to be of type BINARY.

    Annotations
    @Py4JWhitelist()
    Since

    3.4.0

  17. def h3_coverash3string(e1: Column, e2: Column): Column

    Returns an array of cell IDs represented as strings, corresponding to hexagons or pentagons of the specified resolution that minimally cover the input linear or areal geography.

    Returns an array of cell IDs represented as strings, corresponding to hexagons or pentagons of the specified resolution that minimally cover the input linear or areal geography. The expression emits an error if the input geography type is not supported, or if an error is found when parsing the input representation of the geography. The acceptable input representations are WKT, GeoJSON, and WKB. In the first two cases the input is expected to be of type STRING, whereas in the last case the input is expected to be of type BINARY.

    Annotations
    @Py4JWhitelist()
    Since

    3.4.0

  18. def h3_distance(e1: Column, e2: Column): Column

    Returns the grid distance between two H3 cell IDs.

    Returns the grid distance between two H3 cell IDs.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  19. def h3_h3tostring(e: Column): Column

    Converts an H3 cell ID to a string representing the cell ID as a hexadecimal string.

    Converts an H3 cell ID to a string representing the cell ID as a hexadecimal string.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  20. def h3_hexring(e1: Column, e2: Column): Column

    Returns an array of H3 cell IDs that form a hollow hexagonal ring centered at the origin H3 cell and that are at grid distance k from the origin H3 cell.

    Returns an array of H3 cell IDs that form a hollow hexagonal ring centered at the origin H3 cell and that are at grid distance k from the origin H3 cell.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  21. def h3_ischildof(e1: Column, e2: Column): Column

    Returns true if the first H3 cell ID is a child of the second H3 cell ID.

    Returns true if the first H3 cell ID is a child of the second H3 cell ID.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  22. def h3_ispentagon(e: Column): Column

    Returns true if the input H3 cell ID represents a pentagon.

    Returns true if the input H3 cell ID represents a pentagon.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  23. def h3_isvalid(e: Column): Column

    Returns true if the input represents a valid H3 cell ID.

    Returns true if the input represents a valid H3 cell ID.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  24. def h3_kring(e1: Column, e2: Column): Column

    Returns the H3 cell IDs that are within (grid) distance k of the origin cell ID.

    Returns the H3 cell IDs that are within (grid) distance k of the origin cell ID.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  25. def h3_kringdistances(e1: Column, e2: Column): Column

    Returns all H3 cell IDs (represented as long integers or strings) within grid distance k from the origin H3 cell ID, along with their distance from the origin H3 cell ID.

    Returns all H3 cell IDs (represented as long integers or strings) within grid distance k from the origin H3 cell ID, along with their distance from the origin H3 cell ID. More precisely, the result is an array of structs, where each struct contains an H3 cell id (represented as a long integer or string) and its distance from the origin H3 cell ID. The type for the H3 cell IDs in the output is the same as the type of the input H3 cell ID (first argument of the expression).

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  26. def h3_longlatash3(e1: Column, e2: Column, e3: Column): Column

    Returns the H3 cell ID (as a BIGINT) corresponding to the provided longitude and latitude at the specified resolution.

    Returns the H3 cell ID (as a BIGINT) corresponding to the provided longitude and latitude at the specified resolution.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  27. def h3_longlatash3string(e1: Column, e2: Column, e3: Column): Column

    Returns the H3 cell ID (as a STRING) corresponding to the provided longitude and latitude at the specified resolution.

    Returns the H3 cell ID (as a STRING) corresponding to the provided longitude and latitude at the specified resolution.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  28. def h3_maxchild(e1: Column, e2: Column): Column

    Returns the child of maximum value of the input H3 cell at the specified resolution.

    Returns the child of maximum value of the input H3 cell at the specified resolution.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  29. def h3_minchild(e1: Column, e2: Column): Column

    Returns the child of minimum value of the input H3 cell at the specified resolution.

    Returns the child of minimum value of the input H3 cell at the specified resolution.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  30. def h3_pointash3(e1: Column, e2: Column): Column

    Returns the H3 cell ID (as a BIGINT) corresponding to the provided point at the specified resolution.

    Returns the H3 cell ID (as a BIGINT) corresponding to the provided point at the specified resolution. The expression emits an error if the geography is not a point or if an error is found when parsing the input representation of the geography. The acceptable input representations are WKT, GeoJSON, and WKB. In the first two cases the input is expected to be of type STRING, whereas in the last case the input is expected to be of type BINARY.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  31. def h3_pointash3string(e1: Column, e2: Column): Column

    Returns the H3 cell ID (as a STRING) corresponding to the provided point at the specified resolution.

    Returns the H3 cell ID (as a STRING) corresponding to the provided point at the specified resolution. The expression emits an error if the geography is not a point or if an error is found when parsing the input representation of the geography. The acceptable input representations are WKT, GeoJSON, and WKB. In the first two cases the input is expected to be of type STRING, whereas in the last case the input is expected to be of type BINARY.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  32. def h3_polyfillash3(e1: Column, e2: Column): Column

    Returns an array of cell IDs represented as long integers, corresponding to hexagons or pentagons of the specified resolution that are contained by the input areal geography.

    Returns an array of cell IDs represented as long integers, corresponding to hexagons or pentagons of the specified resolution that are contained by the input areal geography. Containment is determined by the cell centroids: a cell is considered to cover the geography if the cell's centroid lies inside the areal geography. The expression emits an error if the geography is not areal (polygon or multipolygon) or if an error is found when parsing the input representation of the geography. The acceptable input representations are WKT, GeoJSON, and WKB. In the first two cases the input is expected to be of type STRING, whereas in the last case the input is expected to be of type BINARY.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  33. def h3_polyfillash3string(e1: Column, e2: Column): Column

    Returns an array of cell IDs represented as strings, corresponding to hexagons or pentagons of the specified resolution that are contained by the input areal geography.

    Returns an array of cell IDs represented as strings, corresponding to hexagons or pentagons of the specified resolution that are contained by the input areal geography. Containment is determined by the cell centroids: a cell is considered to cover the geography if the cell's centroid lies inside the areal geography. The expression emits an error if the geography is not areal (polygon or multipolygon) or if an error is found when parsing the input representation of the geography. The acceptable input representations are WKT, GeoJSON, and WKB. In the first two cases the input is expected to be of type STRING, whereas in the last case the input is expected to be of type BINARY.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  34. def h3_resolution(e: Column): Column

    Returns the resolution of the H3 cell ID.

    Returns the resolution of the H3 cell ID.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  35. def h3_stringtoh3(e: Column): Column

    Converts a string representing an H3 cell ID to the corresponding big integer.

    Converts a string representing an H3 cell ID to the corresponding big integer.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  36. def h3_tessellateaswkb(geo: Column, res: Int): Column
  37. def h3_tessellateaswkb(geo: Column, res: Column): Column

    Returns an array of structs representing the chips covering geography at the specified resolution.

    Returns an array of structs representing the chips covering geography at the specified resolution. More precisely, the elements of the returned array are named structs with three fields names "cellid", "core", and "chip": - The "cellid" field contains one of the H3 cells covering the input geography. - The "core" field determines if the boundary polygon of the H3 cell in the "cellid" field is contained inside the input geography (this can happen only for areal input geographies). If the cell is contained in the input geography the value is set to true, and false otherwise. - The "chip" field is the (Cartesian) intersection of the H3 cell polygon, corresponding to the H3 cell id in the "cellid" field, with the input geography, represented in WKB format. The set of the H3 cells ids returned as the "cellid" elements of the structs in the array is a minimal covering set for the input geography.

    Since

    3.5.0

  38. def h3_tochildren(e1: Column, e2: Column): Column

    Returns the children H3 cell IDs of the input H3 cell ID at the specified resolution.

    Returns the children H3 cell IDs of the input H3 cell ID at the specified resolution.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  39. def h3_toparent(e1: Column, e2: Column): Column

    Returns the parent H3 cell ID of the input H3 cell ID at the specified resolution.

    Returns the parent H3 cell ID of the input H3 cell ID at the specified resolution.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  40. def h3_try_coverash3(e1: Column, e2: Column): Column

    Returns an array of cell IDs represented as long integers, corresponding to hexagons or pentagons of the specified resolution that minimally cover the input linear or areal geography.

    Returns an array of cell IDs represented as long integers, corresponding to hexagons or pentagons of the specified resolution that minimally cover the input linear or areal geography. The expressions value is NULL if the input geography type is not supported or if an error is found when parsing the input representation of the geography. The expression returns an error if the input resolution is invalid. The acceptable input representations are WKT, GeoJSON, and WKB. In the first two cases the input is expected to be of type STRING, whereas in the last case the input is expected to be of type BINARY.

    Annotations
    @Py4JWhitelist()
    Since

    3.5.0

  41. def h3_try_coverash3string(e1: Column, e2: Column): Column

    Returns an array of cell IDs represented as strings, corresponding to hexagons or pentagons of the specified resolution that minimally cover the input linear or areal geography.

    Returns an array of cell IDs represented as strings, corresponding to hexagons or pentagons of the specified resolution that minimally cover the input linear or areal geography. The expression value is NULL if the input geography type is not supported or if an error is found when parsing the input representation of the geography. The expression returns an error if the input resolution is invalid. The acceptable input representations are WKT, GeoJSON, and WKB. In the first two cases the input is expected to be of type STRING, whereas in the last case the input is expected to be of type BINARY.

    Annotations
    @Py4JWhitelist()
    Since

    3.5.0

  42. def h3_try_distance(e1: Column, e2: Column): Column

    Returns the grid distance between two H3 cell IDs of the same resolution, or NULL if the distance is undefined.

    Returns the grid distance between two H3 cell IDs of the same resolution, or NULL if the distance is undefined.

    Annotations
    @Py4JWhitelist()
    Since

    3.5.0

  43. def h3_try_polyfillash3(e1: Column, e2: Column): Column

    Returns an array of cell IDs represented as long integers, corresponding to hexagons or pentagons of the specified resolution that are contained by the input areal geography.

    Returns an array of cell IDs represented as long integers, corresponding to hexagons or pentagons of the specified resolution that are contained by the input areal geography. Containment is determined by the cell centroids: a cell is considered to cover the geography if the cell's centroid lies inside the areal geography. The expression's value is NULL if the geography is not areal (polygon or multipolygon) or if an error is found when parsing the input representation of the geography. The acceptable input representations are WKT, GeoJSON, and WKB. In the first two cases the input is expected to be of type STRING, whereas in the last case the input is expected to be of type BINARY.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  44. def h3_try_polyfillash3string(e1: Column, e2: Column): Column

    Returns an array of cell IDs represented as strings, corresponding to hexagons or pentagons of the specified resolution that are contained by the input areal geography.

    Returns an array of cell IDs represented as strings, corresponding to hexagons or pentagons of the specified resolution that are contained by the input areal geography. Containment is determined by the cell centroids: a cell is considered to cover the geography if the cell's centroid lies inside the areal geography. The expression's value is NULL if the geography is not areal (polygon or multipolygon) or if an error is found when parsing the input representation of the geography. The acceptable input representations are WKT, GeoJSON, and WKB. In the first two cases the input is expected to be of type STRING, whereas in the last case the input is expected to be of type BINARY.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  45. def h3_try_tessellateaswkb(geo: Column, res: Int): Column
  46. def h3_try_tessellateaswkb(geo: Column, res: Column): Column

    Returns an array of structs representing the chips covering geography at the specified resolution, or null if the geometry is invalid.

    Returns an array of structs representing the chips covering geography at the specified resolution, or null if the geometry is invalid. More precisely, the elements of the returned array are named structs with three fields names "cellid", "core", and "chip": - The "cellid" field contains one of the H3 cells covering the input geography. - The "core" field determines if the boundary polygon of the H3 cell in the "cellid" field is contained inside the input geography (this can happen only for areal input geographies). If the cell is contained in the input geography the value is set to true, and false otherwise. - The "chip" field is the (Cartesian) intersection of the H3 cell polygon, corresponding to the H3 cell id in the "cellid" field, with the input geography, represented in WKB format. The set of the H3 cells ids returned as the "cellid" elements of the structs in the array is a minimal covering set for the input geography.

    Since

    3.5.0

  47. def h3_try_validate(e: Column): Column

    Returns the input value if it is a valid H3 cell or NULL otherwise.

    Returns the input value if it is a valid H3 cell or NULL otherwise.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  48. def h3_uncompact(e1: Column, e2: Column): Column

    Uncompacts the input set of H3 cell IDs to the specified resolution.

    Uncompacts the input set of H3 cell IDs to the specified resolution.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  49. def h3_validate(e: Column): Column

    Returns the input value if it is a valid H3 cell or emits an error otherwise.

    Returns the input value if it is a valid H3 cell or emits an error otherwise.

    Annotations
    @Py4JWhitelist()
    Since

    3.3.0

  50. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  51. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  52. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  53. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  54. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  55. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  56. def toString(): String
    Definition Classes
    AnyRef → Any
  57. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  58. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  59. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

h3_funcs

Ungrouped