A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.databricks.com/aws/en/sql/language-manual/functions/h3_coverash3string below:

h3_coverash3string function | Databricks Documentation

h3_coverash3string function

Applies to: Databricks SQL Databricks Runtime 13.3 LTS and above

Returns an ARRAY of STRING values representing H3 cell IDs. These values correspond to the minimal set of hexagons or pentagons, of the specified resolution that fully cover the input linear or areal geography.

Syntax​
h3_coverash3 ( geographyExpr, resolutionExpr )
Arguments​ Returns​

An ARRAY of STRING values corresponding to the minimal set of H3 cell IDs, of the specified resolution, that fully cover the input linear or areal geography.

The function returns NULL if any one of the input expressions is NULL. If the first input argument is of type BINARY, the input value must be the WKB description of a linestring, polygon, multilinestring, or multipolygon. If the first input argument is of type STRING, the input value must be either the WKT or the GeoJSON description of a linestring, polygon, multilinestring, or multipolygon. The dimension of the input linestring, polygon, multilinestring, or multipolygon can be 2D, 3DZ, 3DM, or 4D.

Error conditions​ Examples​

SQL


> SELECT h3_coverash3string('POLYGON((-122.4194 37.7749,-118.2437 34.0522,-74.0060 40.7128,-122.4194 37.7749))', 0)
[8027fffffffffff,8029fffffffffff,802bfffffffffff,8049fffffffffff]


> SELECT h3_coverash3string(unhex('0103000000010000000400000050fc1873d79a5ec0d0d556ec2fe342404182e2c7988f5dc0f46c567dae064140aaf1d24d628052c05e4bc8073d5b444050fc1873d79a5ec0d0d556ec2fe34240'), 0)
[8027fffffffffff,8029fffffffffff,802bfffffffffff,8049fffffffffff]


SELECT h3_coverash3string('{"type":"LineString","coordinates":[[-122.4194,37.7749],[-118.2437,34.0522],[-74.0060,40.7128]]}', 1)
[8148fffffffffff, 8129bffffffffff, 812a3ffffffffff, 812abffffffffff, 81267ffffffffff, 8126fffffffffff, 81283ffffffffff]


> SELECT h3_coverash3string('{"type":"MultiPoint","coordinates":[]}', 2)
[GEOJSON_PARSE_ERROR] Error parsing GeoJSON: Invalid or unsupported type '"MultiPoint"' at position 9


> SELECT h3_coverash3string(unhex('020700000000'), 2)
[WKB_PARSE_ERROR] Error parsing WKB: Invalid byte order 2 at position 1


> SELECT h3_coverash3string('POLYGON((-122.4194 37.7749,-118.2437 34.0522,-74.0060 40.7128,-74.0060 40.7128))', 2)
[WKT_PARSE_ERROR] Error parsing WKT: Found non-closed ring at position 80


> SELECT h3_coverash3string('POLYGON((-122.4194 37.7749,-118.2437 34.0522,-74.0060 40.7128,-122.4194 37.7749))', 16)
[H3_INVALID_RESOLUTION_VALUE] H3 resolution 16 must be between 0 and 15, inclusive

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4