Search Shortcut cmd + k | ctrl + k
geography

Global spatial data processing on the sphere

Maintainer(s): paleolimbot

Installing and Loading

INSTALL geography FROM community;
LOAD geography;

Example

SELECT * FROM s2_data_countries();

About geography

The geography extension provides global spatial indexing and analysis on the sphere using Google's s2geometry library. For full documentation, see the README and function documentation.

Added Functions

function_name function_type description comment examples
s2 scalar NULL NULL []
s2_arbitrarycellfromwkb scalar NULL NULL []
s2_area scalar NULL NULL []
s2_astext scalar NULL NULL []
s2_aswkb scalar NULL NULL []
s2_bounds_box scalar NULL NULL []
s2_bounds_box_agg aggregate NULL NULL []
s2_box scalar NULL NULL []
s2_box_intersects scalar NULL NULL []
s2_box_struct scalar NULL NULL []
s2_box_union scalar NULL NULL []
s2_box_wkb scalar NULL NULL []
s2_cell_child scalar NULL NULL []
s2_cell_contains scalar NULL NULL []
s2_cell_edge_neighbor scalar NULL NULL []
s2_cell_from_token scalar NULL NULL []
s2_cell_intersects scalar NULL NULL []
s2_cell_level scalar NULL NULL []
s2_cell_parent scalar NULL NULL []
s2_cell_range_max scalar NULL NULL []
s2_cell_range_min scalar NULL NULL []
s2_cell_token scalar NULL NULL []
s2_cell_vertex scalar NULL NULL []
s2_cellfromlonlat scalar NULL NULL []
s2_cellfromwkb scalar NULL NULL []
s2_contains scalar NULL NULL []
s2_covering scalar NULL NULL []
s2_covering_fixed_level scalar NULL NULL []
s2_data_cities table NULL NULL []
s2_data_city scalar NULL NULL []
s2_data_countries table NULL NULL []
s2_data_country scalar NULL NULL []
s2_dependencies table NULL NULL []
s2_difference scalar NULL NULL []
s2_dimension scalar NULL NULL []
s2_distance scalar NULL NULL []
s2_dwithin scalar NULL NULL []
s2_equals scalar NULL NULL []
s2_format scalar NULL NULL []
s2_geogfromtext scalar NULL NULL []
s2_geogfromtext_novalidate scalar NULL NULL []
s2_geogfromwkb scalar NULL NULL []
s2_geogfromwkb_novalidate scalar NULL NULL []
s2_intersection scalar NULL NULL []
s2_intersects scalar NULL NULL []
s2_is_valid scalar NULL NULL []
s2_is_valid_reason scalar NULL NULL []
s2_isempty scalar NULL NULL []
s2_length scalar NULL NULL []
s2_max_distance scalar NULL NULL []
s2_mayintersect scalar NULL NULL []
s2_num_points scalar NULL NULL []
s2_perimeter scalar NULL NULL []
s2_prepare scalar NULL NULL []
s2_register_geoarrow_extensions table NULL NULL []
s2_union scalar NULL NULL []
s2_x scalar NULL NULL []
s2_y scalar NULL NULL []

Added Types

type_name type_size logical_type type_category internal
GEOGRAPHY 16 BLOB NULL true
S2_BOX 0 STRUCT COMPOSITE true
S2_CELL 8 UBIGINT NUMERIC true
S2_CELL_CENTER 8 UBIGINT NUMERIC true
S2_CELL_UNION 16 LIST COMPOSITE true