[postgis-devel] 1.3.4rc1
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Wed Oct 29 03:30:22 PDT 2008
Courtin Olivier wrote:
>> So this only leaves the question of would changing the meaning of the
>> function in this way cause
>> you great problems? Given that most data should be within a similar
>> area, I think specifying a
>> slightly different fixed precision should give you a similar result as
>> you have now.
>
> Problem mainly occurs when i begin to reproject with PostGIS, for example:
>
> SELECT st_asgeojson(transform(geometryfromtext('POINT(1000 2300000)',
> 27582), 4326), 5);
> {"type":"Point","coordinates":[-5.61668,47.42663]}
>
> In this case, i 'know' that output will be in Decimal Degrees, so 5
> decimal digits enough.
Right, I think I see what you're trying to do. I would personally prefer
using significant figures, but I suspect that the GeoJSON code may have
a slightly different use case for use over the web.
I think the best way to get around this for 1.3.4 will be to re-write
the regression tests so that each one specifies a precision that
restricts the floating point numbers to a maximum of 15 significant
digits for each individual test. I'm fairly tight on time at the moment,
so would you be able to post a patch with the altered regression tests
along with a documentation section detailing the change of precision
from significant figures to decimal places? I will then try this on
Win32 later this evening.
ATB,
Mark.
--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
More information about the postgis-devel
mailing list