Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Funzione
Si applica a:
controllo SQL di Databricks
Databricks Runtime 17.1 e versioni successive
Important
Questa funzionalità è in Anteprima Pubblica.
Annotazioni
Questa funzionalità non è disponibile in Databricks SQL Classic Warehouses. Per altre informazioni sui databricks SQL Warehouse, vedere Tipi di SQL Warehouse.
Analizza la descrizione di input di un'area geografica e restituisce il valore corrispondente GEOGRAPHY oppure NULL se la descrizione di input non è valida.
Il valore SRID del valore restituito GEOGRAPHY è 4326.
Syntax
try_to_geography ( geoRepExpr )
Arguments
Returns
Valore di tipo GEOGRAPHY(ANY), corrispondente alla descrizione geografica di input.
- La funzione restituisce
NULLse l'input èNULL. - La funzione restituisce
NULLse il valore di inputBINARYoSTRINGè una descrizione non valida di un'area geografica.
Examples
-- Input geography is in WKT format.
> SELECT st_asgeojson(try_to_geography('POINT Z (3 4 5)'));
{"type":"Point","coordinates":[3,4,5]}
-- Input geography is in GeoJSON format.
> SELECT st_asewkt(try_to_geography('{"type":"Point","coordinates":[3,4,5]}'));
SRID=4326;POINT Z (3 4 5)
-- Input geography is in WKB format.
> SELECT st_astext(try_to_geography(X'01b90b0000000000000000084000000000000010400000000000001440000000000000f0bf'))
POINT ZM (3 4 5 -1)
-- Input value is not the description of a geography.
> SELECT st_astext(try_to_geography('some string that does not represent a geography'))
NULL
Funzioni correlate
-
st_asbinaryFunzione -
st_asewkbFunzione -
st_asewktFunzione -
st_asgeojsonFunzione -
st_astextFunzione -
st_aswkbFunzione -
st_aswktFunzione -
st_geogfromgeojsonFunzione -
st_geogfromtextFunzione -
st_geogfromwkbFunzione -
st_geogfromwktFunzione -
st_geomfromewkbFunzione -
st_geomfromgeojsonFunzione -
st_geomfromtextFunzione -
st_geomfromwkbFunzione -
st_geomfromwktFunzione -
to_geographyFunzione -
to_geometryFunzione -
try_to_geometryFunzione