I encountered a problem in GeoSparql using the examples from the manual. I have been exploring the GeoSPARQL functions in Stardog. I started with the example in the manual, but it doesn`t work. I created a new repository and enabled the spatial index.
And then I use the Sparql Query from the manual as well. I runs but gives zero results. I would expect to find the other two objects since they are at least within 2 km from the white house:
Not during creation, but after creation by enabling spatial indexing. I use the enterprise edition.
Is there any difference between spatial indexing in the frontend and enabling spatial.enabled=true?
I assumed they were the same and enabling on the command line gives an error (Unable to connect to server at http://localhost:5820 localhost:5820 failed to respond) since we use https for some reason.
You should be able to enable spatial indexing after you've created the database and it should be the same as if you had set it when you created the database. It sounds as if you weren't successful in enabling it. You can check if it's enabled by running stardog-admin --server https://localhost:5820 metadata get -o spatial.enabled myDb
Running https can make using the cli a little more tricky since the defaults that make it simple to run default to http. You'll need to pass the --server option with the server and protocol options you're using. ie. --server https://localhost:5820 or you can set the JVM argument -Dstardog.default.cli.server=https://localhost:5820
You can set the JVM arg by setting the STARDOG_CLIENT_JAVA_ARGS environment variable.
Which is slightly different than the one in the first post. As I understand the query, I use the geometry of the White House object and try to find all features within 10 kilometers. But still no results.
We use Stardog Version: 5.0.5.1 Enterprise edition.
I believe you may have discovered a bug. I’ve noticed that the query will return if you bulk load the database when it’s created but will not return if you load the data after it’s created. It looks like there may be an issue with Stardog not indexing data being loaded after db creation.
(Tested on Stardog 5.2)
stardog-admin db create -n test -o spatial.enabled=true -- test.ttl
stardog-admin query test test.rq
three results
stardog-admin db create -n test -o spatial.enabled=true --
stardog data add test test.ttl
stardog-admin query test test.rq
no results
Query and data were from previously posted in this topic.