Skip to content

Commit

Permalink
Prepare for release 4.1.1 (#118)
Browse files Browse the repository at this point in the history
* Prepare for release 4.1.1

* Generate docs
  • Loading branch information
zachasme authored Feb 7, 2023
1 parent 1715f5e commit 989415f
Show file tree
Hide file tree
Showing 11 changed files with 684 additions and 676 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ avoid adding features or APIs which do not map onto the
Click to see more.
</summary>

- Add `postgis_raster` integration (see [#112], thanks [@mngr777])

</details>

## [4.1.1] - 2023-02-07

- Add `postgis_raster` integration (see [#112], thanks [@mngr777])
- Fix `h3_postgis` upgrade path (see [#117], thanks [@mngr777])

## [4.1.0] - 2023-01-18

- Bump `h3` to `v4.1.0`
Expand Down Expand Up @@ -241,6 +244,7 @@ avoid adding features or APIs which do not map onto the
[#97]: https://github.com/zachasme/h3-pg/pull/97
[#111]: https://github.com/zachasme/h3-pg/pull/111
[#112]: https://github.com/zachasme/h3-pg/pull/112
[#117]: https://github.com/zachasme/h3-pg/issues/117
[@abelvm]: https://github.com/AbelVM
[@kalenikaliaksandr]: https://github.com/kalenikaliaksandr
[@kmacdough]: https://github.com/kmacdough
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ endif()
# Listing the version is nice here since it sets lots of useful variables
project(
h3-pg
VERSION 4.1.0
VERSION 4.1.1
LANGUAGES C
)
# set this to $PROJECT_VERSION on release
set(INSTALL_VERSION unreleased)
# set this to "${PROJECT_VERSION}" on release
set(INSTALL_VERSION "${PROJECT_VERSION}")
set(H3_CORE_VERSION 4.1.0)
set(H3_CORE_SHA256 ec99f1f5974846bde64f4513cf8d2ea1b8d172d2218ab41803bf6a63532272bc)

Expand Down
26 changes: 13 additions & 13 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -643,36 +643,36 @@ GROUP BY 1;
```


*Since vunreleased*
*Since v4.1.1*


### h3_raster_summary_stats_agg(setof `h3_raster_summary_stats`)
*Since vunreleased*
*Since v4.1.1*


### h3_raster_summary_clip(rast `raster`, resolution `integer`, [nband `integer` = 1]) ⇒ TABLE (h3 `h3index`, stats `h3_raster_summary_stats`)
*Since vunreleased*
*Since v4.1.1*


Returns `h3_raster_summary_stats` for each H3 cell in raster for a given band. Clips the raster by H3 cell geometries and processes each part separately.


### h3_raster_summary_centroids(rast `raster`, resolution `integer`, [nband `integer` = 1]) ⇒ TABLE (h3 `h3index`, stats `h3_raster_summary_stats`)
*Since vunreleased*
*Since v4.1.1*


Returns `h3_raster_summary_stats` for each H3 cell in raster for a given band. Finds corresponding H3 cell for each pixel, then groups values by H3 index.


### h3_raster_summary_subpixel(rast `raster`, resolution `integer`, [nband `integer` = 1]) ⇒ TABLE (h3 `h3index`, stats `h3_raster_summary_stats`)
*Since vunreleased*
*Since v4.1.1*


Returns `h3_raster_summary_stats` for each H3 cell in raster for a given band. Assumes H3 cell is smaller than a pixel. Finds corresponding pixel for each H3 cell in raster.


### h3_raster_summary(rast `raster`, resolution `integer`, [nband `integer` = 1]) ⇒ TABLE (h3 `h3index`, stats `h3_raster_summary_stats`)
*Since vunreleased*
*Since v4.1.1*


Returns `h3_raster_summary_stats` for each H3 cell in raster for a given band. Attempts to select an appropriate method based on number of pixels per H3 cell.
Expand Down Expand Up @@ -739,43 +739,43 @@ ORDER BY h3, (item).count DESC;
```


*Since vunreleased*
*Since v4.1.1*


### h3_raster_class_summary_item_to_jsonb(item `h3_raster_class_summary_item`) ⇒ `jsonb`
*Since vunreleased*
*Since v4.1.1*


Convert raster summary to JSONB, example: `{"count": 10, "value": 2, "area": 16490.3423}`


### h3_raster_class_summary_item_agg(setof `h3_raster_class_summary_item`)
*Since vunreleased*
*Since v4.1.1*


### h3_raster_class_summary_clip(rast `raster`, resolution `integer`, [nband `integer` = 1]) ⇒ TABLE (h3 `h3index`, val `integer`, summary `h3_raster_class_summary_item`)
*Since vunreleased*
*Since v4.1.1*


Returns `h3_raster_class_summary_item` for each H3 cell and value for a given band. Clips the raster by H3 cell geometries and processes each part separately.


### h3_raster_class_summary_centroids(rast `raster`, resolution `integer`, [nband `integer` = 1]) ⇒ TABLE (h3 `h3index`, val `integer`, summary `h3_raster_class_summary_item`)
*Since vunreleased*
*Since v4.1.1*


Returns `h3_raster_class_summary_item` for each H3 cell and value for a given band. Finds corresponding H3 cell for each pixel, then groups by H3 and value.


### h3_raster_class_summary_subpixel(rast `raster`, resolution `integer`, [nband `integer` = 1]) ⇒ TABLE (h3 `h3index`, val `integer`, summary `h3_raster_class_summary_item`)
*Since vunreleased*
*Since v4.1.1*


Returns `h3_raster_class_summary_item` for each H3 cell and value for a given band. Assumes H3 cell is smaller than a pixel. Finds corresponding pixel for each H3 cell in raster.


### h3_raster_class_summary(rast `raster`, resolution `integer`, [nband `integer` = 1]) ⇒ TABLE (h3 `h3index`, val `integer`, summary `h3_raster_class_summary_item`)
*Since vunreleased*
*Since v4.1.1*


Returns `h3_raster_class_summary_item` for each H3 cell and value for a given band. Attempts to select an appropriate method based on number of pixels per H3 cell.
Expand Down
4 changes: 3 additions & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ Documentation is generated from the sql files, using the script `scripts/documen

1. Update version number
- Don't follow semver, simply use major and minor from H3 core and increment patch.
- Version number should be changed in root `CMakeLists.txt`, and `META.json`.
- Version number should be changed in root `CMakeLists.txt`.
- Set INSTALL_VERSION to "${PROJECT_VERSION}".
- Update files suffixed `--unreleased` should be renamed.
- Installer `.sql` files should have `@ availability` comments updated.
- Update changelog by moving from `Unreleased` to a new section
- Push and merge changes in `release-x.y.z` branch.
2. Create a release on GitHub
- Draft new release "vX.Y.Z"
- Copy CHANGELOG.md entry into release description
Expand Down
2 changes: 1 addition & 1 deletion h3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ PostgreSQL_add_extension(postgresql_h3
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--4.1.0.sql
sql/updates/h3--4.1.0--unreleased.sql
sql/updates/h3--4.1.0--4.1.1.sql
)

# configure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
*/

-- 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.1'" to load this file. \quit
2 changes: 1 addition & 1 deletion h3_postgis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PostgreSQL_add_extension(postgresql_h3_postgis
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--4.1.0.sql
sql/updates/h3_postgis--4.1.0--unreleased.sql
sql/updates/h3_postgis--4.1.0--4.1.1.sql
)

# link
Expand Down
26 changes: 13 additions & 13 deletions h3_postgis/sql/install/40-rasters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ $$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE;
--| ```

-- NOTE: `count` can be < 1 when cell area is less than pixel area
--@ availability: unreleased
--@ availability: 4.1.1
CREATE TYPE h3_raster_summary_stats AS (
count double precision,
sum double precision,
Expand Down Expand Up @@ -278,7 +278,7 @@ AS $$
FROM total AS t
$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE;

--@ availability: unreleased
--@ availability: 4.1.1
CREATE AGGREGATE h3_raster_summary_stats_agg(h3_raster_summary_stats) (
sfunc = __h3_raster_summary_stats_agg_transfn,
stype = h3_raster_summary_stats,
Expand All @@ -298,7 +298,7 @@ AS $$
FROM __h3_raster_polygon_to_cell_parts(rast, poly, resolution, nband);
$$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE;

--@ availability: unreleased
--@ availability: 4.1.1
CREATE OR REPLACE FUNCTION h3_raster_summary_clip(
rast raster,
resolution integer,
Expand All @@ -315,7 +315,7 @@ COMMENT ON FUNCTION
h3_raster_summary_clip(raster, integer, integer)
IS 'Returns `h3_raster_summary_stats` for each H3 cell in raster for a given band. Clips the raster by H3 cell geometries and processes each part separately.';

--@ availability: unreleased
--@ availability: 4.1.1
CREATE OR REPLACE FUNCTION h3_raster_summary_centroids(
rast raster,
resolution integer,
Expand Down Expand Up @@ -360,7 +360,7 @@ AS $$
FROM __h3_raster_polygon_subpixel_cell_values(rast, poly, resolution, nband) t;
$$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE;

--@ availability: unreleased
--@ availability: 4.1.1
CREATE OR REPLACE FUNCTION h3_raster_summary_subpixel(
rast raster,
resolution integer,
Expand All @@ -384,7 +384,7 @@ COMMENT ON FUNCTION
h3_raster_summary_subpixel(raster, integer, integer)
IS 'Returns `h3_raster_summary_stats` for each H3 cell in raster for a given band. Assumes H3 cell is smaller than a pixel. Finds corresponding pixel for each H3 cell in raster.';

--@ availability: unreleased
--@ availability: 4.1.1
CREATE OR REPLACE FUNCTION h3_raster_summary(
rast raster,
resolution integer,
Expand Down Expand Up @@ -493,14 +493,14 @@ IS 'Returns `h3_raster_summary_stats` for each H3 cell in raster for a given ban
--| ```

-- NOTE: `count` can be < 1 when cell area is less than pixel area
--@ availability: unreleased
--@ availability: 4.1.1
CREATE TYPE h3_raster_class_summary_item AS (
val integer,
count double precision,
area double precision
);

--@ availability: unreleased
--@ availability: 4.1.1
CREATE OR REPLACE FUNCTION h3_raster_class_summary_item_to_jsonb(
item h3_raster_class_summary_item)
RETURNS jsonb
Expand All @@ -526,7 +526,7 @@ AS $$
s1.area + s2.area;
$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE;

--@ availability: unreleased
--@ availability: 4.1.1
CREATE AGGREGATE h3_raster_class_summary_item_agg(h3_raster_class_summary_item) (
stype = h3_raster_class_summary_item,
sfunc = __h3_raster_class_summary_item_agg_transfn,
Expand Down Expand Up @@ -565,7 +565,7 @@ AS $$
FROM summary;
$$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE;

--@ availability: unreleased
--@ availability: 4.1.1
CREATE OR REPLACE FUNCTION h3_raster_class_summary_clip(
rast raster,
resolution integer,
Expand Down Expand Up @@ -607,7 +607,7 @@ AS $$
GROUP BY 1, 2;
$$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE;

--@ availability: unreleased
--@ availability: 4.1.1
CREATE OR REPLACE FUNCTION h3_raster_class_summary_centroids(
rast raster,
resolution integer,
Expand Down Expand Up @@ -645,7 +645,7 @@ AS $$
FROM __h3_raster_polygon_subpixel_cell_values(rast, poly, resolution, nband);
$$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE;

--@ availability: unreleased
--@ availability: 4.1.1
CREATE OR REPLACE FUNCTION h3_raster_class_summary_subpixel(
rast raster,
resolution integer,
Expand All @@ -669,7 +669,7 @@ COMMENT ON FUNCTION
h3_raster_class_summary_subpixel(raster, integer, integer)
IS 'Returns `h3_raster_class_summary_item` for each H3 cell and value for a given band. Assumes H3 cell is smaller than a pixel. Finds corresponding pixel for each H3 cell in raster.';

--@ availability: unreleased
--@ availability: 4.1.1
CREATE OR REPLACE FUNCTION h3_raster_class_summary(
rast raster,
resolution integer,
Expand Down
Loading

0 comments on commit 989415f

Please sign in to comment.