Class GeoSPARQLOperations


  • public class GeoSPARQLOperations
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Model applyDefaultGeometry​(java.io.File inputFile, Lang inputLang)
      Apply hasDefaultGeometry for every Feature with a single hasGeometry property.
      static void applyDefaultGeometry​(java.io.File inputFile, Lang inputLang, java.io.File outputFile, Lang outputLang)
      Apply hasDefaultGeometry for every Feature with a single hasGeometry property.
      static void applyDefaultGeometry​(Dataset dataset)
      Apply hasDefaultGeometry for every Feature with a single hasGeometry property.
      static void applyDefaultGeometry​(Model model)
      Apply hasDefaultGeometry for every Feature with a single hasGeometry property.
      static void applyDefaultGeometryFolder​(java.io.File inputFolder, Lang inputLang, java.io.File outputFolder, Lang outputLang)
      Apply (to a folder of RDF files) hasDefaultGeometry for every Feature with a single hasGeometry property.
      static void applyInferencing​(Dataset dataset)
      Apply GeoSPARQL inferencing using GeoSPARPQL v1.0 (corrected version) and RDFS reasoner.
      Statements will be added to the dataset.
      static void applyInferencing​(Model dataModel)
      Apply GeoSPARQL inferencing using GeoSPARPQL v1.0 (corrected version) and RDFS reasoner.
      Statements will be added to the dataModel.
      static void applyInferencing​(Model geosparqlSchema, Dataset dataset)
      Apply GeoSPARQL inferencing using schema model and RDFS reasoner.
      Statements will be added to the Dataset.
      static void applyInferencing​(Model geosparqlSchema, Model model)
      Apply GeoSPARQL inferencing using schema model and RDFS reasoner.
      Statements will be added to the Model.
      static void applyInferencing​(Model geosparqlSchema, Model model, java.lang.String graphName)
      Apply GeoSPARQL inferencing using schema model and RDFS reasoner.
      Statements will be added to the Model.
      Graph name supplied for logging purposes only.
      static void applyPrefixes​(Dataset dataset)
      Apply a set of commonly used prefixes for GeoSPARQL URIs to the whole Dataset.
      static void applyPrefixes​(Model model)
      Apply a set of commonly used prefixes for GeoSPARQL URIs to the Model.
      static void applySubPropertyDefaultGeometry​(Model model)
      Every subProperty of hasGeometry is made a subProperty of hasDefaultGeometry.
      Assumption that each Feature has a single hasGeometry property.
      Requires RDFS inferencing to propagate through the data.
      static double cleanUpPrecision​(double value)
      Converts value according to the configured precision.
      static Dataset convert​(Dataset dataset)
      Convert the input dataset to the most frequent coordinate reference system and default datatype.
      static Dataset convert​(Dataset dataset, java.lang.String outputSrsURI)
      Convert the input dataset to the output coordinate reference system.
      static Dataset convert​(Dataset inputDataset, java.lang.String outputSrsURI, GeometryDatatype outputDatatype)
      Convert the input dataset to the output coordinate reference system and geometry literal datatype.
      static Dataset convert​(Dataset dataset, GeometryDatatype outputDatatype)
      Convert the input dataset to the output geometry literal datatype.
      static Model convert​(Model inputModel)
      Convert the input model to the most frequent coordinate reference system and default datatype.
      static Model convert​(Model inputModel, java.lang.String outputSrsURI)
      Convert the input model to the output coordinate reference system.
      static Model convert​(Model inputModel, java.lang.String outputSrsURI, java.lang.String outputDatatypeURI)
      Convert the input model to the output coordinate reference system and geometry literal datatype.
      static Model convert​(Model inputModel, java.lang.String outputSrsURI, GeometryDatatype outputDatatype)
      Convert the input model to the output coordinate reference system and geometry literal datatype.
      static Model convert​(Model inputModel, GeometryDatatype outputDatatype)
      Convert the input model to the output geometry literal datatype.
      static void convertFile​(java.io.File inputFile, Lang inputLang, java.io.File outputFile, Lang outputLang)
      Converts file between serialisations.
      static void convertFile​(java.io.File inputFile, Lang inputLang, java.io.File outputFile, Lang outputLang, java.lang.String outputSrsURI)
      Converts all geometry literals (WKT or GML) from current SRS to the specified SRS.
      static void convertFile​(java.io.File inputFile, Lang inputLang, java.io.File outputFile, Lang outputLang, java.lang.String outputSrsURI, GeometryDatatype outputDatatype)
      Converts all geometry literals (WKT or GML) from current SRS to the specified SRS and datatype.
      static void convertFile​(java.io.File inputFile, Lang inputLang, java.io.File outputFile, Lang outputLang, GeometryDatatype outputDatatype)
      Converts all geometry literals (WKT or GML) to the specified datatype.
      static void convertFolder​(java.io.File inputFolder, Lang inputLang, java.io.File outputFolder, Lang outputLang)
      Only RDF files should be in the input folder and must all be the same RDF language.
      static void convertFolder​(java.io.File inputFolder, Lang inputLang, java.io.File outputFolder, Lang outputLang, java.lang.String outputSrsURI)
      Only RDF files should be in the input folder and must all be the same RDF language.
      static void convertFolder​(java.io.File inputFolder, Lang inputLang, java.io.File outputFolder, Lang outputLang, java.lang.String outputSrsURI, GeometryDatatype outputDatatype)
      Only RDF files should be in the input folder and must all be the same RDF language.
      static void convertFolder​(java.io.File inputFolder, Lang inputLang, java.io.File outputFolder, Lang outputLang, GeometryDatatype outputDatatype)
      Only RDF files should be in the input folder and must all be the same RDF language.
      static java.lang.String convertGeometryLiteral​(java.lang.String geometryLiteral, java.lang.String outputSrsURI, GeometryDatatype outputDatatype)
      Convert a string representation of a geometry literal to another coordinate reference system.
      static java.util.List<java.lang.String> convertGeometryLiterals​(java.util.List<java.lang.String> geometryLiterals, java.lang.String outputSrsURI, GeometryDatatype outputDatatype)
      Convert a list of strings representation of geometry literals to another coordinate reference system.
      static Dataset convertGeometryStructure​(Dataset dataset)
      Convert Geometry Datatypes (WKT, GML, etc.) in Model to GeoSPARQL structure.
      (Subject-property-GeometryLiteral) becomes (Feature-hasGeometry-Geometry) and (Geometry-hasSerialization-GeometryLiteral).
      Original property will be removed from resulting Dataset.
      static Model convertGeometryStructure​(Model model)
      Convert Geometry Datatypes (WKT, GML, etc.) in Model to GeoSPARQL structure.
      (Subject-property-GeometryLiteral) becomes (Feature-hasGeometry-Geometry) and (Geometry-hasSerialization-GeometryLiteral).
      Original property will be removed from resulting Model.
      static Dataset convertGeoPredicates​(Dataset dataset, boolean isRemoveGeoPredicate)
      Convert Geo Predicates (Lat/Lon) in Dataset to WKT Geometry Literal.
      Option to remove Lat and Lon predicates after combining.
      static Model convertGeoPredicates​(Model model, boolean isRemoveGeoPredicates)
      Convert Geo Predicates (Lat/Lon) in Model to WKT Geometry Literal.
      Option to remove Lat and Lon predicates after combining.
      static int countGeometryLiterals​(Dataset dataset)  
      static int countGeometryLiterals​(Model model, java.lang.String graphName)  
      static java.lang.String findModeSRS​(Dataset dataset)
      Find the most frequent SRS URI of Geometry Literals in the dataset.
      static java.lang.String findModeSRS​(Model model)
      Find the most frequent SRS URI of Geometry Literals in the model.
      static Model loadGeoSPARQLSchema()
      Load GeoSPARQL v1.0 (corrected version) as a Model.
      static InfModel prepare()
      Prepare an empty GeoSPARQL model with RDFS reasoning.
      static InfModel prepare​(java.io.InputStream geosparqlSchemaInputStream, Model model, Reasoner reasoner)
      Prepare a model from an existing model with alternative GeoSPARQL schema and Reasoner, e.g.
      static InfModel prepare​(java.io.InputStream inputStream, Reasoner reasoner)
      Prepare a GeoSPARQL model from file with alternative Reasoner, e.g.
      static InfModel prepare​(Model model, Reasoner reasoner)
      Prepare a GeoSPARQL model from an existing model with alternative Reasoner, e.g.
      static InfModel prepareRDFS​(java.io.InputStream inputStream)
      Prepare a GeoSPARQL model from file with RDFS reasoning.
      static InfModel prepareRDFS​(Model model)
      Prepare a GeoSPARQL model from an existing model with RDFS reasoning.
      static boolean validateGeometryLiteral​(Dataset dataset)
      Validate Geometry Literal in Dataset.
      static boolean validateGeometryLiteral​(Model model)
      Validate Geometry Literal in Model.
      static void writeOutputModel​(Model outputModel, java.io.File outputFile, Lang outputLang, java.io.File inputFile)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GeoSPARQLOperations

        public GeoSPARQLOperations()
    • Method Detail

      • applySubPropertyDefaultGeometry

        public static final void applySubPropertyDefaultGeometry​(Model model)
        Every subProperty of hasGeometry is made a subProperty of hasDefaultGeometry.
        Assumption that each Feature has a single hasGeometry property.
        Requires RDFS inferencing to propagate through the data.
        Parameters:
        model -
      • applyDefaultGeometry

        public static final void applyDefaultGeometry​(Dataset dataset)
        Apply hasDefaultGeometry for every Feature with a single hasGeometry property.
        Parameters:
        dataset -
      • applyDefaultGeometry

        public static final void applyDefaultGeometry​(Model model)
        Apply hasDefaultGeometry for every Feature with a single hasGeometry property.
        Parameters:
        model -
      • applyDefaultGeometry

        public static final void applyDefaultGeometry​(java.io.File inputFile,
                                                      Lang inputLang,
                                                      java.io.File outputFile,
                                                      Lang outputLang)
        Apply hasDefaultGeometry for every Feature with a single hasGeometry property.
        Parameters:
        inputFile -
        inputLang -
        outputFile -
        outputLang -
      • applyDefaultGeometry

        public static final Model applyDefaultGeometry​(java.io.File inputFile,
                                                       Lang inputLang)
        Apply hasDefaultGeometry for every Feature with a single hasGeometry property.
        Parameters:
        inputFile -
        inputLang -
        Returns:
        Output model.
      • applyDefaultGeometryFolder

        public static final void applyDefaultGeometryFolder​(java.io.File inputFolder,
                                                            Lang inputLang,
                                                            java.io.File outputFolder,
                                                            Lang outputLang)
        Apply (to a folder of RDF files) hasDefaultGeometry for every Feature with a single hasGeometry property.
        Only RDF files should be in the input folder and must all be the same RDF * language.
        Parameters:
        inputFolder -
        inputLang -
        outputFolder -
        outputLang -
      • loadGeoSPARQLSchema

        public static final Model loadGeoSPARQLSchema()
        Load GeoSPARQL v1.0 (corrected version) as a Model.
        Returns:
        Model containing the schema.
      • applyInferencing

        public static final void applyInferencing​(Dataset dataset)
        Apply GeoSPARQL inferencing using GeoSPARPQL v1.0 (corrected version) and RDFS reasoner.
        Statements will be added to the dataset.
        Parameters:
        dataset -
      • applyInferencing

        public static final void applyInferencing​(Model geosparqlSchema,
                                                  Dataset dataset)
        Apply GeoSPARQL inferencing using schema model and RDFS reasoner.
        Statements will be added to the Dataset.
        Parameters:
        geosparqlSchema -
        dataset -
      • applyInferencing

        public static final void applyInferencing​(Model dataModel)
        Apply GeoSPARQL inferencing using GeoSPARPQL v1.0 (corrected version) and RDFS reasoner.
        Statements will be added to the dataModel.
        Parameters:
        dataModel -
      • applyInferencing

        public static final void applyInferencing​(Model geosparqlSchema,
                                                  Model model)
        Apply GeoSPARQL inferencing using schema model and RDFS reasoner.
        Statements will be added to the Model.
        Parameters:
        geosparqlSchema -
        model -
      • applyInferencing

        public static final void applyInferencing​(Model geosparqlSchema,
                                                  Model model,
                                                  java.lang.String graphName)
        Apply GeoSPARQL inferencing using schema model and RDFS reasoner.
        Statements will be added to the Model.
        Graph name supplied for logging purposes only.
        Parameters:
        geosparqlSchema -
        model -
        graphName -
      • prepare

        public static final InfModel prepare()
        Prepare an empty GeoSPARQL model with RDFS reasoning.
        In-memory indexing applied by default.
        This can be changed by calling GeoSPARQLConfig methods.
        Returns:
        Output model.
      • prepareRDFS

        public static final InfModel prepareRDFS​(Model model)
        Prepare a GeoSPARQL model from an existing model with RDFS reasoning.
        In-memory indexing applied by default.
        This can be changed by calling GeoSPARQLConfig methods.
        Parameters:
        model -
        Returns:
        Output model.
      • prepare

        public static final InfModel prepare​(Model model,
                                             Reasoner reasoner)
        Prepare a GeoSPARQL model from an existing model with alternative Reasoner, e.g. OWL.
        In-memory indexing applied by default.
        This can be changed by calling GeoSPARQLConfig methods.
        Parameters:
        model -
        reasoner -
        Returns:
        Output model.
      • prepareRDFS

        public static final InfModel prepareRDFS​(java.io.InputStream inputStream)
        Prepare a GeoSPARQL model from file with RDFS reasoning.
        In-memory indexing applied by default.
        This can be changed by calling GeoSPARQLConfig methods.
        Parameters:
        inputStream -
        Returns:
        Output model.
      • prepare

        public static final InfModel prepare​(java.io.InputStream inputStream,
                                             Reasoner reasoner)
        Prepare a GeoSPARQL model from file with alternative Reasoner, e.g. OWL.
        In-memory indexing applied by default.
        This can be changed by calling GeoSPARQLConfig methods.
        Parameters:
        inputStream -
        reasoner -
        Returns:
        Output model.
      • prepare

        public static final InfModel prepare​(java.io.InputStream geosparqlSchemaInputStream,
                                             Model model,
                                             Reasoner reasoner)
        Prepare a model from an existing model with alternative GeoSPARQL schema and Reasoner, e.g. OWL.
        In-memory indexing applied by default.
        This can be changed by calling GeoSPARQLConfig methods.
        Parameters:
        geosparqlSchemaInputStream -
        model -
        reasoner -
        Returns:
        Output model.
      • validateGeometryLiteral

        public static final boolean validateGeometryLiteral​(Dataset dataset)
        Validate Geometry Literal in Dataset.
        Parameters:
        dataset -
        Returns:
        Whether dataset is valid.
      • validateGeometryLiteral

        public static final boolean validateGeometryLiteral​(Model model)
        Validate Geometry Literal in Model.
        Parameters:
        model -
        Returns:
        Whether model is valid.
      • findModeSRS

        public static final java.lang.String findModeSRS​(Dataset dataset)
                                                  throws SrsException
        Find the most frequent SRS URI of Geometry Literals in the dataset.
        Parameters:
        dataset -
        Returns:
        SRS URI
        Throws:
        SrsException
      • findModeSRS

        public static final java.lang.String findModeSRS​(Model model)
                                                  throws SrsException
        Find the most frequent SRS URI of Geometry Literals in the model.
        Parameters:
        model -
        Returns:
        SRS URI
        Throws:
        SrsException
      • convertFile

        public static final void convertFile​(java.io.File inputFile,
                                             Lang inputLang,
                                             java.io.File outputFile,
                                             Lang outputLang,
                                             java.lang.String outputSrsURI)
        Converts all geometry literals (WKT or GML) from current SRS to the specified SRS.
        Parameters:
        inputFile -
        inputLang -
        outputFile -
        outputLang -
        outputSrsURI -
      • convertFile

        public static final void convertFile​(java.io.File inputFile,
                                             Lang inputLang,
                                             java.io.File outputFile,
                                             Lang outputLang)
        Converts file between serialisations.
        Parameters:
        inputFile -
        inputLang -
        outputFile -
        outputLang -
      • convertFile

        public static final void convertFile​(java.io.File inputFile,
                                             Lang inputLang,
                                             java.io.File outputFile,
                                             Lang outputLang,
                                             java.lang.String outputSrsURI,
                                             GeometryDatatype outputDatatype)
        Converts all geometry literals (WKT or GML) from current SRS to the specified SRS and datatype.
        Parameters:
        inputFile -
        inputLang -
        outputFile -
        outputLang -
        outputSrsURI -
        outputDatatype -
      • convertFile

        public static final void convertFile​(java.io.File inputFile,
                                             Lang inputLang,
                                             java.io.File outputFile,
                                             Lang outputLang,
                                             GeometryDatatype outputDatatype)
        Converts all geometry literals (WKT or GML) to the specified datatype.
        Parameters:
        inputFile -
        inputLang -
        outputFile -
        outputLang -
        outputDatatype -
      • convertGeometryLiterals

        public static final java.util.List<java.lang.String> convertGeometryLiterals​(java.util.List<java.lang.String> geometryLiterals,
                                                                                     java.lang.String outputSrsURI,
                                                                                     GeometryDatatype outputDatatype)
        Convert a list of strings representation of geometry literals to another coordinate reference system.
        Parameters:
        geometryLiterals -
        outputSrsURI - Coordinate reference system URI
        outputDatatype -
        Returns:
        Output of conversion.
      • writeOutputModel

        public static void writeOutputModel​(Model outputModel,
                                            java.io.File outputFile,
                                            Lang outputLang,
                                            java.io.File inputFile)
      • convertFolder

        public static final void convertFolder​(java.io.File inputFolder,
                                               Lang inputLang,
                                               java.io.File outputFolder,
                                               Lang outputLang,
                                               java.lang.String outputSrsURI)
        Only RDF files should be in the input folder and must all be the same RDF language.
        Parameters:
        inputFolder -
        inputLang -
        outputFolder -
        outputLang -
        outputSrsURI -
      • convertFolder

        public static final void convertFolder​(java.io.File inputFolder,
                                               Lang inputLang,
                                               java.io.File outputFolder,
                                               Lang outputLang)
        Only RDF files should be in the input folder and must all be the same RDF language.
        Parameters:
        inputFolder -
        inputLang -
        outputFolder -
        outputLang -
      • convertFolder

        public static final void convertFolder​(java.io.File inputFolder,
                                               Lang inputLang,
                                               java.io.File outputFolder,
                                               Lang outputLang,
                                               java.lang.String outputSrsURI,
                                               GeometryDatatype outputDatatype)
        Only RDF files should be in the input folder and must all be the same RDF language. Output will be in the specified SRS and datatype/serialisation.
        Parameters:
        inputFolder -
        inputLang -
        outputFolder -
        outputLang -
        outputSrsURI -
        outputDatatype -
      • convertFolder

        public static final void convertFolder​(java.io.File inputFolder,
                                               Lang inputLang,
                                               java.io.File outputFolder,
                                               Lang outputLang,
                                               GeometryDatatype outputDatatype)
        Only RDF files should be in the input folder and must all be the same RDF language. Output will be in the specified datatype/serialisation.
        Parameters:
        inputFolder -
        inputLang -
        outputFolder -
        outputLang -
        outputDatatype -
      • convertGeoPredicates

        public static final Dataset convertGeoPredicates​(Dataset dataset,
                                                         boolean isRemoveGeoPredicate)
        Convert Geo Predicates (Lat/Lon) in Dataset to WKT Geometry Literal.
        Option to remove Lat and Lon predicates after combining.
        Parameters:
        dataset -
        isRemoveGeoPredicate -
        Returns:
        Converted dataset.
      • convertGeoPredicates

        public static final Model convertGeoPredicates​(Model model,
                                                       boolean isRemoveGeoPredicates)
        Convert Geo Predicates (Lat/Lon) in Model to WKT Geometry Literal.
        Option to remove Lat and Lon predicates after combining.
        Parameters:
        model -
        isRemoveGeoPredicates -
        Returns:
        Converted model.
      • convertGeometryStructure

        public static final Dataset convertGeometryStructure​(Dataset dataset)
        Convert Geometry Datatypes (WKT, GML, etc.) in Model to GeoSPARQL structure.
        (Subject-property-GeometryLiteral) becomes (Feature-hasGeometry-Geometry) and (Geometry-hasSerialization-GeometryLiteral).
        Original property will be removed from resulting Dataset.
        Parameters:
        dataset -
        Returns:
        Converted dataset.
      • convertGeometryStructure

        public static final Model convertGeometryStructure​(Model model)
        Convert Geometry Datatypes (WKT, GML, etc.) in Model to GeoSPARQL structure.
        (Subject-property-GeometryLiteral) becomes (Feature-hasGeometry-Geometry) and (Geometry-hasSerialization-GeometryLiteral).
        Original property will be removed from resulting Model.
        Parameters:
        model -
        Returns:
        Converted model.
      • convertGeometryLiteral

        public static final java.lang.String convertGeometryLiteral​(java.lang.String geometryLiteral,
                                                                    java.lang.String outputSrsURI,
                                                                    GeometryDatatype outputDatatype)
        Convert a string representation of a geometry literal to another coordinate reference system.
        Parameters:
        geometryLiteral -
        outputSrsURI - Coordinate reference system URI
        outputDatatype -
        Returns:
        Output of conversion.
      • convert

        public static final Model convert​(Model inputModel)
        Convert the input model to the most frequent coordinate reference system and default datatype.
        Parameters:
        inputModel -
        Returns:
        Output of conversion.
      • convert

        public static final Model convert​(Model inputModel,
                                          java.lang.String outputSrsURI)
        Convert the input model to the output coordinate reference system.
        Parameters:
        inputModel -
        outputSrsURI -
        Returns:
        Output of conversion.
      • convert

        public static final Model convert​(Model inputModel,
                                          GeometryDatatype outputDatatype)
        Convert the input model to the output geometry literal datatype.
        Parameters:
        inputModel -
        outputDatatype -
        Returns:
        Output of conversion.
      • convert

        public static final Model convert​(Model inputModel,
                                          java.lang.String outputSrsURI,
                                          GeometryDatatype outputDatatype)
        Convert the input model to the output coordinate reference system and geometry literal datatype.
        Parameters:
        inputModel -
        outputSrsURI -
        outputDatatype -
        Returns:
        Output of conversion.
      • convert

        public static final Model convert​(Model inputModel,
                                          java.lang.String outputSrsURI,
                                          java.lang.String outputDatatypeURI)
        Convert the input model to the output coordinate reference system and geometry literal datatype.
        Parameters:
        inputModel -
        outputSrsURI -
        outputDatatypeURI -
        Returns:
        Output of conversion.
      • convert

        public static final Dataset convert​(Dataset dataset)
        Convert the input dataset to the most frequent coordinate reference system and default datatype.
        Parameters:
        dataset -
        Returns:
        Converted dataset.
      • convert

        public static final Dataset convert​(Dataset dataset,
                                            java.lang.String outputSrsURI)
        Convert the input dataset to the output coordinate reference system.
        Parameters:
        dataset -
        outputSrsURI -
        Returns:
        Converted dataset.
      • convert

        public static final Dataset convert​(Dataset dataset,
                                            GeometryDatatype outputDatatype)
        Convert the input dataset to the output geometry literal datatype.
        Parameters:
        dataset -
        outputDatatype -
        Returns:
        Converted dataset.
      • convert

        public static final Dataset convert​(Dataset inputDataset,
                                            java.lang.String outputSrsURI,
                                            GeometryDatatype outputDatatype)
        Convert the input dataset to the output coordinate reference system and geometry literal datatype.
        Parameters:
        inputDataset -
        outputSrsURI -
        outputDatatype -
        Returns:
        Converted dataset.
      • countGeometryLiterals

        public static final int countGeometryLiterals​(Model model,
                                                      java.lang.String graphName)
        Parameters:
        model -
        graphName - Name of graph for logging purposes.
        Returns:
        Number of Geometry Literals contained in Model.
      • countGeometryLiterals

        public static final int countGeometryLiterals​(Dataset dataset)
        Parameters:
        dataset -
        Returns:
        Count of Geometry Literals in whole Dataset.
      • applyPrefixes

        public static final void applyPrefixes​(Model model)
        Apply a set of commonly used prefixes for GeoSPARQL URIs to the Model.
        Parameters:
        model -
      • applyPrefixes

        public static final void applyPrefixes​(Dataset dataset)
        Apply a set of commonly used prefixes for GeoSPARQL URIs to the whole Dataset.
        Parameters:
        dataset -
      • cleanUpPrecision

        public static double cleanUpPrecision​(double value)
        Converts value according to the configured precision.
        Parameters:
        value -
        Returns:
        double