[postgis-tickets] r15359 - Expand tests to verify redundant value encoding fix
bjorn at wololo.org
bjorn at wololo.org
Fri Apr 21 10:21:10 PDT 2017
Author: bjornharrtell
Date: 2017-04-21 10:21:10 -0700 (Fri, 21 Apr 2017)
New Revision: 15359
Modified:
trunk/postgis/mvt.c
trunk/regress/mvt.sql
trunk/regress/mvt_expected
Log:
Expand tests to verify redundant value encoding fix
Closes #3741
Modified: trunk/postgis/mvt.c
===================================================================
--- trunk/postgis/mvt.c 2017-04-21 16:58:56 UTC (rev 15358)
+++ trunk/postgis/mvt.c 2017-04-21 17:21:10 UTC (rev 15359)
@@ -43,7 +43,7 @@
};
struct mvt_kv_string_value {
- const char *string_value;
+ char *string_value;
uint32_t id;
UT_hash_handle hh;
};
Modified: trunk/regress/mvt.sql
===================================================================
--- trunk/regress/mvt.sql 2017-04-21 16:58:56 UTC (rev 15358)
+++ trunk/regress/mvt.sql 2017-04-21 17:21:10 UTC (rev 15359)
@@ -92,7 +92,19 @@
ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)), 4096, 0, false) AS geom
UNION
SELECT 'test' AS c1, ST_AsMVTGeom(ST_GeomFromText('POINT(26 18)'),
+ ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)), 4096, 0, false) AS geom
+ UNION
+ SELECT 'othertest' AS c1, ST_AsMVTGeom(ST_GeomFromText('POINT(26 18)'),
ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)), 4096, 0, false) AS geom) AS q;
+SELECT 'TA8', encode(ST_AsMVT('test', 4096, 'geom', q), 'base64') FROM (
+ SELECT 1 AS c1, ST_AsMVTGeom(ST_GeomFromText('POINT(25 17)'),
+ ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)), 4096, 0, false) AS geom
+ UNION
+ SELECT 1 AS c1, ST_AsMVTGeom(ST_GeomFromText('POINT(26 18)'),
+ ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)), 4096, 0, false) AS geom
+ UNION
+ SELECT 2 AS c1, ST_AsMVTGeom(ST_GeomFromText('POINT(26 18)'),
+ ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)), 4096, 0, false) AS geom) AS q;
-- unsupported input
SELECT 'TU2';
Modified: trunk/regress/mvt_expected
===================================================================
--- trunk/regress/mvt_expected 2017-04-21 16:58:56 UTC (rev 15358)
+++ trunk/regress/mvt_expected 2017-04-21 17:21:10 UTC (rev 15359)
@@ -23,7 +23,10 @@
TA4|GjMKBHRlc3QSDBICAAAYASIECTLePxIMEgIAARgBIgQJMt4/GgJjMSICKAEiAigCKIAgeAI=
TA5|Gi8KBHRlc3QSDhIEAAABARgBIgQJMt4/GgJjMRoCYzIiAigBIgYKBGFiY2QogCB4Ag==
TA6|GisKBHRlc3QSDhIEAAABARgBIgQJMt4/GgJjMRoCYzIiAigBIgIwASiAIHgC
-TA7|GjMKBHRlc3QSDBICAAAYASIECTLePxIMEgIAABgBIgQJNNw/GgJjMSIGCgR0ZXN0KIAgeAI=
+TA7|Gk4KBHRlc3QSDBICAAAYASIECTTcPxIMEgIAARgBIgQJMt4/EgwSAgABGAEiBAk03D8aAmMxIgsK
+CW90aGVydGVzdCIGCgR0ZXN0KIAgeAI=
+TA8|GkUKBHRlc3QSDBICAAAYASIECTLePxIMEgIAARgBIgQJNNw/EgwSAgACGAEiBAk03D8aAmMxIgIo
+ASICKAEiAigCKIAgeAI=
TU2
ERROR: pgis_asmvt_transfn: parameter row cannot be other than a rowtype
TU3
More information about the postgis-tickets
mailing list