The result is now correct. The missing call is GeoSPARQLConfig.setupMemoryIndex() source code updated: https://github.com/jmvanel/semantic_forms/blob/master/scala/forms/src/main/scala/deductions/runtime/jena/GeoSPARLtest.scala#L11
NOTES - but need to re-index after RDF addition; - setupMemoryIndex() actually registers special SPARQL predicates, which is not apparent in method name; - QUESTIONS: - how expensive in terms of CPU, elapsed time and storage is re-indexing? - how to make re-index automatic? - is GeoSPARQL indexing compatible with Lucene indexing? Jean-Marc Vanel <http://semantic-forms.cc:9112/display?displayuri=http://jmvanel.free.fr/jmv.rdf%23me> +33 (0)6 89 16 29 52 Le mer. 24 févr. 2021 à 09:17, Jean-Marc Vanel <jeanmarc.va...@gmail.com> a écrit : > The Scala code is here; > > https://github.com/jmvanel/semantic_forms/blob/master/scala/forms/src/main/scala/deductions/runtime/jena/GeoSPARLtest.scala#L11 > starting with empty TDB 1; just load 2 dbPedia cities with geo: > coordinates, initialize with > GeoSPARQLConfig.setupSpatialIndex(dataset) > and query with spatial:withinBox . > Alas, the result is empty (see bold line). > > Log output : > 2021-02-24T08:04:14.609Z [run-main-6] INFO o.a.j.g.c.GeoSPARQLOperations > - Find Mode SRS - Started > 2021-02-24T08:04:14.633Z [run-main-6] INFO o.a.j.g.c.GeoSPARQLOperations > - Find Mode SRS - Completed > 2021-02-24T08:04:14.634Z [run-main-6] INFO > o.a.j.geosparql.spatial.SpatialIndex - Building Spatial Index - Started > 2021-02-24T08:04:14.634Z [run-main-6] INFO > o.a.j.geosparql.spatial.SpatialIndex - Geo predicate statements found. > févr. 24, 2021 8:04:14 AM > org.apache.sis.referencing.factory.sql.EPSGFactory <init> > > *AVERTISSEMENT: La variable environnementale « SIS_DATA » n’est pas > définie.*2021-02-24T08:04:14.973Z [run-main-6] INFO > o.a.j.geosparql.spatial.SpatialIndex - Building Spatial Index - Completed > > *?feature*[success] Total time: 5 s, completed 24 févr. 2021 à 08:04:15 > > If someone wants Java code to try, send me a private mail and I'll write > it :) . > > Jean-Marc Vanel > <http://semantic-forms.cc:1952/display?displayuri=http://jmvanel.free.fr/jmv.rdf%23me> > +33 (0)6 89 16 29 52 > Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui > Chroniques jardin > <http://semantic-forms.cc:1952/history?uri=http%3A%2F%2Fdbpedia.org%2Fresource%2FChronicle> > >