GeoSPARQL plugin properties inconsistent after enabling the plugin

63 views Asked by At

After enabling the GeoSPARQL plugin on my repo with custom settings (geohash algorith and precision 10) the properties as depicted both through GeoSPARQL querying and in the {repo-dir}./storage/GeoSPARQL/v3/config.properties file are not consistent with the properties' definitions.

The repo is called scalability_10K. After creating the repo and complete data loading, I configure the GeoSPARQL plugin and enable it with the following 2 SPARQL statements:

: PREFIX : <http://www.ontotext.com/plugins/geosparql#>
 INSERT DATA { [] :ignoreErrors "true" . };
 INSERT DATA { [] :enabled "true" . };
 INSERT DATA { [] :prefixTree "geohash"; :precision "10" . };
 INSERT DATA { [] :maxBufferedDocs "5000" . };
 INSERT DATA { [] :ramBufferSizeMB "512.0" . };

: PREFIX : <http://www.ontotext.com/plugins/geosparql#>
 INSERT DATA { [] :enabled "true" . }

The entire process is performed through Java and after enabling the GeoSPARQL plugin I receive the following output, which basically confirms that everything went as expected:

10:15:53.811 [main] INFO  com.ontotext.plugin.GeoSPARQL - >>>>>>>> GeoSPARQL: Initializing Lucene indexer...
10:15:53.953 [main] INFO  com.ontotext.plugin.GeoSPARQL - >>>>>>>> GeoSPARQL: Lucene indexer initialized!
10:15:53.954 [main] INFO  com.ontotext.plugin.GeoSPARQL - >>>>>>>> GeoSPARQL: Initializing indexing process...
10:15:56.129 [main] INFO  com.ontotext.plugin.GeoSPARQL - >>>>>>>> GeoSPARQL: Indexing completed!

According to the relevant online documentation for GraphDB Free v9.11.1 that I am using and the latest v10.3, in order to check the current plugin configuration we should use the following query:

PREFIX geosparql: <http://www.ontotext.com/plugins/geosparql#>

SELECT DISTINCT * WHERE {
    [] geosparql:currentPrefixTree ?tree;
        geosparql:currentPrecision ?precision;
}

which in my case returns the following result:

Current GeoSPARQL plugin configuration

Similarly, the contents of the {repo-dir}./storage/GeoSPARQL/v3/config.properties file are:

#GeoSPARQL configuration
#Fri Oct 13 10:15:56 EEST 2023
precision=10
prefixtree=GEOHASH
ramBufferSizeMB=512.0
prefixtree.current=QUAD
precision.current=11
enabled=true
ignoreErrors=true
maxBufferedDocs=5000

Basically, the questions here are whether the prefixtree.current / geoSparql:currentPrefixTree and precision.current / geoSparql:currentPrecision:

  1. actually hold the Value of last built index (according to the documentation GeoSPARQL Support), since in the above example it appears that the custom configuration was stored in the prefixtree / geoSparql:prefixTree and precision / geoSparql:precision
  2. when a new session (let's say after a GraphDB restart) runs GeoSPARQL queries against this repo, which supposedly has the GeoSPARQL plugin enabled with custom settings, how can the user be sure that the spatial index used is a GEOHASH-10 spatial and not the QUAD-11 (default one).

Thank you in advance.

Theofilos Ioannidis

Was expecting that the {repo-dir}./storage/GeoSPARQL/v3/config.properties would have:

precision=11
prefixtree=QUAD
prefixtree.current=GEOHASH
precision.current=10

and I got this:

precision=10
prefixtree=GEOHASH
prefixtree.current=QUAD
precision.current=11
1

There are 1 answers

1
Martina Dimova On

In your configuration you can add the parameters currentPrefixTree and currentPrecision. You receive

    prefixtree.current=QUAD
    precision.current=11

as these are the default values. For example:

    PREFIX geoSparql: <http://www.ontotext.com/plugins/geosparql#>
    INSERT DATA { [] geoSparql:currentPrefixTree "geohash" . }
    INSERT DATA { [] geoSparql:currentPrecision "10" . }

The currentPrefixTree and currentPrecision parameters refer to the values of the last built index. On the other hand, prefixTree and precision refer to the implementation of the tree used during the index build, store the values before rebuilding.