Re: [Jts-topo-suite-user] Geometry Precision
Brought to you by:
dr_jts
From: Martin D. <mtn...@gm...> - 2013-11-25 17:44:45
|
You can of course get the PrecisionModel from the GeometryFactory and check its scale factor. But this isn't enforced in any real way, and often clients use full FLOATING precision anyway, even if the data does not support this level of precision. Checking precision is a bit complex and subtle. You can't check the numbers in the coordinates, because you can't tell if say 1 represents a value with a single digit of precision or the much more exact value 1.0000000000000000... If what you are really interested in is whether reducing the precision might affect the topology of a geometry, then you might be able to use the MinimumClearance algorithm. This measures how close the two closest facets in a geometry are (points or segments). In theory precision reduction below this value should not affect the topology. I'm not sure this is an exact theory, however. If you try this post back to report how well this works. On Sun, Nov 24, 2013 at 3:00 AM, Brian Sanjeewa Rupasinghe < ji...@gm...> wrote: > Hi, > > Before reducing precision of a geometry, is there any method to check the > current precision of a Geometry? > > > > |