Opened 8 years ago

Closed 8 years ago

#3688 closed defect (fixed)

ST_AsLatLonText does not round numbers as expected

Reported by: mwtoews Owned by: strk
Priority: medium Milestone: PostGIS 2.3.2
Component: liblwgeom Version: master
Keywords: Cc:

Description

For example

SELECT ST_AsLatLonText('POINT (76.6 -76.6)');

returns

76°35'60.000"S 76°35'60.000"E

While this is technically correct, 60 seconds is not expected. An expected result would be:

76°36'0.000"S 76°36'0.000"E

Change History (13)

comment:2 by strk, 8 years ago

Status: newassigned

comment:3 by strk, 8 years ago

In 15288:

ST_AsLatLonText: round minutes

Patch by Mike Toews, see #3688

comment:4 by strk, 8 years ago

Resolution: fixed
Status: assignedclosed

In 15289:

ST_AsLatLonText: round minutes [2.3 backport]

Patch by Mike Toews, closes #3688

comment:5 by robe, 8 years ago

Resolution: fixed
Status: closedreopened

comment:6 by robe, 8 years ago

This seems to be triggering an eror on winnie. I'm rerunning now but at least for trunk been getting this on the 9.3 and 9.6 32-bit runs:

Suite: printing
  Test: test_lwprint_default_format ...
Assert failed:
	76°35'60.000"S 76°35'60.000"E	(actual)
	76°36'0.000"S 76°36'0.000"E	(expected)
FAILED
    1. cu_print.c:33  - CU_ASSERT_STRING_EQUAL(actual,expected)

I'm checking to see if others have the same issue. Given that I didn't run into this issue on my local (and I usually only bother testing 64-bit), I think this might be a 32-bit only issue.

Last edited 8 years ago by robe (previous) (diff)

comment:7 by robe, 8 years ago

Priority: mediumblocker

comment:8 by robe, 8 years ago

Priority: blockermedium

just occurred to me the 32-bit answer just returns the old answers so not critical.

comment:9 by robe, 8 years ago

Any chance we can have this resolved before next Wednesday? I'd like to release 2.3.2 sometime next week and can't be having 32-bits failing.

I guess I could just disable this test on 2.3 though I'd rather not.

comment:10 by strk, 8 years ago

Regina I've read there's a patch waiting for you (on github?). BTW, I think thre's a jenkins plugin for GitHub, in case you want to try at having Jenkins build the pull requests placed there.

comment:11 by robe, 8 years ago

Yah I saw the patch, just haven't gotten around to testing it yet. Should later today. I know about the plugin, just not energized enough to fiddle with it.

comment:12 by robe, 8 years ago

In 15295:

Fix for 32-bit lwprint to support ST_AsLatLonText
References #3688 for PostGIS 2.3.2

comment:13 by robe, 8 years ago

Resolution: fixed
Status: reopenedclosed

In 15296:

Fix for 32-bit lwprint to support ST_AsLatLonText
Closes #3688 for PostGIS 2.4 (trunk)

Note: See TracTickets for help on using tickets.