From: Paul Ramsey Date: Fri, 13 Nov 2015 20:10:02 +0000 (+0000) Subject: #3368, twkb on 32bit architectures X-Git-Tag: 2.3.0beta1~382 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a30b929b1b8fdb7fd8a06e0212cc5288cb82722;p=postgis #3368, twkb on 32bit architectures git-svn-id: http://svn.osgeo.org/postgis/trunk@14380 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwout_twkb.c b/liblwgeom/lwout_twkb.c index ae542e824..c3c3658c6 100644 --- a/liblwgeom/lwout_twkb.c +++ b/liblwgeom/lwout_twkb.c @@ -151,7 +151,7 @@ static int ptarray_to_twkb_buf(const POINTARRAY *pa, TWKB_GLOBALS *globals, TWKB /* from the last point but instead the distance from our */ /* last accumulated point. This is important to not build up an */ /* accumulated error when rounding the coordinates */ - nextdelta[j] = (int64_t) lround(globals->factor[j] * dbl_ptr[j]) - ts->accum_rels[j]; + nextdelta[j] = (int64_t) llround(globals->factor[j] * dbl_ptr[j]) - ts->accum_rels[j]; LWDEBUGF(4, "deltavalue: %d, ", nextdelta[j]); diff += llabs(nextdelta[j]); } diff --git a/regress/tickets.sql b/regress/tickets.sql index 03915fbb8..74494e993 100644 --- a/regress/tickets.sql +++ b/regress/tickets.sql @@ -927,5 +927,8 @@ ORDER BY wkt; SELECT '#3367', ST_AsText(ST_RemoveRepeatedPoints('POLYGON EMPTY'::geometry)); +SELECT '#3368', ST_AsTWKB('0106000000010000000103000000010000001F0000007CCD1788E93A68C1B264ED35E160594198825A8FEA3A68C198868434E16059413A4E5BD5EB3A68C11A92C936E1605941225C7746FA3A68C147BCA921E1605941E49C3DE8123B68C184E964FDE0605941FE87AA821A3B68C1F50EFBF1E0605941C2BA16591A3B68C11312C4C0E2605941E8ACC5C8193B68C1848C95B6E9605941AF164E57193B68C1E4175CB5F0605941ADE0D204193B68C1030DF2BAF7605941CA6056DC183B68C13C4554B9FC605941FCA886C3183B68C1062253B901615941E89667BA183B68C139D028BA06615941E62E78B7183B68C1612D445F1F615941B3321071183B68C14FECFED82C6159410789236D183B68C165EF39352D615941B7C22A65183B68C134B466902D615941F7D33559183B68C16725AFB130615941CFA6FEE9163B68C111D8661631615941E999DE9B163B68C15112D66D31615941DE3D404A163B68C1C87B53B73161594193A6C1F5153B68C1FEBD50F2316159416E7A069F153B68C16D985B1E32615941C8B4B646153B68C1B0BD1E3B3261594148607DED143B68C17B78624832615941C9E5BF020F3B68C153352CBF32615941AAE3C27FEA3A68C183B40EAE3261594119EB767CE93A68C1B4F989A932615941C8120C81E73A68C164B064B1326159411F66AF89E73A68C1836D233EE16059417CCD1788E93A68C1B264ED35E1605941'::geometry,3) AS geom; + + -- Clean up DELETE FROM spatial_ref_sys; diff --git a/regress/tickets_expected b/regress/tickets_expected index 69144dcf3..65a50a65e 100644 --- a/regress/tickets_expected +++ b/regress/tickets_expected @@ -281,3 +281,4 @@ ERROR: invalid GML representation #3356|LineString[] with 2 points|LineString[GS] with 2 points|LineString[GS] with 2 points #3356|LineString[B] with 3 points|LineString[BGS] with 3 points|LineString[BGS] with 3 points #3367|POLYGON EMPTY +#3368|\x660001011fb98788d35ed6fbcdc831c580012b959f01469d8d0e9305ff8618ed08b1b607e302a614fe70bc4682b303b4379ab503a228eeb603e2138eb802900cc0b802ba04dab802b801a8840cb0229cca06f401c216f403a016ea05d0c301a8b301cc189226ac15ee27f811a029b40eac2ae00a902b8407c82b9e03d0e305801dfad3239504ce7e8d01e2f701f6019b04d1e2279bf901ff01