Re: Building a spatial index with jena/fuseki

2018-10-10 Thread Markus Neumann
Hi, just wanted to confirm that version 3.9.0 solves the spatial indexing issue: $ java -cp /home/process/fuseki-3.9.0/fuseki-server.jar jena.spatialindexer --desc=/home/process/fuseki-3.9.0/run/configuration/mm.ttl ... INFO 539607479 (490106 per second) properties indexed Spatial queries work

Re: Building a spatial index with jena/fuseki

2018-09-19 Thread Marco Neumann
Adam-- as per conversation about tdbloader2 with Andy when indexed correctly with tdb2.tdbloader the spatial predicate pairs are now picked up correctly during indexing with the patch. On Wed, Sep 19, 2018 at 11:19 AM Marco Neumann wrote: > > again thank you for the quick edit. as discussed I

Re: Building a spatial index with jena/fuseki

2018-09-19 Thread Marco Neumann
indeed Andy, I got confused with the naming here. same in the code actually. it might be a good idea to come up with a new name for TDB2 to reduce scope for confusion. On Wed, Sep 19, 2018 at 1:47 PM Andy Seaborne wrote: > > > On 19/09/18 11:24, Marco Neumann wrote: > > On Wed, Sep 19, 2018 at

Re: Building a spatial index with jena/fuseki

2018-09-19 Thread Andy Seaborne
On 19/09/18 11:24, Marco Neumann wrote: On Wed, Sep 19, 2018 at 11:04 AM Andy Seaborne wrote: On 17/09/18 15:26, ajs6f wrote: Okay, I think we've got it. Nice debugging, Markus! If you look at the line of the spatial indexer code that is throwing an exception:

Re: Building a spatial index with jena/fuseki

2018-09-19 Thread Marco Neumann
On Wed, Sep 19, 2018 at 11:04 AM Andy Seaborne wrote: > > > On 17/09/18 15:26, ajs6f wrote: > > Okay, I think we've got it. Nice debugging, Markus! > > > > If you look at the line of the spatial indexer code that is throwing an > exception: > > > > >

Re: Building a spatial index with jena/fuseki

2018-09-19 Thread Andy Seaborne
On 17/09/18 15:26, ajs6f wrote: Okay, I think we've got it. Nice debugging, Markus! If you look at the line of the spatial indexer code that is throwing an exception: https://github.com/apache/jena/blob/master/jena-spatial/src/main/java/jena/spatialindexer.java#L110 indeed, it does not

Re: Building a spatial index with jena/fuseki

2018-09-18 Thread Marco Neumann
Oh I see Adam, great. yes well in that case the order should not be too tall. I will take a look at it in the morning. On Tue, Sep 18, 2018 at 5:40 PM ajs6f wrote: > Marco-- > > I think I didn't express myself well. I'm not asking you to do any code > updates of any kind-- I'm asking you to

Re: Building a spatial index with jena/fuseki

2018-09-18 Thread ajs6f
Marco-- I think I didn't express myself well. I'm not asking you to do any code updates of any kind-- I'm asking you to take a look at the updates _I've_ made available in that PR, try them out, and see if they fix your problem. Again, if that seems like a bit too tall an order, that's okay--

Re: Building a spatial index with jena/fuseki

2018-09-18 Thread Marco Neumann
I will take a look at it over the weekend, haven't done code updates to the new jena repo. not sure if I can submit changes in my current setup, but am happy to learn about it. On Tue, Sep 18, 2018 at 4:47 PM ajs6f wrote: > Marco-- > > I've got a PR at https://github.com/apache/jena/pull/471.

Re: Building a spatial index with jena/fuseki

2018-09-18 Thread ajs6f
Marco-- I've got a PR at https://github.com/apache/jena/pull/471. Until we hear from Andy, could you perhaps try cloning that PR/branch and trying the new code out? If that is not a reasonable piece of work for you, no problem, but it would help greatly in validating that we've found and fixed

Re: Building a spatial index with jena/fuseki

