Class GeoSPARQLConfig
java.lang.Object
org.apache.jena.geosparql.configuration.GeoSPARQLConfig
-
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
Option to dynamically transform GeometryLiteral SRS in calculations.static int
Precision of calculations.static int
Precision of created coordinates. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final void
allowGeometrySRSTransformation
(boolean allowTransformation) Sets whether transformation for mismatching Geometry SRS is allowed.static final Boolean
static Boolean
static final void
static final void
reset()
Empty all indexes and registries currently in use.static final void
setCalculationPrecision
(int decimalPlaces) Set the number of decimal places precision used in calculations and coordinate transformations.static final void
setPrecisionModelScaleFactor
(int scaleFactor) Set the scale factor of the precision model used to create coordinate sequences used in Geometries.static final void
setup
(IndexConfiguration.IndexOption indexOption) Initialise all GeoSPARQL property and filter functions.static final void
setup
(IndexConfiguration.IndexOption indexOption, Boolean isQueryRewriteEnabled) Initialise all GeoSPARQL property and filter functions.static final void
Initialise all GeoSPARQL property and filter functions with memory indexing.static final void
setupMemoryIndex
(Boolean isQueryRewriteEnabled) Initialise all GeoSPARQL property and filter functions with memory indexing.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.static final void
Initialise all GeoSPARQL property and filter functions with no indexing.static final void
setupNoIndex
(Boolean isQueryRewriteEnabled) Initialise all GeoSPARQL property and filter functions with no indexing.static final void
setupPrecomputedSpatialIndex
(Dataset dataset, File spatialIndexFile) Setup the precomputed Spatial Index using Dataset Dataset.
We assume that the spatial index was computed before and written to the given file.static final void
setupQueryRewriteIndex
(Dataset dataset, String queryRewriteLabel, int maxSize, long expiryInterval) Setup Query Rewrite Index using Dataset.
The index will be set active.static final void
setupSpatialIndex
(Dataset dataset) Setup Spatial Index using Dataset and most frequent SRS URI in Dataset.static final void
setupSpatialIndex
(Dataset dataset, File spatialIndexFile) Setup Spatial Index using Dataset and most frequent SRS URI in Dataset.
Spatial Index written to file once created.static final void
setupSpatialIndex
(Dataset dataset, String srsURI, File spatialIndexFile) Setup Spatial Index using Dataset using provided SRS URI.
Spatial Index written to file once created.
-
Field Details
-
DECIMAL_PLACES_PRECISION
public static int DECIMAL_PLACES_PRECISIONPrecision 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_FACTORPrecision of created coordinates. Determines the coordinates of certain JTS geometry calculations, e.g. buffer. -
ALLOW_GEOMETRY_SRS_TRANSFORMATION
public static boolean ALLOW_GEOMETRY_SRS_TRANSFORMATIONOption 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
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
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
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
- 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
- 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
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 datasetspatialIndexFile
- 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
-
-