Skip navigation links
org.opengis.geometry

Interface PrecisionFactory

    • Method Detail

      • createFixedPrecision

        Precision createFixedPrecision(PrecisionType code,
                                       double scale)
        Creates a Precision of the provided type, scale is used for PrecisionType.FIXED.

        Here are a couple of examples:

        
         factory.createPrecision(PrecisionType.FIXED, 1000); // three significant digits
         factory.createPrecision(PrecisionType.FLOAT, 0); // float precision - 6 digits
         factory.createPrecision(PrecisionType.DOUBLE, 0); // double precision - 16 digits
         
        Parameters:
        type - PercisionType The rounding policy used
        scale - Multiplying factor used to obtain a precise coordinate
        Returns:
        Precision capable of rounding as described by type and scale

Copyright © 1996–2019 Geotools. All rights reserved.