2018-09-18 Thread Marco Neumann
well spotted Adam, I think that nails it. I guess I was lucky with my setup to avoid this glitch so far. Don't want to anticipates Andy's call here but what's your plan? wrap the call into a transaction to fix it? If so I'd like to see it as an option in the code to work with tdb2 access methods

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread ajs6f
Okay, I think we've got it. Nice debugging, Markus! If you look at the line of the spatial indexer code that is throwing an exception: https://github.com/apache/jena/blob/master/jena-spatial/src/main/java/jena/spatialindexer.java#L110 indeed, it does not start a transaction against the dataset

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread Markus Neumann
It seems I made a mess with absolute and relative paths all together. So I created a minimal setup for testing: (I include the file-contents at the bottom) $ export JENA_HOME=/srv/linked_data_store/apache-jena-3.8.0 $ export PATH=$PATH:$JENA_HOME/bin $ tdb2.tdbloader

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread ajs6f
I think you might have misunderstood the use of $JENA_HOME, or perhaps the Java classpath. $JENA_HOME, which should generally be an absolute filepath, allows the Jena scripts to find their libraries at runtime. Internally, the scripts use $JENA_HOME to set up the classpaths with which to start

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread Markus Neumann
Ok, that's exactly what I did here: $ java -cp lib/*.jar jena.spatialindexer --desc=../fuseki-server/run/configuration/mm.ttl Error: Could not find or load main class lib.commons-cli-1.4.jar Or from outside JENA_HOME: $ java -cp apache-jena-3.8.0/lib/* jena.spatialindexer

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread Marco Neumann
don't worry it's a common problem and frequent source of confusion not only with jena but java projects. try to simply inlcude all the jars. I presume you run this on a linux box with OpenJDK 8. correct? now once you have set up jena just add the following

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread Markus Neumann
This is embarrassing but I don't get it. I've configured $JENA_HOME and adjusted the PATH. Now what classpath should I include when invoking the indexer? What I've tried so far: $ cd $JENA_HOME $ java -cp jena-spatial-3.8.0.jar jena.spatialindexer

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread Marco Neumann
yes correct, this looks good. now include the classpath during invocation of the spatialindexer in addition it's always a good idea to properly configure jena along your java runtime environment settings to avoid jdk / lib conflicts during execution.

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread Markus Neumann
Hi, I tried that and it does not change anything in the behaviour. Server starts fine but spatial queries don't work. Best Markus > Am 17.09.2018 um 11:26 schrieb Øyvind Gjesdal : > > Looking at our very similar config (based on the fuseki examples) only > difference I see (except from the

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread Markus Neumann
1.: what do you mean by indexer? Probably my biggest problem is, that I have no clue how to find out, where the jena.spatialindexer could be located except for asking here. Here is the content of the apache jena I downloaded: $ ls -lh ../apache-jena-3.8.0/lib total 17M -rw-r--r-- 1 process

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread Øyvind Gjesdal
Looking at our very similar config (based on the fuseki examples) only difference I see (except from the additional library) is that our config uses TDB, and your config uses TDB2. I believe tdbloader2 generates tdb1 data ( I could be wrong), since I remember using it pre tdb2 release, so there

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread Lorenz B.
> 1. I download the jena-spatial-3.8.0.jar and specify that in the classpath: > $ java -cp jena-spatial-3.8.0.jar jena.spatialindexer > --desc=../fuseki-server/run/configuration/mm.ttl > Error: Could not find or load main class jena.spatialindexer The documentation is a bit misleading I'd say.

Re: Building a spatial index with jena/fuseki

2018-09-17 Thread Marco Neumann
Ok let's take a look at this. 1. please include in the indexer in the classpath. It's part of the current jena distribution. 2. do you need jts? it's a package that allows you to index multi point geometries. here a sample query would be helpful. If single point geometries are indexed and used

Building a spatial index with jena/fuseki

2018-09-17 Thread Markus Neumann
Hi, (sorry for the long post) I've been struggling with the spatial index for a while now. I've read https://jena.apache.org/documentation/query/spatial-query.html and skipped through about every spatial related thread here on