[Git][debian-gis-team/postgis][experimental] Add upstream patch to fix flatgeobuf test failure.

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Sat Nov 27 15:19:42 GMT 2021



Bas Couwenberg pushed to branch experimental at Debian GIS Project / postgis


Commits:
bcd655c8 by Bas Couwenberg at 2021-11-27T15:58:12+01:00
Add upstream patch to fix flatgeobuf test failure.

- - - - -


4 changed files:

- debian/changelog
- − debian/patches/flatgeobuf.patch
- + debian/patches/mr63-flatgeobuf.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+postgis (3.2.0~beta2+dfsg-1~exp2) UNRELEASED; urgency=medium
+
+  * Add upstream patch to fix flatgeobuf test failure.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Sat, 27 Nov 2021 15:57:55 +0100
+
 postgis (3.2.0~beta2+dfsg-1~exp1) experimental; urgency=medium
 
   * New upstream beta release.


=====================================
debian/patches/flatgeobuf.patch deleted
=====================================
@@ -1,42 +0,0 @@
-Description: Disable unreliable tests.
-Author: Bas Couwenberg <sebastic at debian.org>
-Bug: https://trac.osgeo.org/postgis/ticket/5014
-
---- a/regress/core/flatgeobuf.sql
-+++ b/regress/core/flatgeobuf.sql
-@@ -32,14 +32,16 @@ select 'P3', id, ST_AsText(geom) from ST
- select 'P4', id, ST_AsEWKT(geom) from ST_FromFlatGeobuf(null::flatgeobuf_t1, (
-     select ST_AsFlatGeobuf(q) fgb from (select ST_SetSRID(ST_MakePoint(-71.1043443253471, 42.3150676015829),4326)) q)
- );
---- 2D Point with SRID and index
--select 'P5', id, ST_AsEWKT(geom) from ST_FromFlatGeobuf(null::flatgeobuf_t1, (
--    select ST_AsFlatGeobuf(q, true) fgb from (select ST_SetSRID(ST_MakePoint(-71.1043443253471, 42.3150676015829),4326)) q)
--);
---- Empty Point
--select 'P6', id, ST_AsEWKT(geom) from ST_FromFlatGeobuf(null::flatgeobuf_t1, (
--    select ST_AsFlatGeobuf(q, true) fgb from (select ST_GeomFromText('POINT EMPTY')) q)
--);
-+-- Unreliable test: https://trac.osgeo.org/postgis/ticket/5014
-+-- -- 2D Point with SRID and index
-+-- select 'P5', id, ST_AsEWKT(geom) from ST_FromFlatGeobuf(null::flatgeobuf_t1, (
-+--     select ST_AsFlatGeobuf(q, true) fgb from (select ST_SetSRID(ST_MakePoint(-71.1043443253471, 42.3150676015829),4326)) q)
-+-- );
-+-- Unreliable test: https://trac.osgeo.org/postgis/ticket/5014
-+-- -- Empty Point
-+-- select 'P6', id, ST_AsEWKT(geom) from ST_FromFlatGeobuf(null::flatgeobuf_t1, (
-+--     select ST_AsFlatGeobuf(q, true) fgb from (select ST_GeomFromText('POINT EMPTY')) q)
-+-- );
- 
- -- 2D LineString
- select 'L1', id, ST_AsText(geom) from ST_FromFlatGeobuf(null::flatgeobuf_t1, (
---- a/regress/core/flatgeobuf_expected
-+++ b/regress/core/flatgeobuf_expected
-@@ -5,8 +5,6 @@ P1|0|POINT(1.1 2.1)
- P2|0|POINT Z (1.1 2.11 3.2)
- P3|0|POINT ZM (1.1 2.12 3.2 4.3)
- P4|0|SRID=4326;POINT(-71.1043443253471 42.3150676015829)
--P5|0|SRID=4326;POINT(-71.1043443253471 42.3150676015829)
--P6|0|
- L1|0|LINESTRING(1 2,3 4)
- L2|0|LINESTRING Z (1 2 3,3 4 5)
- L3|0|LINESTRING ZM (1 2 3 5,3 4 5 6)


=====================================
debian/patches/mr63-flatgeobuf.patch
=====================================
@@ -0,0 +1,34 @@
+Description: Fix use of vector after out of local scope
+Author: Björn Harrtell <bjorn at wololo.org>
+Origin: https://git.osgeo.org/gitea/postgis/postgis/pulls/63
+Bug: https://trac.osgeo.org/postgis/ticket/5014
+
+--- a/deps/flatgeobuf/flatgeobuf_c.cpp
++++ b/deps/flatgeobuf/flatgeobuf_c.cpp
+@@ -70,7 +70,6 @@ int flatgeobuf_encode_header(ctx *ctx)
+             columns.push_back(CreateColumnDirect(fbb, c->name, (ColumnType) c->type));
+         }
+     }
+-
+     if (columns.size() > 0)
+         pColumns = &columns;
+ 
+@@ -78,11 +77,16 @@ int flatgeobuf_encode_header(ctx *ctx)
+     if (ctx->srid > 0)
+         crs = CreateCrsDirect(fbb, nullptr, ctx->srid);
+ 
++    std::vector<double> envelope;
+     std::vector<double> *pEnvelope = nullptr;
+     if (ctx->has_extent) {
+-        std::vector<double> envelope = { ctx->xmin, ctx->ymin, ctx->xmax, ctx->ymax };
+-        pEnvelope = &envelope;
++        envelope.push_back(ctx->xmin);
++        envelope.push_back(ctx->ymin);
++        envelope.push_back(ctx->xmax);
++        envelope.push_back(ctx->ymax);
+     }
++    if (envelope.size() > 0)
++        pEnvelope = &envelope;
+ 
+     const auto header = CreateHeaderDirect(
+         fbb, ctx->name, pEnvelope, (GeometryType) ctx->geometry_type, ctx->has_z, ctx->has_m, ctx->has_t, ctx->has_tm, pColumns, ctx->features_count, ctx->index_node_size, crs);


=====================================
debian/patches/series
=====================================
@@ -1,4 +1,4 @@
 relax-test-timing-constraints.patch
 chaikin
 incorrect-path-for-interpreter.patch
-flatgeobuf.patch
+mr63-flatgeobuf.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/postgis/-/commit/bcd655c8cac2b3a93045e04a870d61525c93c5cb

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/postgis/-/commit/bcd655c8cac2b3a93045e04a870d61525c93c5cb
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20211127/fb81db66/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list