here is the data https://github.com/apache/jena/blob/master/jena-spatial/src/test/resources/geoarq-data-1.ttl
and here are the tests https://github.com/apache/jena/blob/master/jena-spatial/src/main/java/examples/JenaSpatialExample1.java On Mon, May 29, 2017 at 5:34 PM, Nouwt, B. (Barry) <[email protected]> wrote: > Hi Marco, > > > > Ok, so, I will not need to implement any spatial predicates myself? Which > existing spatial predicate should I use in my SPARQL query for my ‘contains’ > requirement? > > > > Could you maybe send me your quick test? That would probably be helpful. > > > > Thanks again! > > Barry > > > > Verzonden vanaf mijn Windows 10-telefoon > > > > Van: Marco Neumann > Verzonden: maandag 29 mei 2017 23:12 > > > Aan: [email protected] > Onderwerp: Re: FW: Apache Jena Spatial > > > > looking at your requirements it I'd say you will be just fine with the > current version of jena-spatial. I was thinking more in terms of > number of spatial objects to be indexed as a possible issue. > > I just did a quick test with the latest release 3.3.0 and and it seems > to work for your needs. ignore the spatial documentation for now and > work with code directly. the linked documentation seems to be out of > sync with the current implementation of jena-spatial. > > Marco > > > On Mon, May 29, 2017 at 1:24 PM, Nouwt, B. (Barry) <[email protected]> > wrote: >> Hi Marco, thanks for your reply! >> >> >> >> I’ve indeed included the JTS library, but haven’t tested the more advanced >> (WKT) features yet… >> >> >> >> My (current) requirements are: >> >> Describe spatial objects in RDF using WKT polygons. >> Fire a spatial SPARQL query with a given GPS coordinate (I.e. single >> point) >> Retrieve all spatial RDF objects that contain this given GPS coordinate. >> >> >> >> Do I understand you correctly that the current spatial implementation does >> not support my requirements? So, there is no predefined (combination of) >> predicate like nearby that I can use? >> >> >> >> So, then I need to put more effort in it myself. I’ve seen the ‘simple’ >> implementations of the nearby (etc) predicate in jena-spatial… would >> implementing the contains be similar? I am an experienced Java developer, >> but never did spatial calculations before. >> >> >> >> Regards, Barry >> >> >> >> >> >> >> >> Verzonden vanaf mijn Windows 10-telefoon >> >> >> >> Van: Marco Neumann >> Verzonden: maandag 29 mei 2017 18:39 >> Aan: [email protected] >> Onderwerp: Re: FW: Apache Jena Spatial >> >> >> >> Barry, >> >> the jena-spatial implementation has seen a couple of versions and >> iterations of versions over last couple of years. >> >> To perform and test for detailed spatial object interactions on polygons >> the current apache lucene spatial implementation (Lucene6.4.1) requires >> the >> JTS library. >> >> and of course you can always implement your own or you can just build your >> own spatial filter in sparql to detect polygon / point intersections. it >> requires a bit more effort to detect polygon / polygon interactions >> though. >> it depends on your requirements. >> >> Marco >> >> >> >> On Mon, May 29, 2017 at 11:28 AM, Nouwt, B. (Barry) <[email protected]> >> wrote: >> >>> Hi, >>> >>> >>> >>> In one of our projects we would like to use SPARQL to do spatial searches >>> to find all spatial objects (described by a polygon) that contain a >>> particular given GPS coordinate. I can successfully execute the following >>> Apache >>> Jena Spatial query on the test data: >>> >>> >>> >>> PREFIX spatial: <http://jena.apache.org/spatial# >>> <http://jena.apache.org/spatial>> >>> >>> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema# >>> <http://www.w3.org/2000/01/rdf-schema>> >>> >>> >>> >>> SELECT ?placeName >>> >>> { >>> >>> ?place spatial:nearby (51.46 2.6 *1000* 'km') . >>> >>> ?place rdfs:label ?placeName >>> >>> } >>> >>> >>> >>> However, the *‘nearby’* predicate does not fit my usecase and I cannot >>> find one that does in this list: >>> >>> >>> >>> https://jena.apache.org/documentation/query/spatial- >>> query.html#property-function-library >>> >>> >>> >>> I think I need the ‘Contains’ predicate as described here: >>> >>> >>> >>> http://edndoc.esri.com/arcsde/9.1/general_topics/understand_ >>> spatial_relations.htm#Contains >>> >>> >>> >>> but I it seems like it is not supported. Can anyone confirm that? >>> >>> >>> >>> What other options do I have to get the usecase described above working? >>> Can I implement the ‘Contains’ behavior myself (although I have no >>> geo/spatial experience) and contribute it to the Apache Jena Spatial? Can >>> I >>> somehow mimic the contains behavior with regular SPARQL? >>> >>> >>> >>> Thanks in advance! >>> >>> >>> >>> >>> >>> B. (Barry) Nouwt >>> Medior Innovator Semantische Technologie >>> Connected Business >>> >>> T +31 (0)88 866 56 91 >>> M +31 (0)64 977 53 56 >>> E [email protected] >>> >>> Location <http://www.tno.nl/locaties/SB> >>> >>> >>> >>> <http://www.tno.nl/> >>> >>> This message may contain information that is not intended for you. If you >>> are not the addressee or if this message was sent to you by mistake, you >>> are requested to inform the sender and delete the message. TNO accepts no >>> liability for the content of this e-mail, for the manner in which you use >>> it and for damage of any kind resulting from the risks inherent to the >>> electronic transmission of messages. >>> >>> >>> >>> >>> >> >> >> >> -- >> >> >> --- >> Marco Neumann >> KONA >> >> >> >> This message may contain information that is not intended for you. If you >> are not the addressee or if this message was sent to you by mistake, you >> are >> requested to inform the sender and delete the message. TNO accepts no >> liability for the content of this e-mail, for the manner in which you use >> it >> and for damage of any kind resulting from the risks inherent to the >> electronic transmission of messages. >> > > > > -- > > > --- > Marco Neumann > KONA > > > > This message may contain information that is not intended for you. If you > are not the addressee or if this message was sent to you by mistake, you are > requested to inform the sender and delete the message. TNO accepts no > liability for the content of this e-mail, for the manner in which you use it > and for damage of any kind resulting from the risks inherent to the > electronic transmission of messages. > -- --- Marco Neumann KONA
