Class GeoSPARQLConfig

java.lang.Object
org.apache.jena.geosparql.configuration.GeoSPARQLConfig

public class GeoSPARQLConfig extends Object
  • Field Details

    • DECIMAL_PLACES_PRECISION

      public static int DECIMAL_PLACES_PRECISION
      Precision of calculations. Inaccuracies exist in these calculations and a higher value may not improve results.
    • PRECISION_MODEL_SCALE_FACTOR

      public static int PRECISION_MODEL_SCALE_FACTOR
      Precision of created coordinates. Determines the coordinates of certain JTS geometry calculations, e.g. buffer.
    • ALLOW_GEOMETRY_SRS_TRANSFORMATION

      public static boolean ALLOW_GEOMETRY_SRS_TRANSFORMATION
      Option to dynamically transform GeometryLiteral SRS in calculations.
  • Constructor Details

    • GeoSPARQLConfig

      public GeoSPARQLConfig()
  • Method Details

    • setupMemoryIndex

      public static final void setupMemoryIndex()
      Initialise all GeoSPARQL property and filter functions with memory indexing.
      Use this for in-memory indexing GeoSPARQL setup. Query re-write enabled.
      This does not affect the use of Spatial Indexes for Datasets.
    • setupMemoryIndex

      public static final void setupMemoryIndex(Boolean isQueryRewriteEnabled)
      Initialise all GeoSPARQL property and filter functions with memory indexing.
      Use this for in-memory indexing GeoSPARQL setup. Query re-write optional.
      This does not affect the use of Spatial Indexes for Datasets.
      Parameters:
      isQueryRewriteEnabled -
    • setupMemoryIndex

      public static final void setupMemoryIndex(Integer geometryLiteralIndex, Integer geometryTransformIndex, Integer queryRewriteIndex, Long geometryLiteralIndexExpiry, Long geometryTransformIndexExpiry, Long queryRewriteIndexExpiry, Boolean isQueryRewriteEnabled)
      Initialise all GeoSPARQL property and filter functions with memory indexing.
      Use this for in-memory indexing GeoSPARQL setup and to control the index sizes (default: unlimited) and expiry rate (default: 5,000 milliseconds).
      This does not affect the use of Spatial Indexes for Datasets.
      Parameters:
      geometryLiteralIndex -
      geometryTransformIndex -
      queryRewriteIndex -
      geometryLiteralIndexExpiry -
      geometryTransformIndexExpiry -
      queryRewriteIndexExpiry -
      isQueryRewriteEnabled -
    • setupNoIndex

      public static final void setupNoIndex()
      Initialise all GeoSPARQL property and filter functions with no indexing.
      Use this for no indexing GeoSPARQL setup.
      This does not affect the use of Spatial Indexes for Datasets.
    • setupNoIndex

      public static final void setupNoIndex(Boolean isQueryRewriteEnabled)
      Initialise all GeoSPARQL property and filter functions with no indexing.
      Use this for no indexing GeoSPARQL setup.
      This does not affect the use of Spatial Indexes for Datasets.
      Parameters:
      isQueryRewriteEnabled -
    • setup

      public static final void setup(IndexConfiguration.IndexOption indexOption)
      Initialise all GeoSPARQL property and filter functions. Query rewrite enabled.
      This does not affect the use of Spatial Indexes for Datasets.
      Parameters:
      indexOption -
    • setup

      public static final void setup(IndexConfiguration.IndexOption indexOption, Boolean isQueryRewriteEnabled)
      Initialise all GeoSPARQL property and filter functions.
      This does not affect the use of Spatial Indexes for Datasets.
      Parameters:
      indexOption -
      isQueryRewriteEnabled -
    • loadFunctions

      public static final void loadFunctions()
    • isFunctionRegistered

      public static final Boolean isFunctionRegistered()
      Returns:
      True, if the GeoSPARQL functions have been registered.
    • reset

      public static final void reset()
      Empty all indexes and registries currently in use.
      This does not affect Spatial Indexes for Datasets.
    • isQueryRewriteEnabled

      public static Boolean isQueryRewriteEnabled()
      Returns:
      True if query rewrite enabled.
    • setupQueryRewriteIndex

      public static final void setupQueryRewriteIndex(Dataset dataset, String queryRewriteLabel, int maxSize, long expiryInterval)
      Setup Query Rewrite Index using Dataset.
      The index will be set active.
      Parameters:
      dataset -
      queryRewriteLabel -
      maxSize -
      expiryInterval -
    • setupSpatialIndex

      public static final void setupSpatialIndex(Dataset dataset) throws SpatialIndexException
      Setup Spatial Index using Dataset and most frequent SRS URI in Dataset.
      Parameters:
      dataset -
      Throws:
      SpatialIndexException
    • setupPrecomputedSpatialIndex

      public static final void setupPrecomputedSpatialIndex(Dataset dataset, File spatialIndexFile) throws SpatialIndexException
      Setup the precomputed Spatial Index using Dataset Dataset.
      We assume that the spatial index was computed before and written to the given file.
      Parameters:
      dataset - the dataset
      spatialIndexFile - the file containing the serialized spatial index
      Throws:
      SpatialIndexException
    • setupSpatialIndex

      public static final void setupSpatialIndex(Dataset dataset, File spatialIndexFile) throws SpatialIndexException
      Setup Spatial Index using Dataset and most frequent SRS URI in Dataset.
      Spatial Index written to file once created.
      Parameters:
      dataset -
      spatialIndexFile -
      Throws:
      SpatialIndexException
    • setupSpatialIndex

      public static final void setupSpatialIndex(Dataset dataset, String srsURI, File spatialIndexFile) throws SpatialIndexException
      Setup Spatial Index using Dataset using provided SRS URI.
      Spatial Index written to file once created.
      Parameters:
      dataset -
      srsURI -
      spatialIndexFile -
      Throws:
      SpatialIndexException
    • setCalculationPrecision

      public static final void setCalculationPrecision(int decimalPlaces)
      Set the number of decimal places precision used in calculations and coordinate transformations. Inaccuracies exist in these calculations and a higher value may not improve results.
      Parameters:
      decimalPlaces -
    • setPrecisionModelScaleFactor

      public static final void setPrecisionModelScaleFactor(int scaleFactor)
      Set the scale factor of the precision model used to create coordinate sequences used in Geometries. Default: 1000000 for 6 d.p. precision.
      Parameters:
      scaleFactor -
    • allowGeometrySRSTransformation

      public static final void allowGeometrySRSTransformation(boolean allowTransformation)
      Sets whether transformation for mismatching Geometry SRS is allowed.
      Parameters:
      allowTransformation -