Results of 1 - 10 of about 16 for geometry (0.007 sec.)
- Spatial Functions 13083
- Function Index Scalar Functions Function Summary DuckDB_PROJ_Compiled_Version Returns a text description of the PROJ library version that this instance of DuckDB was compiled against. DuckDB_Proj_Version Returns a text description of the PR
...OJ library version that is being used by this instance of DuckDB. ST_Affine Applies an affine transformation to a geometry. ST_Area Compute the area of a geometry. ST_Area_Spheroid Returns the area of a geometry in meters, using an ellipsoidal m...odel of the earth ST_AsGeoJSON Returns the geometry as a GeoJSON fragment ST_AsHEXWKB Returns the geometry as a HEXWKB string ST_AsMVTGeom Transform and clip geometry to a ti...le boundary ST_AsSVG Convert the geometry into a SVG fragment or path ST_AsText Returns the geometry as a WKT string ST_AsWKB Returns the geometry as a WKB (Well-Kn... - https://man.mtool.work/duckdb/2.0/core_extensions/spatial/functions.html
- Geometry Data Type 11904
- Name Description GEOMETRY Geospatial entity The GEOMETRY data type is used to store and manipulate geometric objects, such as points, lines, and polygons. The GEOMETRY type was part of the spatial extension but became a built-in data type i
...n DuckDB 1.5. Most of the benefits of having GEOMETRY as a built-in type (e.g., storage optimizations, statistics, etc.) are therefore only available in databases using storage...ries (e.g., calculating distances, areas, intersections) are still part of spatial . Types of Geometries Conceptually, the GEOMETRY type follows the core data model defined in the Simple Features standard, which is widely used in geospatial databases and...GIS software. A GEOMETRY value can therefore represent 7 types of shapes: Geometry Type Description Point A single location in space, defined by it... - https://man.mtool.work/duckdb/2.0/sql/data_types/geometry.html
- Geometry Functions 10969
- This section describes the functions for examining and manipulating GEOMETRY values. The spatial extension provides additional functions for working with GEOMETRY values, which are documented in the Spatial Functions section. Geometry Opera
...tors The table below lists the operators that can be used with GEOMETRY values. Operator Description Example Result && Returns true if the geometries bounding boxes intersect. Equivalent to ST_I...ntersects_Extent . 'POINT(5 5)'::GEOMETRY && 'LINESTRING(0 0, 10 20)'::GEOMETRY true Built-in Geometry Functions Name Description ST_GeomFromWKB Creates a geometry...from Well-Known Binary (WKB) representation ST_AsWKB Returns the Well-Known Binary (WKB) representation of the geometry ST_AsWKT Returns the Well-Known Text (WKT) representation of the geometry ST_Intersects_Extent Returns true if the geometr... - https://man.mtool.work/duckdb/2.0/sql/functions/geometry.html
- R-Tree Indexes 9426
- The spatial extension provides support for spatial indexing through the R-tree extension index type. Why Should I Use an R-Tree Index? When working with geospatial datasets, it is very common that you want to filter rows based on their spat
...e Indexes Work? An R-tree is a balanced tree data structure that stores the approximate minimum bounding rectangle of each geometry (and the internal ID of the corresponding row) in the leaf nodes, and the bounding rectangle enclosing all of the child no...des in each internal node. The minimum bounding rectangle (MBR) of a geometry is the smallest rectangle that completely encloses the geometry. Usually when we talk about the bounding rectangle of a ge...ometry (or the bounding "box" in the context of 2D geometry), we mean the minimum bounding rectangle. Additionally, we tend to assume that bounding boxes/rectangles are axis-aligned,... - https://man.mtool.work/duckdb/2.0/core_extensions/spatial/r-tree_indexes.html
- Writing JSON 8854
- The contents of tables or the result of queries can be written directly to a JSON file using the COPY statement. For example: CREATE TABLE cities AS FROM (VALUES ('Amsterdam', 1), ('London', 2)) cities(name, id); COPY cities TO 'cities.json
...tion . FORMAT GEOJSONL (or ARRAY true with FORMAT GEOJSON ) writes newline-delimited Feature objects. You do not need json_geometry_format for these copy formats. COPY (SELECT 'POINT(0 1)'::GEOMETRY AS geom, 10 AS my_field) TO 'test.json' (FORMAT GEOJSON...); COPY (SELECT 'POINT(0 1)'::GEOMETRY AS geom, 10 AS my_field) TO 'test.jsonl' (FORMAT GEOJSONL); Optional ID_COLUMN and GEOMETRY_COLUMN pick which columns beco...me the Feature id and geometry. st_asgeojson / st_geomfromgeojson convert a single value. Reading GeoJSON is documented on the Loading JSON page.... - https://man.mtool.work/duckdb/2.0/data/json/writing_json.html
- Querying Parquet Metadata 8179
- Parquet Metadata The parquet_metadata function can be used to query the metadata contained within a Parquet file, which reveals various internal details of the Parquet file such as the statistics of the different columns. This can be useful
...pe file_name VARCHAR key BLOB value BLOB GeoParquet Metadata GeoParquet files store their geospatial metadata (the primary geometry column, its encoding, the coordinate reference system, and more) under the geo key of the Parquet key-value metadata. Beca...T decode(value)->>'$.version' AS version, decode(value)->>'$.primary_column' AS primary_column, decode(value)->>'$.columns.geometry.encoding' AS encoding FROM parquet_kv_metadata('file.parquet') WHERE decode(key) = 'geo'; version primary_column encoding...1.0.0 geometry WKB When the file embeds a coordinate reference system, it is stored as PROJJSON under the geometry column's crs key, for... - https://man.mtool.work/duckdb/2.0/data/parquet/metadata.html
- GDAL Integration 8005
- The spatial extension integrates the GDAL translator library to read and write spatial data from a variety of geospatial vector file formats. See the documentation for the st_read table function for how to make use of this in practice. In o
...function. DRIVER : is the GDAL driver to use for the export. Use ST_Drivers() to list the names of all available drivers. GEOMETRY_TYPE : the geometry type for the created layer to pass to the GDAL driver. One of POINT , LINESTRING , POLYGON , MULTIPOIN...T , MULTILINESTRING , MULTIPOLYGON and GEOMETRYCOLLECTION . LAYER_NAME : assign an alternate name to the new layer LAYER_CREATION_OPTIONS : list of layer creation options...sically anything you would normally be able to pass to GDAL. Note that this will not perform any reprojection of the input geometry, it just sets the metadata if the target driver supports it. Limitations Note that only vector based drivers are supported... - https://man.mtool.work/duckdb/2.0/core_extensions/spatial/gdal.html
- Run Queries 7884
- Overview Java applications send queries and read result sets through the familiar Statement , PreparedStatement , and ResultSet interfaces. This page covers sending queries and reading DuckDB's nested and composite types. For opening the Co
...= conn.createMap("MAP(VARCHAR, INTEGER)", Map.of("a", 1, "b", 2)); Binding Spatial Values The spatial extension builds its geometry types from STRUCT and LIST types, so they are bound with the same factory methods. A POINT_2D is a struct of two DOUBLE fi...h points. After loading the extension, build the value with createStruct() (or createArrayOf() ) and cast the parameter to GEOMETRY ; a GEOMETRY result comes back as Well-Known Binary through getBlob() : try (Statement stmt = conn.createStatement()) { st...ateStruct("POINT_2D", new Object[] {41.1, 42.2}); try (PreparedStatement stmt = conn.prepareStatement("SELECT ?::POINT_2D::GEOMETRY")) { stmt.setObject(1, point); try (ResultSet rs = stmt.executeQuery()) { rs.next(); Blob wkb = rs.getBlob(1); // the geom... - https://man.mtool.work/duckdb/2.0/clients/java/querying.html
- Configuration 7815
- DuckDB has a number of configuration options that can be used to change the behavior of the system. The configuration options can be set using either the SET statement or the PRAGMA statement . They can be reset to their original values usi
...emit compressed vectors to utilize late decompression. BOOLEAN false enable_geoparquet_conversion Attempt to decode/encode geometry data in/as GeoParquet files if the spatial extension is present. BOOLEAN true enable_global_s3_configuration Automatically...may cause database corruption after an operating system or hardware crash. FULL uses fullfsync on macOS. VARCHAR STANDARD geometry_minimum_shredding_size Minimum size of a row group to enable GEOMETRY shredding. Set to -1 to disable shredding entirely....NF instead of errors/NULL. BOOLEAN true ignore_unknown_crs Ignore unknown Coordinate Reference Systems (CRS) when creating geometry types or importing geospatial data. BOOLEAN false immediate_transaction_mode Whether transactions should be started lazily... - https://man.mtool.work/duckdb/2.0/configuration/overview.html
- Loading JSON 7763
- The DuckDB JSON reader can automatically infer which configuration flags to use by analyzing the JSON file. This will work correctly in most situations, and should be the first option attempted. In rare situations where the JSON reader cann
...d, it will default to using a MAP type with value type of merged field types. DOUBLE 0.1 geojson When true , parse GeoJSON geometry objects as GEOMETRY instead of JSON / STRUCT . Stray GeoJSON fragments in ordinary JSON are not inferred unless this is se...re was introduced in DuckDB 2.0. The json extension can read GeoJSON when you opt in. Pass geojson := true to read_json so geometry objects become GEOMETRY (the spatial type) instead of generic JSON: SELECT * FROM read_json('features.geojson', geojson :=... - https://man.mtool.work/duckdb/2.0/data/json/loading_json.html
DuckDB 2.0 Documentation / man.mtool.work