--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: eeagrid excerpt: | DuckDB Community Extensions Extension that adds support for working with the EEA Reference Grid System. extension: name: eeagrid description: Extension that adds support for working with the EEA Reference Grid System. version: 0.2.0 language: C++ build: cmake license: MIT maintainers: - ahuarte47 repo: github: ahuarte47/duckdb-eeagrid ref: 4f56d8aaa66ac8c41e7d11381e1656321bd5a7c4 variegata: e2d30516e44a637d5cf792abae2b0e4792c7827a docs: hello_world: | SELECT EEA_CoordXY2GridNum(5078600, 2871400); ---- 23090257455218688 SELECT EEA_GridNum2CoordX(23090257455218688); ---- 5078600 SELECT EEA_GridNum2CoordX(23090257455218688, 1_000_000); ---- 5000000 SELECT EEA_GridNum2CoordY(23090257455218688); ---- 2871400 SELECT EEA_GridNum2CoordY(23090257455218688, 1_000); ---- 2871000 SELECT EEA_GridNumAt100m(23090257455218688); ---- 23090257455218688 SELECT EEA_GridNumAt1km(23090257455218688); ---- 23090257448665088 SELECT EEA_GridNumAt10km(23090257455218688); ---- 23090255284404224 extended_description: | The EEA Reference Grid extension adds support for working with the [EEA Reference Grid System](https://sdi.eea.europa.eu/catalogue/srv/api/records/aac8379a-5c4e-445c-b2ef-23a6a2701ef0/attachments/eea_reference_grid_v1.pdf). The **EEA Reference Grid** is a standardized spatial grid system used across Europe for environmental data analysis and reporting. It is maintained by the [European Environment Agency](https://www.eea.europa.eu/en) (EEA) and forms the basis for aggregating and exchanging geospatial data in a consistent format: * `Coordinate Reference System (CRS)`: ETRS89 / LAEA Europe ([EPSG:3035](https://epsg.io/3035)), which minimizes area distortion across Europe. The Geodetic Datum is the European Terrestrial Reference System 1989 (EPSG:6258). The Lambert Azimuthal Equal Area (LAEA) projection is centred at 10°E, 52°N. Coordinates are based on a false Easting of 4321000 meters, and a false Northing of 3210000 meters. * `Supported resolutions`: Typically available at 10 km, 1 km, and 100 m resolutions. * `Structure`: Regular square grid with unique cell codes and identifiers assigned based on position and resolution. * `Purpose`: Enables harmonized spatial analysis, mapping, and cross-border environmental assessments. This grid system is widely used in European environmental datasets, including air quality, land use, biodiversity, and climate change indicators. The extension provides functions to calculate grid cell identifiers (`INT64`) from XY coordinates based on the `EPSG:3035` coordinate reference system, and vice versa. Please see the [function table](docs/functions.md) for the current implementation status. extension_star_count: 2 extension_star_count_pretty: 2 extension_download_count: 922 extension_download_count_pretty: 922 image: '/images/community_extensions/social_preview/preview_community_extension_eeagrid.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ✅ | ✅ | ✅ | ✅ | ✅ | | Linux ARM64 | ✅ | ✅ | ✅ | ✅ | ✅ | | macOS AMD64 | ✅ | ✅ | ✅ | ✅ | ✅ | | macOS ARM64 | ✅ | ✅ | ✅ | ✅ | ✅ | | Windows AMD64 | ✅ | ✅ | ✅ | ✅ | ✅ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ✅ | ✅ | ✅ | ✅ | ✅ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions
| function_name | function_type | description | comment | examples | |---------------------|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|-------------------------------------------------| | EEA_CoordXY2GridNum | scalar | Returns the EEA Reference Grid code to a given XY coordinate (EPSG:3035). | NULL | [SELECT EEA_CoordXY2GridNum(5078600, 2871400);] | | EEA_GridNum2CoordX | scalar | Returns the X-coordinate (EPSG:3035) of the grid cell corresponding to a given EEA Reference Grid code, optionally truncating the value to a specified resolution. | NULL | [SELECT EEA_GridNum2CoordX(23090257455218688);] | | EEA_GridNum2CoordY | scalar | Returns the Y-coordinate (EPSG:3035) of the grid cell corresponding to a given EEA Reference Grid code, optionally truncating the value to a specified resolution. | NULL | [SELECT EEA_GridNum2CoordY(23090257455218688);] | | EEA_GridNumAt100m | scalar | Returns the Grid code at 100 m resolution given an EEA reference Grid code. | NULL | [SELECT EEA_GridNumAt100m(23090257455218688);] | | EEA_GridNumAt10km | scalar | Returns the Grid code at 10 km resolution given an EEA reference Grid code. | NULL | [SELECT EEA_GridNumAt10km(23090257455218688);] | | EEA_GridNumAt1km | scalar | Returns the Grid code at 1 km resolution given an EEA reference Grid code. | NULL | [SELECT EEA_GridNumAt1km(23090257455218688);] | ### Overloaded Functions
This extension does not add any function overloads. ### Added Types
This extension does not add any types. ### Added Settings
| name | description | input_type | scope | aliases | typed_value | |----------------|---------------------------------------------------------|------------|--------|---------|-------------| | temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |