[postgis-tickets] [SCM] PostGIS branch master updated. 3.2.0beta2-7-g48693e132
git at osgeo.org
git at osgeo.org
Sat Nov 27 14:05:40 PST 2021
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via 48693e132c05008ebddfc7db4affc41e943b52b3 (commit)
via ea3c95682c57d39783b1480192594b1506770c28 (commit)
from d71751919c84ae83fa32268197caced462154ab2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 48693e132c05008ebddfc7db4affc41e943b52b3
Merge: d71751919 ea3c95682
Author: bjornharrtell <bjorn at wololo.org>
Date: Sat Nov 27 14:05:39 2021 -0800
Merge pull request 'Add missing offset recalc' (!65) from bjornharrtell/postgis:issue-5029 into master
Reviewed-on: https://git.osgeo.org/gitea/postgis/postgis/pulls/65
commit ea3c95682c57d39783b1480192594b1506770c28
Author: Björn Harrtell <bjorn at wololo.org>
Date: Sat Nov 27 23:04:24 2021 +0100
Add missing offset recalc
diff --git a/deps/flatgeobuf/flatgeobuf_c.cpp b/deps/flatgeobuf/flatgeobuf_c.cpp
index 7c61534a2..bf9b8251e 100644
--- a/deps/flatgeobuf/flatgeobuf_c.cpp
+++ b/deps/flatgeobuf/flatgeobuf_c.cpp
@@ -201,6 +201,13 @@ void flatgeobuf_create_index(ctx *ctx)
ctx->offset = sizeof(signed int) + FLATGEOBUF_MAGICBYTES_SIZE;
// write new header
flatgeobuf_encode_header(ctx);
+ // calculate new offsets
+ uint64_t featureOffset = 0;
+ for (auto item : items) {
+ auto featureItem = std::static_pointer_cast<FeatureItem>(item);
+ featureItem->nodeItem.offset = featureOffset;
+ featureOffset += featureItem->size;
+ }
// create and write index
PackedRTree tree(items, extent, ctx->index_node_size);
const auto writeData = [&ctx] (const void *data, const size_t size) {
-----------------------------------------------------------------------
Summary of changes:
deps/flatgeobuf/flatgeobuf_c.cpp | 7 +++++++
1 file changed, 7 insertions(+)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list