]> granicus.if.org Git - postgis/commitdiff
ST_AsMVT Normalize output to make sure it will be identical regardless of GEOS version
authorBjörn Harrtell <bjorn@wololo.org>
Thu, 4 May 2017 18:40:26 +0000 (18:40 +0000)
committerBjörn Harrtell <bjorn@wololo.org>
Thu, 4 May 2017 18:40:26 +0000 (18:40 +0000)
References #3749

git-svn-id: http://svn.osgeo.org/postgis/trunk@15389 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/mvt.c
regress/mvt_expected

index 8495174e400396292c32f10480523fa38ed6b209..74bee5fcee78b016d1092c4624dced61a2dd39d4 100644 (file)
@@ -711,7 +711,7 @@ LWGEOM *mvt_geom(LWGEOM *lwgeom, GBOX *gbox, uint32_t extent, uint32_t buffer,
        if (lwgeom_out == NULL || lwgeom_is_empty(lwgeom_out))
                return NULL;
 
-       return lwgeom_out;
+       return lwgeom_normalize(lwgeom_out);
 }
 
 /**
index b78f18d6e84ae231f8000d548b1d6135575e1919..3e32efda945a19c3078f29d8168a1f067321f555 100644 (file)
@@ -1,20 +1,20 @@
 PG1|POINT(1 4094)
 PG2|POINT(0 4095)
 PG3|POINT(2 4092)
-PG4|MULTIPOLYGON(((5 4096,10 4096,10 4091,5 4096)),((5 4096,0 4096,0 4101,5 4096)))
+PG4|MULTIPOLYGON(((5 4096,10 4096,10 4091,5 4096)),((0 4096,0 4101,5 4096,0 4096)))
 PG5|
-PG6|POLYGON((894 2704,2791 594,600 594,894 2704))
+PG6|POLYGON((600 594,894 2704,2791 594,600 594))
 PG7|POLYGON((1251 1904,1252 1905,1253 1906,1253 1905,1252 1904,1251 1904))
-PG8|MULTIPOLYGON(((5 4096,10 4096,10 4091,5 4096)),((5 4096,0 4096,0 4101,5 4096)))
-PG9|POLYGON((0 4096,4096 4096,4096 0,0 0,0 4096))
+PG8|MULTIPOLYGON(((5 4096,10 4096,10 4091,5 4096)),((0 4096,0 4101,5 4096,0 4096)))
+PG9|POLYGON((0 0,0 4096,4096 4096,4096 0,0 0))
 TG1|GiEKBHRlc3QSDBICAAAYASIECTLePxoCYzEiAigBKIAgeAI=
-TG2|GiMKBHRlc3QSDhICAAAYASIGETLePwIBGgJjMSICKAEogCB4Ag==
+TG2|GiMKBHRlc3QSDhICAAAYASIGETTcPwECGgJjMSICKAEogCB4Ag==
 TG3|GiYKBHRlc3QSERICAAAYAiIJCQCAQArQD88PGgJjMSICKAEogCB4Ag==
 TG4|GioKBHRlc3QSFRICAAAYAiINCQCAQBLoB+cH6AfnBxoCYzEiAigBKIAgeAI=
-TG5|GjgKBHRlc3QSIxICAAAYAiIbCQL+PxLoB+cH6AfnBwnND84PEugH5wfoB+cHGgJjMSICKAEogCB4
+TG5|GjgKBHRlc3QSIxICAAAYAiIbCQT8PxLoB+cH6AfnBwnRD9IPEugH5wfoB+cHGgJjMSICKAEogCB4
 Ag==
-TG6|GjIKBHRlc3QSHRICAAAYAyIVCUbsPxoURTsKCSgPCRQTEh4JCR4PGgJjMSICKAEogCB4Ag==
-TG7|Gj0KBHRlc3QSKBICAAAYAyIgCVCwPxInCTIeDwkxCSITCgAoKAoeHQ8JHQASEwoAEw8aAmMxIgIo
+TG6|GjIKBHRlc3QSHRICAAAYAyIVCRTYPxoyFBRFOwoPCQoUEh4JCR4PGgJjMSICKAEogCB4Ag==
+TG7|Gj0KBHRlc3QSKBICAAAYAyIgCRTEPyIAKCgKHh0xHQ8JABQSFAoTCg8JADsSMh4JEw8aAmMxIgIo
 ASiAIHgC
 TG8|GiEKBHRlc3QSDBICAAAYASIECTLePxoCYzEiAigBKIAgeAI=
 TG9|GiMKBHRlc3QSDhICAAAYASIGETLeP2VGGgJjMSICKAEogCB4Ag==