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
