Skip to content

Commit

Permalink
Prepare for release v4.1.0 (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachasme authored Jan 19, 2023
1 parent 6ddf371 commit dafe3f5
Show file tree
Hide file tree
Showing 17 changed files with 46 additions and 44 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ avoid adding features or APIs which do not map onto the
Click to see more.
</summary>

</details>

## [4.1.0] - 2023-01-18

- Bump `h3` to `v4.1.0`
- Add bindings for `h3_cell_to_child_pos` and `h3_child_pos_to_cell`.
- Use CMake for entire build (see [#70])
- Add helper to fix pass-by-value migration (see [#111])
- Allow distance operator `<->` to work for cells at different resolutions (using center child).

</details>

## [4.0.3] - 2022-11-04

- Add BRIN operator class (see [#97], thanks [@mngr777])
Expand Down Expand Up @@ -182,7 +184,8 @@ avoid adding features or APIs which do not map onto the

- Initial public release

[unreleased]: https://github.com/zachasme/h3-pg/compare/v4.0.3...HEAD
[unreleased]: https://github.com/zachasme/h3-pg/compare/v4.1.0...HEAD
[4.1.0]: https://github.com/zachasme/h3-pg/compare/v4.0.3...v4.1.0
[4.0.3]: https://github.com/zachasme/h3-pg/compare/v4.0.2...v4.0.3
[4.0.2]: https://github.com/zachasme/h3-pg/compare/v4.0.1...v4.0.2
[4.0.1]: https://github.com/zachasme/h3-pg/compare/v4.0.0...v4.0.1
Expand Down
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ endif()
# Listing the version is nice here since it sets lots of useful variables
project(
h3-pg
VERSION 4.0.3
VERSION 4.1.0
LANGUAGES C
)

Expand All @@ -52,12 +52,10 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include(CTest)
endif()

# Include the extensions.
set(CORE_VERSION 4.0.1)
set(TEST_VERSION unreleased)

# Include core library
add_subdirectory(cmake/h3)

# Include extensions
add_subdirectory(h3)
add_subdirectory(h3_postgis)

Expand Down
10 changes: 5 additions & 5 deletions META.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
"name": "h3",
"abstract": "PostgreSQL bindings for H3",
"description": "PostgreSQL bindings for H3, a hierarchical hexagonal geospatial indexing system.",
"version": "unreleased",
"version": "4.1.0",
"maintainer": "Zacharias Knudsen <[email protected]>",
"license": "apache_2_0",
"provides": {
"h3": {
"abstract": "PostgreSQL bindings for H3",
"file": "h3--unreleased.sql",
"file": "h3--4.1.0.sql",
"docfile": "README.md",
"version": "unreleased"
"version": "4.1.0"
},
"h3_postgis": {
"abstract": "H3 PostGIS integration",
"file": "h3_postgis--unreleased.sql",
"file": "h3_postgis--4.1.0.sql",
"docfile": "README.md",
"version": "unreleased"
"version": "4.1.0"
}
},
"resources": {
Expand Down
20 changes: 10 additions & 10 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,14 @@ Compacts the given array as best as possible.


### h3_cell_to_child_pos(child `h3index`, parentRes `integer`) ⇒ `int8`
*Since vunreleased*
*Since v4.1.0*


Returns the position of the child cell within an ordered list of all children of the cells parent at the specified resolution parentRes. The order of the ordered list is the same as that returned by cellToChildren. This is the complement of childPosToCell.


### h3_child_pos_to_cell(childPos `int8`, parent `h3index`, childRes `int`) ⇒ `h3index`
*Since vunreleased*
*Since v4.1.0*


Returns the child cell at a given position within an ordered list of all children of parent at the specified resolution childRes. The order of the ordered list is the same as that returned by cellToChildren. This is the complement of cellToChildPos.
Expand Down Expand Up @@ -489,7 +489,7 @@ Get the currently installed version of the extension.


### h3_pg_migrate_pass_by_reference(`h3index`) ⇒ `h3index`
*Since vunreleased*
*Since v4.1.0*


Migrate h3index from pass-by-reference to pass-by-value.
Expand Down Expand Up @@ -555,7 +555,7 @@ Splits polygons when crossing 180th meridian.
# PostGIS Grid Traversal Functions

### h3_grid_path_cells_recursive(origin `h3index`, destination `h3index`) ⇒ SETOF `h3index`
*Since vunreleased*
*Since v4.1.0*


# PostGIS Region Functions
Expand All @@ -569,19 +569,19 @@ Splits polygons when crossing 180th meridian.


### h3_cells_to_multi_polygon_geometry(`h3index[]`) ⇒ `geometry`
*Since vunreleased*
*Since v4.1.0*


### h3_cells_to_multi_polygon_geography(`h3index[]`) ⇒ `geography`
*Since vunreleased*
*Since v4.1.0*


### h3_cells_to_multi_polygon_geometry(setof `h3index`)
*Since vunreleased*
*Since v4.1.0*


### h3_cells_to_multi_polygon_geography(setof `h3index`)
*Since vunreleased*
*Since v4.1.0*


# PostGIS casts
Expand All @@ -597,7 +597,7 @@ Splits polygons when crossing 180th meridian.
# WKB indexing functions

### h3_cell_to_boundary_wkb(cell `h3index`) ⇒ `bytea`
*Since vunreleased*
*Since v4.1.0*


Finds the boundary of the index, converts to EWKB.
Expand All @@ -610,7 +610,7 @@ This function has to return WKB since Postgres does not provide multipolygon typ
# WKB regions functions

### h3_cells_to_multi_polygon_wkb(`h3index[]`) ⇒ `bytea`
*Since vunreleased*
*Since v4.1.0*


Create a LinkedGeoPolygon describing the outline(s) of a set of hexagons, converts to EWKB.
Expand Down
1 change: 1 addition & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Documentation is generated from the sql files, using the script `scripts/documen
- Don't follow semver, simply use major and minor from H3 core and increment patch.
- Version number should be changed in `h3.control`, `h3_postgis.control` and `META.json`.
- Update files suffixed `--unreleased` should be renamed.
- Installer `.sql` files should have `@ availability` comments updated.
- Create new update files with `--unreleased` suffix.
- Update changelog by moving from `Unreleased` to a new section
2. Create a release on GitHub
Expand Down
4 changes: 2 additions & 2 deletions h3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PostgreSQL_add_extension(postgresql_h3
RELOCATABLE
NAME h3
COMMENT "H3 bindings for PostgreSQL"
VERSION "unreleased" #${PROJECT_VERSION}
VERSION ${PROJECT_VERSION} #"unreleased"
COMPONENT ${PROJECT_NAME}
SOURCES
src/binding/edge.c
Expand Down Expand Up @@ -72,7 +72,7 @@ PostgreSQL_add_extension(postgresql_h3
sql/updates/h3--4.0.0--4.0.1.sql
sql/updates/h3--4.0.1--4.0.2.sql
sql/updates/h3--4.0.2--4.0.3.sql
sql/updates/h3--4.0.3--unreleased.sql
sql/updates/h3--4.0.3--4.1.0.sql
)

# include
Expand Down
4 changes: 2 additions & 2 deletions h3/sql/install/04-hierarchy.sql
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION
h3_compact_cells(cells h3index[])
IS 'Compacts the given array as best as possible.';

--@ availability: unreleased
--@ availability: 4.1.0
CREATE OR REPLACE FUNCTION
h3_cell_to_child_pos(child h3index, parentRes integer) RETURNS int8
AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION
h3_cell_to_child_pos(child h3index, parentRes integer)
IS 'Returns the position of the child cell within an ordered list of all children of the cells parent at the specified resolution parentRes. The order of the ordered list is the same as that returned by cellToChildren. This is the complement of childPosToCell.';

--@ availability: unreleased
--@ availability: 4.1.0
CREATE OR REPLACE FUNCTION
h3_child_pos_to_cell(childPos int8, parent h3index, childRes int) RETURNS h3index
AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION
Expand Down
2 changes: 1 addition & 1 deletion h3/sql/install/30-extension.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CREATE OR REPLACE FUNCTION h3_get_extension_version() RETURNS text
COMMENT ON FUNCTION h3_get_extension_version() IS
'Get the currently installed version of the extension.';

--@ availability: unreleased
--@ availability: 4.1.0
CREATE OR REPLACE FUNCTION h3_pg_migrate_pass_by_reference(h3index) RETURNS h3index
AS 'h3' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
COMMENT ON FUNCTION h3_pg_migrate_pass_by_reference(h3index) IS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Bytes & Brains
* Copyright 2022-2023 Bytes & Brains
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
*/

-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "ALTER EXTENSION h3 UPDATE TO 'unreleased'" to load this file. \quit
\echo Use "ALTER EXTENSION h3 UPDATE TO '4.1.0'" to load this file. \quit

DROP FUNCTION IF EXISTS h3_cell_to_boundary_wkb(h3index);
DROP FUNCTION IF EXISTS h3_cells_to_multi_polygon_wkb(h3index[]);
Expand Down
4 changes: 2 additions & 2 deletions h3/src/deprecated.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ H3_DEPRECATE("4.0.0", h3_to_geo_boundary);
H3_DEPRECATE("4.0.0", h3_to_geo);
H3_DEPRECATE("4.0.0", h3_uncompact);
H3_DEPRECATE("4.0.0", h3_unidirectional_edge_is_valid);
H3_DEPRECATE("unreleased", h3_cell_to_boundary_wkb);
H3_DEPRECATE("unreleased", h3_cells_to_multi_polygon_wkb);
H3_DEPRECATE("4.1.0", h3_cell_to_boundary_wkb);
H3_DEPRECATE("4.1.0", h3_cells_to_multi_polygon_wkb);
2 changes: 1 addition & 1 deletion h3/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if(PostgreSQL_VALIDATE_EXTUPGRADE)
COMMAND pg_validate_extupgrade
--extname h3
--from 0.1.0
--to unreleased
--to ${PROJECT_VERSION} #unreleased
)
endif()

Expand Down
4 changes: 2 additions & 2 deletions h3_postgis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PostgreSQL_add_extension(postgresql_h3_postgis
RELOCATABLE
NAME h3_postgis
COMMENT "H3 PostGIS integration"
VERSION "unreleased" #${PROJECT_VERSION}
VERSION ${PROJECT_VERSION} #"unreleased"
COMPONENT ${PROJECT_NAME}
REQUIRES
h3
Expand All @@ -29,7 +29,7 @@ PostgreSQL_add_extension(postgresql_h3_postgis
sql/updates/h3_postgis--4.0.0--4.0.1.sql
sql/updates/h3_postgis--4.0.1--4.0.2.sql
sql/updates/h3_postgis--4.0.2--4.0.3.sql
sql/updates/h3_postgis--4.0.3--unreleased.sql
sql/updates/h3_postgis--4.0.3--4.1.0.sql
)

# include
Expand Down
2 changes: 1 addition & 1 deletion h3_postgis/sql/install/03-traversal.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

--| # PostGIS Grid Traversal Functions

--@ availability: unreleased
--@ availability: 4.1.0
--@ refid: h3_grid_path_cells_recursive
CREATE OR REPLACE FUNCTION
h3_grid_path_cells_recursive(origin h3index, destination h3index) RETURNS SETOF h3index
Expand Down
8 changes: 4 additions & 4 deletions h3_postgis/sql/install/05-regions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ CREATE OR REPLACE FUNCTION h3_polygon_to_cells(multi geometry, resolution intege
CREATE OR REPLACE FUNCTION h3_polygon_to_cells(multi geography, resolution integer) RETURNS SETOF h3index
AS $$ SELECT h3_polygon_to_cells($1::geometry, $2) $$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE CALLED ON NULL INPUT; -- NOT STRICT

--@ availability: unreleased
--@ availability: 4.1.0
--@ refid: h3_cells_to_multi_polygon_geometry
CREATE OR REPLACE FUNCTION
h3_cells_to_multi_polygon_geometry(h3index[]) RETURNS geometry
AS $$ SELECT h3_cells_to_multi_polygon_wkb($1)::geometry $$ IMMUTABLE STRICT PARALLEL SAFE LANGUAGE SQL;

--@ availability: unreleased
--@ availability: 4.1.0
--@ refid: h3_cells_to_multi_polygon_geography
CREATE OR REPLACE FUNCTION
h3_cells_to_multi_polygon_geography(h3index[]) RETURNS geography
AS $$ SELECT h3_cells_to_multi_polygon_wkb($1)::geography $$ IMMUTABLE STRICT PARALLEL SAFE LANGUAGE SQL;

--@ availability: unreleased
--@ availability: 4.1.0
--@ refid: h3_cells_to_multi_polygon_geometry_agg
CREATE AGGREGATE h3_cells_to_multi_polygon_geometry(h3index) (
sfunc = array_append,
Expand All @@ -64,7 +64,7 @@ CREATE AGGREGATE h3_cells_to_multi_polygon_geometry(h3index) (
parallel = safe
);

--@ availability: unreleased
--@ availability: 4.1.0
--@ refid: h3_cells_to_multi_polygon_geography_agg
CREATE AGGREGATE h3_cells_to_multi_polygon_geography(h3index) (
sfunc = array_append,
Expand Down
4 changes: 2 additions & 2 deletions h3_postgis/sql/install/30-wkb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

--| # WKB indexing functions

--@ availability: unreleased
--@ availability: 4.1.0
CREATE OR REPLACE FUNCTION
h3_cell_to_boundary_wkb(cell h3index) RETURNS bytea
AS 'h3_postgis' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION
Expand All @@ -29,7 +29,7 @@ This function has to return WKB since Postgres does not provide multipolygon typ

--| # WKB regions functions

--@ availability: unreleased
--@ availability: 4.1.0
CREATE OR REPLACE FUNCTION
h3_cells_to_multi_polygon_wkb(h3index[]) RETURNS bytea
AS 'h3_postgis' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE; COMMENT ON FUNCTION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "ALTER EXTENSION h3_postgis UPDATE TO 'unreleased'" to load this file. \quit
\echo Use "ALTER EXTENSION h3_postgis UPDATE TO '4.1.0'" to load this file. \quit

CREATE OR REPLACE FUNCTION
h3_cell_to_boundary_wkb(cell h3index) RETURNS bytea
Expand Down
2 changes: 1 addition & 1 deletion h3_postgis/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ if(PostgreSQL_VALIDATE_EXTUPGRADE)
COMMAND pg_validate_extupgrade
--extname h3_postgis
--from 4.0.0
--to unreleased
--to ${PROJECT_VERSION} #unreleased
)
endif()

0 comments on commit dafe3f5

Please sign in to comment.