You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rya.apache.org by Joost Farla <jo...@apiwise.nl> on 2018/05/06 09:28:44 UTC

How to enable GeoSPARQL support for endpoint on MongoDB?

Hi there,

I've recently started experimenting with Rya on MongoDB. I've been able to
load geospatial data into MongoDB. The rya__triples and rya_rya_geo
collections are populated without issues.

However, when I try to use GeoSPARQL functions via the provided SPARQL
endpoint implementation (web.rya), I get an empty result-set. I've also
tried to query using RDF4J directly, but same result.

I'm using the latest master (4.0.0-SNAPSHOT) and I've built the .war with:

mvn clean install -P mongodb -P geoindexing -DskipTests


Env config (relevant part):

sc.useMongo=true
sc.use_geo=true
sc.geo.predicates=http://www.opengis.net/ont/geosparql#asWKT
mongo.db.collectionprefix=rya_
mongo.geo.maxdist=1e-10


The test data:

@prefix geo: <http://www.opengis.net/ont/geosparql#> .
@prefix ex: <http://example.org/> .

ex:Foo geo:hasGeometry ex:FooGeometry.
ex:FooGeometry geo:asWKT "POINT(5.091025039849683
51.55845016358455)"^^geo:wktLiteral.


The test query:

PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>

SELECT ?s ?wkt
WHERE {
  ?s geo:asWKT ?wkt .
  FILTER(geof:sfWithin(?wkt, "POLYGON((5.034360992118195
51.595144381441415,5.149717437430695 51.595144381441415,5.149717437430695
51.52086334303003,5.034360992118195 51.52086334303003,5.034360992118195
51.595144381441415))"^^geo:wktLiteral))
}


The indexed POINT geometry is located within the provided POLYGON.
Therefore, I would expect one binding-set as result.

What should I do to get this working? Thanks!!

RE: How to enable GeoSPARQL support for endpoint on MongoDB?

Posted by "White, Eric" <Er...@parsons.com>.
Hi Joost,

I am able to see the expected result.

I added the following dependencies to the geoindexing profile of the web.rya pom.xml:
                <dependency>
                    <groupId>org.apache.rya</groupId>
                    <artifactId>rya.geo.mongo</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.apache.rya</groupId>
                    <artifactId>rya.geo.common</artifactId>
                </dependency>
                <dependency>
                    <groupId>com.vividsolutions</groupId>
                    <artifactId>jts</artifactId>
                </dependency>

My spring-mongodb-geo.xml file is attached.

I built Rya with:
mvn clean install -Pgeoindexing -DskipTests

I deployed the web.rya.war with Tomcat 9 (had to delete all "servlet-api*.jar" and "jsp*.jar" from Rya's WEB-INF/lib folder and restart Tomcat).  My environment.properties file is attached (not everything in there is needed)

I added data by modifying and running:
org.apache.cloud.rdf.web.cloudbase.sail.LoadDataServletRun
(changing the file to "data.trig" and the url string to "http://localhost:8080/web.rya/loadrdf?format=TriG")

I modified org.apache.cloud.rdf.web.cloudbase.sail.QueryDataServletRun to generate the query.  This produced a URL that can be copied into a browser (see attached sparql-query.txt file).

Hopefully that helps.

Thanks,
-Eric

-----Original Message-----
From: Joost Farla <jo...@apiwise.nl>
Sent: Thursday, May 10, 2018 4:22 AM
To: dev@rya.incubator.apache.org
Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?

Hi Eric,

I've now added the following lines to spring-mongodb-geo.xml:

sc.use_geo=true
sc.geo.predicates=${sc.geo.predicates}

After that, the application complained about an unknown class:
MongoGeoIndexer.

I've now added rya.geo.mongo as extra dependency for web.rya, but the result-set remains empty.

Are you able to reproduce the issue?

Cheers, Joost



2018-05-09 20:38 GMT+02:00 White, Eric <Er...@parsons.com>:

> Nevermind.  Make that change in "spring-mongodb-geo.xml" NOT
> "spring-root-extensions.xml".  And add all the other geo related
> properties in there over too.
>
>     sc.geo.table=${sc.geo.table}
>     sc.geo.predicates=${sc.geo.predicates}
>     sc.geo.numPartitions=${sc.geo.numPartitions}
>
> -----Original Message-----
> From: White, Eric <Er...@parsons.com>
> Sent: Wednesday, May 09, 2018 2:22 PM
> To: dev@rya.incubator.apache.org
> Subject: RE: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Sounds like it's still not enabling geo entirely.  "sc.use_geo"
> appears to never be set in the conf.  Modify "spring-root-extensions.xml":
>
> Add in "sc.use_geo" to the "hadoopConf":
>      <hdp:configuration id="hadoopConf">
>         ...
>         ...
>         sc.use_geo=${sc.use_geo}
>         ...
>         ...
>       </hdp:configuration>
>
> Thanks,
> -Eric White
>
> -----Original Message-----
> From: Joost Farla <jo...@apiwise.nl>
> Sent: Wednesday, May 09, 2018 12:26 PM
> To: dev@rya.incubator.apache.org
> Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Hi Caleb,
>
> I've compared them and they seem identical. For the "unscrambled" data
> and query, I've just created a Gist:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__gist.
> github.com_joostfarla_5c075c8e468b6e40a85987b383174966&d=DwIFaQ&c=Nwf-
> pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBL
> Oe
> OHS3mAimFNgqQ&m=KSUZQOWwaQJYPo8HHuU06mwwn3ESiLKUAqpT0x9F_ns&s=uvqpZy_
> HrZYeHWtazH1sr2VMBlwXB--vNr7wBniHCxo&e=
>
> Cheers, Joost
>
>
>
> 2018-05-09 18:17 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:
>
> > Hey Joost,
> >
> > Have a look at the following IT to make sure that you are formatting
> > your queries correctly:
> >
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apac
> > he
> > _incubator-2Drya_blob_master_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54jo
> > YF
> > 7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNgqQ&m=KSUZQ
> > OW
> > waQJYPo8HHuU06mwwn3ESiLKUAqpT0x9F_ns&s=akVnlrNtzMve69IpjduRTAlnFXszb
> > tj 4A02dzNg9DrE&e=
> > extras/rya.geoindexing/geo.mongo/src/test/java/org/
> > apache/rya/indexing/mongo/MongoGeoIndexerFilterIT.java
> >
> > Carefully compare your geo predicate and your geo prefixes with the
> > predicate and prefixes in the above example.  Sorry, I can't tell
> > based on the example that you provided below because URLs get
> > scrambled by our e-mail server.
> >
> > Caleb A. Meier, Ph.D.
> > Senior Software Engineer ♦ Analyst
> > Parsons Corporation
> > 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> > Office:  (703)797-3066
> > Caleb.Meier@Parsons.com ♦ www.parsons.com
> >
> > -----Original Message-----
> > From: Joost Farla <jo...@apiwise.nl>
> > Sent: Wednesday, May 09, 2018 11:37 AM
> > To: dev@rya.incubator.apache.org
> > Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
> >
> > Hi Eric,
> >
> > Thanks for replying!
> >
> > Indexing and querying non-geo data is working well. However, when
> > filtering by a GeoSPARQL predicate, the query runs without errors,
> > but the result set is empty (where I would expect 1 binding). Please
> > see the exact data and query in my initial posting. Indexing
> > geo-data seems to work okay, since the rya_rya_geo collection is
> > created and populated with the correct statement.
> >
> > About spring-mongodb-geo.xml, I did already notice this and I did
> > already change the bean class to "org.apache.rya.indexing.
> GeoRyaSailFactory".
> > Unfortunately, this does not seem to have any effect.
> >
> > What else can I try?
> >
> > Cheers, Joost
> >
> >
> >
> > 2018-05-09 16:52 GMT+02:00 White, Eric <Er...@parsons.com>:
> >
> > > Joost,
> > >
> > > You might want to confirm that non-geo data can be added and queried.
> > > If only geo data isn't working then try stopping Tomcat and
> > > modifying your
> > > "<tomcat_dir>/webapps/web.rya/WEB-INF/spring/spring-mongodb-geo.xml"
> > file (back it up first).
> > >
> > > Change the line:
> > >     <bean id="sail" class="org.apache.rya.sail.config.RyaSailFactory"
> > > factory-method="getInstance">
> > > To:
> > >     <bean id="sail" class="org.apache.rya.indexing.GeoRyaSailFactory"
> > > factory-method="getInstance">
> > >
> > > Save the file and then restart Tomcat and try that out.  Hope that
> helps.
> > >
> > > Thanks,
> > > -Eric White
> > >
> > > -----Original Message-----
> > > From: Joost Farla <jo...@apiwise.nl>
> > > Sent: Wednesday, May 09, 2018 3:28 AM
> > > To: dev@rya.incubator.apache.org
> > > Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
> > >
> > > Hi Caleb,
> > >
> > > Thanks for your suggestion! I've performed a rebuild with only the
> > > geoindexing profile, but still no luck....
> > >
> > > Any clue?
> > >
> > > Cheers, Joost
> > >
> > >
> > >
> > > 2018-05-08 18:43 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:
> > >
> > > > Hey Joost,
> > > >
> > > > After glancing at the pom file for web.rya, it appears that you
> > > > are enabling two profiles that will build different versions of
> > > > the
> .war.
> > > > Have a look at the two profiles that appear at lines 189 and 196
> > > > in the web.rya pom in the following link:
> > > >
> > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_
> > > > me
> > > > ie
> > > > rc
> > > > aleb_incubator-2Drya_blob_master_web_&d=DwIFaQ&c=Nwf-pp4xtYRe0sC
> > > > RV
> > > > M8
> > > > _L
> > > > WH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimF
> > > > Ng
> > > > qQ
> > > > &m
> > > > =aMq-SY6ieesyfCsAA4jaNiCdWdoFihroeUYZKwuHDXQ&s=Jew4790glP7fcpwxQ
> > > > Gs
> > > > MS
> > > > x2
> > > > qwsReekxD5Kt48lfLD0c&e=
> > > > web.rya/pom.xml
> > > >
> > > > In particular, -P mongodb will build and deploy a mongo backed
> > > > web service with no geo enabled, and -P geoindexing deploys a
> > > > mongo backed web service with geo indexing enabled.  Could you
> > > > try building using only the geoindexing profile?  Hopefully that helps.
> > > >
> > > > Caleb
> > > >
> > > > Caleb A. Meier, Ph.D.
> > > > Senior Software Engineer ♦ Analyst Parsons Corporation
> > > > 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> > > > Office:  (703)797-3066
> > > > Caleb.Meier@Parsons.com ♦ www.parsons.com
> > > >
> > > > -----Original Message-----
> > > > From: Joost Farla <jo...@apiwise.nl>
> > > > Sent: Sunday, May 06, 2018 5:29 AM
> > > > To: dev@rya.incubator.apache.org
> > > > Subject: How to enable GeoSPARQL support for endpoint on MongoDB?
> > > >
> > > > Hi there,
> > > >
> > > > I've recently started experimenting with Rya on MongoDB. I've
> > > > been able to load geospatial data into MongoDB. The rya__triples
> > > > and rya_rya_geo collections are populated without issues.
> > > >
> > > > However, when I try to use GeoSPARQL functions via the provided
> > > > SPARQL endpoint implementation (web.rya), I get an empty result-set.
> > > > I've also tried to query using RDF4J directly, but same result.
> > > >
> > > > I'm using the latest master (4.0.0-SNAPSHOT) and I've built the
> > > > .war
> > > with:
> > > >
> > > > mvn clean install -P mongodb -P geoindexing -DskipTests
> > > >
> > > >
> > > > Env config (relevant part):
> > > >
> > > > sc.useMongo=true
> > > > sc.use_geo=true
> > > > sc.geo.predicates=https://urldefense.proofpoint.com/v2/
> > > > url?u=http-3A__www.opengis.net_ont_geosparql-23asWKT&d=
> > > > DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > > > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=SJ_BJ1r2sYikKHP-BD
> > > > WH
> > > > Yi
> > > > 8s
> > > > dx-
> > > > JPGSFvLqcpH-Yg0I&e=
> > > > mongo.db.collectionprefix=rya_
> > > > mongo.geo.maxdist=1e-10
> > > >
> > > >
> > > > The test data:
> > > >
> > > > @prefix geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCR
> > > > VM
> > > > 8_
> > > > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXT
> > > > D0
> > > > qo
> > > > 8&
> > > > m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > > > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=> .
> > > > @prefix ex: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__example.org_&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYI
> > > > df
> > > > xI
> > > > q1 0&r= vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=BRLJlfnTwK-
> > > > kcz_WOUE1bhr_TSULRNWnHs7cS-eG7Qo&e=> .
> > > >
> > > > ex:Foo geo:hasGeometry ex:FooGeometry.
> > > > ex:FooGeometry geo:asWKT "POINT(5.091025039849683
> > > 51.55845016358455)"^^geo:
> > > > wktLiteral.
> > > >
> > > >
> > > > The test query:
> > > >
> > > > PREFIX geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCR
> > > > VM
> > > > 8_
> > > > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXT
> > > > D0
> > > > qo
> > > > 8&
> > > > m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > > > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=>
> > > > PREFIX geof: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__www.opengis.net_def_function_geosparql_&d=DwIBaQ&
> > > > c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > > > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=f89OhfL5oDrcth-
> > > > BdEvVqs50OWIjuyAKc0ghUyiTFUg&e=>
> > > >
> > > > SELECT ?s ?wkt
> > > > WHERE {
> > > >   ?s geo:asWKT ?wkt .
> > > >   FILTER(geof:sfWithin(?wkt, "POLYGON((5.034360992118195
> > > > 51.595144381441415,5.149717437430695
> > > > 51.595144381441415,5.149717437430695
> > > > 51.52086334303003,5.034360992118195
> > > > 51.52086334303003,5.034360992118195
> > > > 51.595144381441415))"^^geo:wktLiteral))
> > > > }
> > > >
> > > >
> > > > The indexed POINT geometry is located within the provided POLYGON.
> > > > Therefore, I would expect one binding-set as result.
> > > >
> > > > What should I do to get this working? Thanks!!
> > > >
> > > > NOTICE: This email message and all attachments transmitted with
> > > > it may contain privileged and confidential information, and
> > > > information that is protected by, and proprietary to, Parsons
> > > > Corporation, and is intended solely for the use of the addressee
> > > > for the specific purpose set forth in this communication. If the
> > > > reader of this message is not the intended recipient, you are
> > > > hereby notified that any reading, dissemination, distribution,
> > > > copying, or other use of this message or its attachments is
> > > > strictly prohibited, and you should delete this message and all
> > > > copies and backups thereof. The recipient may not further
> > > > distribute or use any of the information contained herein
> > > > without the express written authorization of the sender. If you
> > > > have received this message in error, or if you have any
> > > > questions regarding the use of the proprietary information
> > > > contained therein, please contact the sender of this message
> > > > immediately, and the sender will
> > > provide you with further instructions.
> > > >
> > >
> > > NOTICE: This email message and all attachments transmitted with it
> > > may contain privileged and confidential information, and
> > > information that is protected by, and proprietary to, Parsons
> > > Corporation, and is intended solely for the use of the addressee
> > > for the specific purpose set forth in this communication. If the
> > > reader of this message is not the intended recipient, you are
> > > hereby notified that any reading, dissemination, distribution,
> > > copying, or other use of this message or its attachments is
> > > strictly prohibited, and you should delete this message and all
> > > copies and backups thereof. The recipient may not further
> > > distribute or use any of the information contained herein without
> > > the express written authorization of the sender. If you have
> > > received this message in error, or if you have any questions
> > > regarding the use of the proprietary information contained
> > > therein, please contact the sender of this message immediately,
> > > and the sender will
> > provide you with further instructions.
> > >
> >
> > NOTICE: This email message and all attachments transmitted with it
> > may contain privileged and confidential information, and information
> > that is protected by, and proprietary to, Parsons Corporation, and
> > is intended solely for the use of the addressee for the specific
> > purpose set forth in this communication. If the reader of this
> > message is not the intended recipient, you are hereby notified that
> > any reading, dissemination, distribution, copying, or other use of
> > this message or its attachments is strictly prohibited, and you
> > should delete this message and all copies and backups thereof. The
> > recipient may not further distribute or use any of the information
> > contained herein without the express written authorization of the
> > sender. If you have received this message in error, or if you have
> > any questions regarding the use of the proprietary information
> > contained therein, please contact the sender of this message
> > immediately, and the sender will
> provide you with further instructions.
> >
>
> NOTICE: This email message and all attachments transmitted with it may
> contain privileged and confidential information, and information that
> is protected by, and proprietary to, Parsons Corporation, and is
> intended solely for the use of the addressee for the specific purpose
> set forth in this communication. If the reader of this message is not
> the intended recipient, you are hereby notified that any reading,
> dissemination, distribution, copying, or other use of this message or
> its attachments is strictly prohibited, and you should delete this
> message and all copies and backups thereof. The recipient may not
> further distribute or use any of the information contained herein
> without the express written authorization of the sender. If you have
> received this message in error, or if you have any questions regarding
> the use of the proprietary information contained therein, please
> contact the sender of this message immediately, and the sender will provide you with further instructions.
>

NOTICE: This email message and all attachments transmitted with it may contain privileged and confidential information, and information that is protected by, and proprietary to, Parsons Corporation, and is intended solely for the use of the addressee for the specific purpose set forth in this communication. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited, and you should delete this message and all copies and backups thereof. The recipient may not further distribute or use any of the information contained herein without the express written authorization of the sender. If you have received this message in error, or if you have any questions regarding the use of the proprietary information contained therein, please contact the sender of this message immediately, and the sender will provide you with further instructions.

RE: How to enable GeoSPARQL support for endpoint on MongoDB?

Posted by "Meier, Caleb" <Ca...@parsons.com>.
Hey Joost,

Another thing to try.  Try changing the class for the "sail" bean id in your spring-mongo-db-geo.xml file to org.apache.rya.indexing.GeoRyaSailFactory.  If that doesn't work, you can try adding the following properties to your "conf" bean id:

<property name="additionalIndexers">
-            <list>
-            <value type="java.lang.Class">org.apache.rya.indexing.mongodb.geo.MongoGeoIndexer</value>
-            </list>
-        </property>
-        <property name="optimizers">
-            <list>
-            <value type="java.lang.Class">org.apache.rya.indexing.GeoEnabledFilterFunctionOptimizer</value>
-            </list>
-        </property>

Caleb A. Meier, Ph.D.
Senior Software Engineer ♦ Analyst
Parsons Corporation
1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
Office:  (703)797-3066
Caleb.Meier@Parsons.com ♦ www.parsons.com

-----Original Message-----
From: Joost Farla <jo...@apiwise.nl>
Sent: Thursday, May 10, 2018 4:22 AM
To: dev@rya.incubator.apache.org
Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?

Hi Eric,

I've now added the following lines to spring-mongodb-geo.xml:

sc.use_geo=true
sc.geo.predicates=${sc.geo.predicates}

After that, the application complained about an unknown class:
MongoGeoIndexer.

I've now added rya.geo.mongo as extra dependency for web.rya, but the result-set remains empty.

Are you able to reproduce the issue?

Cheers, Joost



2018-05-09 20:38 GMT+02:00 White, Eric <Er...@parsons.com>:

> Nevermind.  Make that change in "spring-mongodb-geo.xml" NOT
> "spring-root-extensions.xml".  And add all the other geo related
> properties in there over too.
>
>     sc.geo.table=${sc.geo.table}
>     sc.geo.predicates=${sc.geo.predicates}
>     sc.geo.numPartitions=${sc.geo.numPartitions}
>
> -----Original Message-----
> From: White, Eric <Er...@parsons.com>
> Sent: Wednesday, May 09, 2018 2:22 PM
> To: dev@rya.incubator.apache.org
> Subject: RE: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Sounds like it's still not enabling geo entirely.  "sc.use_geo"
> appears to never be set in the conf.  Modify "spring-root-extensions.xml":
>
> Add in "sc.use_geo" to the "hadoopConf":
>      <hdp:configuration id="hadoopConf">
>         ...
>         ...
>         sc.use_geo=${sc.use_geo}
>         ...
>         ...
>       </hdp:configuration>
>
> Thanks,
> -Eric White
>
> -----Original Message-----
> From: Joost Farla <jo...@apiwise.nl>
> Sent: Wednesday, May 09, 2018 12:26 PM
> To: dev@rya.incubator.apache.org
> Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Hi Caleb,
>
> I've compared them and they seem identical. For the "unscrambled" data
> and query, I've just created a Gist:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__gist.
> github.com_joostfarla_5c075c8e468b6e40a85987b383174966&d=DwIFaQ&c=Nwf-
> pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBL
> Oe
> OHS3mAimFNgqQ&m=KSUZQOWwaQJYPo8HHuU06mwwn3ESiLKUAqpT0x9F_ns&s=uvqpZy_
> HrZYeHWtazH1sr2VMBlwXB--vNr7wBniHCxo&e=
>
> Cheers, Joost
>
>
>
> 2018-05-09 18:17 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:
>
> > Hey Joost,
> >
> > Have a look at the following IT to make sure that you are formatting
> > your queries correctly:
> >
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apac
> > he
> > _incubator-2Drya_blob_master_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54jo
> > YF
> > 7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNgqQ&m=KSUZQ
> > OW
> > waQJYPo8HHuU06mwwn3ESiLKUAqpT0x9F_ns&s=akVnlrNtzMve69IpjduRTAlnFXszb
> > tj 4A02dzNg9DrE&e=
> > extras/rya.geoindexing/geo.mongo/src/test/java/org/
> > apache/rya/indexing/mongo/MongoGeoIndexerFilterIT.java
> >
> > Carefully compare your geo predicate and your geo prefixes with the
> > predicate and prefixes in the above example.  Sorry, I can't tell
> > based on the example that you provided below because URLs get
> > scrambled by our e-mail server.
> >
> > Caleb A. Meier, Ph.D.
> > Senior Software Engineer ♦ Analyst
> > Parsons Corporation
> > 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> > Office:  (703)797-3066
> > Caleb.Meier@Parsons.com ♦ www.parsons.com
> >
> > -----Original Message-----
> > From: Joost Farla <jo...@apiwise.nl>
> > Sent: Wednesday, May 09, 2018 11:37 AM
> > To: dev@rya.incubator.apache.org
> > Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
> >
> > Hi Eric,
> >
> > Thanks for replying!
> >
> > Indexing and querying non-geo data is working well. However, when
> > filtering by a GeoSPARQL predicate, the query runs without errors,
> > but the result set is empty (where I would expect 1 binding). Please
> > see the exact data and query in my initial posting. Indexing
> > geo-data seems to work okay, since the rya_rya_geo collection is
> > created and populated with the correct statement.
> >
> > About spring-mongodb-geo.xml, I did already notice this and I did
> > already change the bean class to "org.apache.rya.indexing.
> GeoRyaSailFactory".
> > Unfortunately, this does not seem to have any effect.
> >
> > What else can I try?
> >
> > Cheers, Joost
> >
> >
> >
> > 2018-05-09 16:52 GMT+02:00 White, Eric <Er...@parsons.com>:
> >
> > > Joost,
> > >
> > > You might want to confirm that non-geo data can be added and queried.
> > > If only geo data isn't working then try stopping Tomcat and
> > > modifying your
> > > "<tomcat_dir>/webapps/web.rya/WEB-INF/spring/spring-mongodb-geo.xml"
> > file (back it up first).
> > >
> > > Change the line:
> > >     <bean id="sail" class="org.apache.rya.sail.config.RyaSailFactory"
> > > factory-method="getInstance">
> > > To:
> > >     <bean id="sail" class="org.apache.rya.indexing.GeoRyaSailFactory"
> > > factory-method="getInstance">
> > >
> > > Save the file and then restart Tomcat and try that out.  Hope that
> helps.
> > >
> > > Thanks,
> > > -Eric White
> > >
> > > -----Original Message-----
> > > From: Joost Farla <jo...@apiwise.nl>
> > > Sent: Wednesday, May 09, 2018 3:28 AM
> > > To: dev@rya.incubator.apache.org
> > > Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
> > >
> > > Hi Caleb,
> > >
> > > Thanks for your suggestion! I've performed a rebuild with only the
> > > geoindexing profile, but still no luck....
> > >
> > > Any clue?
> > >
> > > Cheers, Joost
> > >
> > >
> > >
> > > 2018-05-08 18:43 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:
> > >
> > > > Hey Joost,
> > > >
> > > > After glancing at the pom file for web.rya, it appears that you
> > > > are enabling two profiles that will build different versions of
> > > > the
> .war.
> > > > Have a look at the two profiles that appear at lines 189 and 196
> > > > in the web.rya pom in the following link:
> > > >
> > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_
> > > > me
> > > > ie
> > > > rc
> > > > aleb_incubator-2Drya_blob_master_web_&d=DwIFaQ&c=Nwf-pp4xtYRe0sC
> > > > RV
> > > > M8
> > > > _L
> > > > WH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimF
> > > > Ng
> > > > qQ
> > > > &m
> > > > =aMq-SY6ieesyfCsAA4jaNiCdWdoFihroeUYZKwuHDXQ&s=Jew4790glP7fcpwxQ
> > > > Gs
> > > > MS
> > > > x2
> > > > qwsReekxD5Kt48lfLD0c&e=
> > > > web.rya/pom.xml
> > > >
> > > > In particular, -P mongodb will build and deploy a mongo backed
> > > > web service with no geo enabled, and -P geoindexing deploys a
> > > > mongo backed web service with geo indexing enabled.  Could you
> > > > try building using only the geoindexing profile?  Hopefully that helps.
> > > >
> > > > Caleb
> > > >
> > > > Caleb A. Meier, Ph.D.
> > > > Senior Software Engineer ♦ Analyst Parsons Corporation
> > > > 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> > > > Office:  (703)797-3066
> > > > Caleb.Meier@Parsons.com ♦ www.parsons.com
> > > >
> > > > -----Original Message-----
> > > > From: Joost Farla <jo...@apiwise.nl>
> > > > Sent: Sunday, May 06, 2018 5:29 AM
> > > > To: dev@rya.incubator.apache.org
> > > > Subject: How to enable GeoSPARQL support for endpoint on MongoDB?
> > > >
> > > > Hi there,
> > > >
> > > > I've recently started experimenting with Rya on MongoDB. I've
> > > > been able to load geospatial data into MongoDB. The rya__triples
> > > > and rya_rya_geo collections are populated without issues.
> > > >
> > > > However, when I try to use GeoSPARQL functions via the provided
> > > > SPARQL endpoint implementation (web.rya), I get an empty result-set.
> > > > I've also tried to query using RDF4J directly, but same result.
> > > >
> > > > I'm using the latest master (4.0.0-SNAPSHOT) and I've built the
> > > > .war
> > > with:
> > > >
> > > > mvn clean install -P mongodb -P geoindexing -DskipTests
> > > >
> > > >
> > > > Env config (relevant part):
> > > >
> > > > sc.useMongo=true
> > > > sc.use_geo=true
> > > > sc.geo.predicates=https://urldefense.proofpoint.com/v2/
> > > > url?u=http-3A__www.opengis.net_ont_geosparql-23asWKT&d=
> > > > DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > > > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=SJ_BJ1r2sYikKHP-BD
> > > > WH
> > > > Yi
> > > > 8s
> > > > dx-
> > > > JPGSFvLqcpH-Yg0I&e=
> > > > mongo.db.collectionprefix=rya_
> > > > mongo.geo.maxdist=1e-10
> > > >
> > > >
> > > > The test data:
> > > >
> > > > @prefix geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCR
> > > > VM
> > > > 8_
> > > > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXT
> > > > D0
> > > > qo
> > > > 8&
> > > > m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > > > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=> .
> > > > @prefix ex: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__example.org_&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYI
> > > > df
> > > > xI
> > > > q1 0&r= vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=BRLJlfnTwK-
> > > > kcz_WOUE1bhr_TSULRNWnHs7cS-eG7Qo&e=> .
> > > >
> > > > ex:Foo geo:hasGeometry ex:FooGeometry.
> > > > ex:FooGeometry geo:asWKT "POINT(5.091025039849683
> > > 51.55845016358455)"^^geo:
> > > > wktLiteral.
> > > >
> > > >
> > > > The test query:
> > > >
> > > > PREFIX geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCR
> > > > VM
> > > > 8_
> > > > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXT
> > > > D0
> > > > qo
> > > > 8&
> > > > m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > > > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=>
> > > > PREFIX geof: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__www.opengis.net_def_function_geosparql_&d=DwIBaQ&
> > > > c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > > > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=f89OhfL5oDrcth-
> > > > BdEvVqs50OWIjuyAKc0ghUyiTFUg&e=>
> > > >
> > > > SELECT ?s ?wkt
> > > > WHERE {
> > > >   ?s geo:asWKT ?wkt .
> > > >   FILTER(geof:sfWithin(?wkt, "POLYGON((5.034360992118195
> > > > 51.595144381441415,5.149717437430695
> > > > 51.595144381441415,5.149717437430695
> > > > 51.52086334303003,5.034360992118195
> > > > 51.52086334303003,5.034360992118195
> > > > 51.595144381441415))"^^geo:wktLiteral))
> > > > }
> > > >
> > > >
> > > > The indexed POINT geometry is located within the provided POLYGON.
> > > > Therefore, I would expect one binding-set as result.
> > > >
> > > > What should I do to get this working? Thanks!!
> > > >
> > > > NOTICE: This email message and all attachments transmitted with
> > > > it may contain privileged and confidential information, and
> > > > information that is protected by, and proprietary to, Parsons
> > > > Corporation, and is intended solely for the use of the addressee
> > > > for the specific purpose set forth in this communication. If the
> > > > reader of this message is not the intended recipient, you are
> > > > hereby notified that any reading, dissemination, distribution,
> > > > copying, or other use of this message or its attachments is
> > > > strictly prohibited, and you should delete this message and all
> > > > copies and backups thereof. The recipient may not further
> > > > distribute or use any of the information contained herein
> > > > without the express written authorization of the sender. If you
> > > > have received this message in error, or if you have any
> > > > questions regarding the use of the proprietary information
> > > > contained therein, please contact the sender of this message
> > > > immediately, and the sender will
> > > provide you with further instructions.
> > > >
> > >
> > > NOTICE: This email message and all attachments transmitted with it
> > > may contain privileged and confidential information, and
> > > information that is protected by, and proprietary to, Parsons
> > > Corporation, and is intended solely for the use of the addressee
> > > for the specific purpose set forth in this communication. If the
> > > reader of this message is not the intended recipient, you are
> > > hereby notified that any reading, dissemination, distribution,
> > > copying, or other use of this message or its attachments is
> > > strictly prohibited, and you should delete this message and all
> > > copies and backups thereof. The recipient may not further
> > > distribute or use any of the information contained herein without
> > > the express written authorization of the sender. If you have
> > > received this message in error, or if you have any questions
> > > regarding the use of the proprietary information contained
> > > therein, please contact the sender of this message immediately,
> > > and the sender will
> > provide you with further instructions.
> > >
> >
> > NOTICE: This email message and all attachments transmitted with it
> > may contain privileged and confidential information, and information
> > that is protected by, and proprietary to, Parsons Corporation, and
> > is intended solely for the use of the addressee for the specific
> > purpose set forth in this communication. If the reader of this
> > message is not the intended recipient, you are hereby notified that
> > any reading, dissemination, distribution, copying, or other use of
> > this message or its attachments is strictly prohibited, and you
> > should delete this message and all copies and backups thereof. The
> > recipient may not further distribute or use any of the information
> > contained herein without the express written authorization of the
> > sender. If you have received this message in error, or if you have
> > any questions regarding the use of the proprietary information
> > contained therein, please contact the sender of this message
> > immediately, and the sender will
> provide you with further instructions.
> >
>
> NOTICE: This email message and all attachments transmitted with it may
> contain privileged and confidential information, and information that
> is protected by, and proprietary to, Parsons Corporation, and is
> intended solely for the use of the addressee for the specific purpose
> set forth in this communication. If the reader of this message is not
> the intended recipient, you are hereby notified that any reading,
> dissemination, distribution, copying, or other use of this message or
> its attachments is strictly prohibited, and you should delete this
> message and all copies and backups thereof. The recipient may not
> further distribute or use any of the information contained herein
> without the express written authorization of the sender. If you have
> received this message in error, or if you have any questions regarding
> the use of the proprietary information contained therein, please
> contact the sender of this message immediately, and the sender will provide you with further instructions.
>

NOTICE: This email message and all attachments transmitted with it may contain privileged and confidential information, and information that is protected by, and proprietary to, Parsons Corporation, and is intended solely for the use of the addressee for the specific purpose set forth in this communication. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited, and you should delete this message and all copies and backups thereof. The recipient may not further distribute or use any of the information contained herein without the express written authorization of the sender. If you have received this message in error, or if you have any questions regarding the use of the proprietary information contained therein, please contact the sender of this message immediately, and the sender will provide you with further instructions.

Re: How to enable GeoSPARQL support for endpoint on MongoDB?

Posted by Joost Farla <jo...@apiwise.nl>.
Hi Eric,

I've now added the following lines to spring-mongodb-geo.xml:

sc.use_geo=true
sc.geo.predicates=${sc.geo.predicates}

After that, the application complained about an unknown class:
MongoGeoIndexer.

I've now added rya.geo.mongo as extra dependency for web.rya, but the
result-set remains empty.

Are you able to reproduce the issue?

Cheers, Joost



2018-05-09 20:38 GMT+02:00 White, Eric <Er...@parsons.com>:

> Nevermind.  Make that change in "spring-mongodb-geo.xml" NOT
> "spring-root-extensions.xml".  And add all the other geo related properties
> in there over too.
>
>     sc.geo.table=${sc.geo.table}
>     sc.geo.predicates=${sc.geo.predicates}
>     sc.geo.numPartitions=${sc.geo.numPartitions}
>
> -----Original Message-----
> From: White, Eric <Er...@parsons.com>
> Sent: Wednesday, May 09, 2018 2:22 PM
> To: dev@rya.incubator.apache.org
> Subject: RE: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Sounds like it's still not enabling geo entirely.  "sc.use_geo" appears to
> never be set in the conf.  Modify "spring-root-extensions.xml":
>
> Add in "sc.use_geo" to the "hadoopConf":
>      <hdp:configuration id="hadoopConf">
>         ...
>         ...
>         sc.use_geo=${sc.use_geo}
>         ...
>         ...
>       </hdp:configuration>
>
> Thanks,
> -Eric White
>
> -----Original Message-----
> From: Joost Farla <jo...@apiwise.nl>
> Sent: Wednesday, May 09, 2018 12:26 PM
> To: dev@rya.incubator.apache.org
> Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Hi Caleb,
>
> I've compared them and they seem identical. For the "unscrambled" data and
> query, I've just created a Gist:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__gist.
> github.com_joostfarla_5c075c8e468b6e40a85987b383174966&d=DwIFaQ&c=Nwf-
> pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOe
> OHS3mAimFNgqQ&m=KSUZQOWwaQJYPo8HHuU06mwwn3ESiLKUAqpT0x9F_ns&s=uvqpZy_
> HrZYeHWtazH1sr2VMBlwXB--vNr7wBniHCxo&e=
>
> Cheers, Joost
>
>
>
> 2018-05-09 18:17 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:
>
> > Hey Joost,
> >
> > Have a look at the following IT to make sure that you are formatting
> > your queries correctly:
> >
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache
> > _incubator-2Drya_blob_master_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF
> > 7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNgqQ&m=KSUZQOW
> > waQJYPo8HHuU06mwwn3ESiLKUAqpT0x9F_ns&s=akVnlrNtzMve69IpjduRTAlnFXszbtj
> > 4A02dzNg9DrE&e= extras/rya.geoindexing/geo.mongo/src/test/java/org/
> > apache/rya/indexing/mongo/MongoGeoIndexerFilterIT.java
> >
> > Carefully compare your geo predicate and your geo prefixes with the
> > predicate and prefixes in the above example.  Sorry, I can't tell
> > based on the example that you provided below because URLs get
> > scrambled by our e-mail server.
> >
> > Caleb A. Meier, Ph.D.
> > Senior Software Engineer ♦ Analyst
> > Parsons Corporation
> > 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> > Office:  (703)797-3066
> > Caleb.Meier@Parsons.com ♦ www.parsons.com
> >
> > -----Original Message-----
> > From: Joost Farla <jo...@apiwise.nl>
> > Sent: Wednesday, May 09, 2018 11:37 AM
> > To: dev@rya.incubator.apache.org
> > Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
> >
> > Hi Eric,
> >
> > Thanks for replying!
> >
> > Indexing and querying non-geo data is working well. However, when
> > filtering by a GeoSPARQL predicate, the query runs without errors, but
> > the result set is empty (where I would expect 1 binding). Please see
> > the exact data and query in my initial posting. Indexing geo-data
> > seems to work okay, since the rya_rya_geo collection is created and
> > populated with the correct statement.
> >
> > About spring-mongodb-geo.xml, I did already notice this and I did
> > already change the bean class to "org.apache.rya.indexing.
> GeoRyaSailFactory".
> > Unfortunately, this does not seem to have any effect.
> >
> > What else can I try?
> >
> > Cheers, Joost
> >
> >
> >
> > 2018-05-09 16:52 GMT+02:00 White, Eric <Er...@parsons.com>:
> >
> > > Joost,
> > >
> > > You might want to confirm that non-geo data can be added and queried.
> > > If only geo data isn't working then try stopping Tomcat and
> > > modifying your
> > > "<tomcat_dir>/webapps/web.rya/WEB-INF/spring/spring-mongodb-geo.xml"
> > file (back it up first).
> > >
> > > Change the line:
> > >     <bean id="sail" class="org.apache.rya.sail.config.RyaSailFactory"
> > > factory-method="getInstance">
> > > To:
> > >     <bean id="sail" class="org.apache.rya.indexing.GeoRyaSailFactory"
> > > factory-method="getInstance">
> > >
> > > Save the file and then restart Tomcat and try that out.  Hope that
> helps.
> > >
> > > Thanks,
> > > -Eric White
> > >
> > > -----Original Message-----
> > > From: Joost Farla <jo...@apiwise.nl>
> > > Sent: Wednesday, May 09, 2018 3:28 AM
> > > To: dev@rya.incubator.apache.org
> > > Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
> > >
> > > Hi Caleb,
> > >
> > > Thanks for your suggestion! I've performed a rebuild with only the
> > > geoindexing profile, but still no luck....
> > >
> > > Any clue?
> > >
> > > Cheers, Joost
> > >
> > >
> > >
> > > 2018-05-08 18:43 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:
> > >
> > > > Hey Joost,
> > > >
> > > > After glancing at the pom file for web.rya, it appears that you
> > > > are enabling two profiles that will build different versions of the
> .war.
> > > > Have a look at the two profiles that appear at lines 189 and 196
> > > > in the web.rya pom in the following link:
> > > >
> > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_me
> > > > ie
> > > > rc
> > > > aleb_incubator-2Drya_blob_master_web_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRV
> > > > M8
> > > > _L
> > > > WH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNg
> > > > qQ
> > > > &m
> > > > =aMq-SY6ieesyfCsAA4jaNiCdWdoFihroeUYZKwuHDXQ&s=Jew4790glP7fcpwxQGs
> > > > MS
> > > > x2
> > > > qwsReekxD5Kt48lfLD0c&e=
> > > > web.rya/pom.xml
> > > >
> > > > In particular, -P mongodb will build and deploy a mongo backed web
> > > > service with no geo enabled, and -P geoindexing deploys a  mongo
> > > > backed web service with geo indexing enabled.  Could you try
> > > > building using only the geoindexing profile?  Hopefully that helps.
> > > >
> > > > Caleb
> > > >
> > > > Caleb A. Meier, Ph.D.
> > > > Senior Software Engineer ♦ Analyst Parsons Corporation
> > > > 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> > > > Office:  (703)797-3066
> > > > Caleb.Meier@Parsons.com ♦ www.parsons.com
> > > >
> > > > -----Original Message-----
> > > > From: Joost Farla <jo...@apiwise.nl>
> > > > Sent: Sunday, May 06, 2018 5:29 AM
> > > > To: dev@rya.incubator.apache.org
> > > > Subject: How to enable GeoSPARQL support for endpoint on MongoDB?
> > > >
> > > > Hi there,
> > > >
> > > > I've recently started experimenting with Rya on MongoDB. I've been
> > > > able to load geospatial data into MongoDB. The rya__triples and
> > > > rya_rya_geo collections are populated without issues.
> > > >
> > > > However, when I try to use GeoSPARQL functions via the provided
> > > > SPARQL endpoint implementation (web.rya), I get an empty result-set.
> > > > I've also tried to query using RDF4J directly, but same result.
> > > >
> > > > I'm using the latest master (4.0.0-SNAPSHOT) and I've built the
> > > > .war
> > > with:
> > > >
> > > > mvn clean install -P mongodb -P geoindexing -DskipTests
> > > >
> > > >
> > > > Env config (relevant part):
> > > >
> > > > sc.useMongo=true
> > > > sc.use_geo=true
> > > > sc.geo.predicates=https://urldefense.proofpoint.com/v2/
> > > > url?u=http-3A__www.opengis.net_ont_geosparql-23asWKT&d=
> > > > DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > > > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=SJ_BJ1r2sYikKHP-BDWH
> > > > Yi
> > > > 8s
> > > > dx-
> > > > JPGSFvLqcpH-Yg0I&e=
> > > > mongo.db.collectionprefix=rya_
> > > > mongo.geo.maxdist=1e-10
> > > >
> > > >
> > > > The test data:
> > > >
> > > > @prefix geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM
> > > > 8_
> > > > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0
> > > > qo
> > > > 8&
> > > > m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > > > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=> .
> > > > @prefix ex: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__example.org_&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdf
> > > > xI
> > > > q1 0&r= vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=BRLJlfnTwK-
> > > > kcz_WOUE1bhr_TSULRNWnHs7cS-eG7Qo&e=> .
> > > >
> > > > ex:Foo geo:hasGeometry ex:FooGeometry.
> > > > ex:FooGeometry geo:asWKT "POINT(5.091025039849683
> > > 51.55845016358455)"^^geo:
> > > > wktLiteral.
> > > >
> > > >
> > > > The test query:
> > > >
> > > > PREFIX geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM
> > > > 8_
> > > > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0
> > > > qo
> > > > 8&
> > > > m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > > > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=>
> > > > PREFIX geof: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > > 3A__www.opengis.net_def_function_geosparql_&d=DwIBaQ&
> > > > c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > > > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=f89OhfL5oDrcth-
> > > > BdEvVqs50OWIjuyAKc0ghUyiTFUg&e=>
> > > >
> > > > SELECT ?s ?wkt
> > > > WHERE {
> > > >   ?s geo:asWKT ?wkt .
> > > >   FILTER(geof:sfWithin(?wkt, "POLYGON((5.034360992118195
> > > > 51.595144381441415,5.149717437430695
> > > > 51.595144381441415,5.149717437430695
> > > > 51.52086334303003,5.034360992118195
> > > > 51.52086334303003,5.034360992118195
> > > > 51.595144381441415))"^^geo:wktLiteral))
> > > > }
> > > >
> > > >
> > > > The indexed POINT geometry is located within the provided POLYGON.
> > > > Therefore, I would expect one binding-set as result.
> > > >
> > > > What should I do to get this working? Thanks!!
> > > >
> > > > NOTICE: This email message and all attachments transmitted with it
> > > > may contain privileged and confidential information, and
> > > > information that is protected by, and proprietary to, Parsons
> > > > Corporation, and is intended solely for the use of the addressee
> > > > for the specific purpose set forth in this communication. If the
> > > > reader of this message is not the intended recipient, you are
> > > > hereby notified that any reading, dissemination, distribution,
> > > > copying, or other use of this message or its attachments is
> > > > strictly prohibited, and you should delete this message and all
> > > > copies and backups thereof. The recipient may not further
> > > > distribute or use any of the information contained herein without
> > > > the express written authorization of the sender. If you have
> > > > received this message in error, or if you have any questions
> > > > regarding the use of the proprietary information contained
> > > > therein, please contact the sender of this message immediately,
> > > > and the sender will
> > > provide you with further instructions.
> > > >
> > >
> > > NOTICE: This email message and all attachments transmitted with it
> > > may contain privileged and confidential information, and information
> > > that is protected by, and proprietary to, Parsons Corporation, and
> > > is intended solely for the use of the addressee for the specific
> > > purpose set forth in this communication. If the reader of this
> > > message is not the intended recipient, you are hereby notified that
> > > any reading, dissemination, distribution, copying, or other use of
> > > this message or its attachments is strictly prohibited, and you
> > > should delete this message and all copies and backups thereof. The
> > > recipient may not further distribute or use any of the information
> > > contained herein without the express written authorization of the
> > > sender. If you have received this message in error, or if you have
> > > any questions regarding the use of the proprietary information
> > > contained therein, please contact the sender of this message
> > > immediately, and the sender will
> > provide you with further instructions.
> > >
> >
> > NOTICE: This email message and all attachments transmitted with it may
> > contain privileged and confidential information, and information that
> > is protected by, and proprietary to, Parsons Corporation, and is
> > intended solely for the use of the addressee for the specific purpose
> > set forth in this communication. If the reader of this message is not
> > the intended recipient, you are hereby notified that any reading,
> > dissemination, distribution, copying, or other use of this message or
> > its attachments is strictly prohibited, and you should delete this
> > message and all copies and backups thereof. The recipient may not
> > further distribute or use any of the information contained herein
> > without the express written authorization of the sender. If you have
> > received this message in error, or if you have any questions regarding
> > the use of the proprietary information contained therein, please
> > contact the sender of this message immediately, and the sender will
> provide you with further instructions.
> >
>
> NOTICE: This email message and all attachments transmitted with it may
> contain privileged and confidential information, and information that is
> protected by, and proprietary to, Parsons Corporation, and is intended
> solely for the use of the addressee for the specific purpose set forth in
> this communication. If the reader of this message is not the intended
> recipient, you are hereby notified that any reading, dissemination,
> distribution, copying, or other use of this message or its attachments is
> strictly prohibited, and you should delete this message and all copies and
> backups thereof. The recipient may not further distribute or use any of the
> information contained herein without the express written authorization of
> the sender. If you have received this message in error, or if you have any
> questions regarding the use of the proprietary information contained
> therein, please contact the sender of this message immediately, and the
> sender will provide you with further instructions.
>

RE: How to enable GeoSPARQL support for endpoint on MongoDB?

Posted by "White, Eric" <Er...@parsons.com>.
Nevermind.  Make that change in "spring-mongodb-geo.xml" NOT "spring-root-extensions.xml".  And add all the other geo related properties in there over too.

    sc.geo.table=${sc.geo.table}
    sc.geo.predicates=${sc.geo.predicates}
    sc.geo.numPartitions=${sc.geo.numPartitions} 

-----Original Message-----
From: White, Eric <Er...@parsons.com> 
Sent: Wednesday, May 09, 2018 2:22 PM
To: dev@rya.incubator.apache.org
Subject: RE: How to enable GeoSPARQL support for endpoint on MongoDB?

Sounds like it's still not enabling geo entirely.  "sc.use_geo" appears to never be set in the conf.  Modify "spring-root-extensions.xml":

Add in "sc.use_geo" to the "hadoopConf":
     <hdp:configuration id="hadoopConf">
        ...
        ...
        sc.use_geo=${sc.use_geo}
        ...
        ...
      </hdp:configuration>

Thanks,
-Eric White

-----Original Message-----
From: Joost Farla <jo...@apiwise.nl>
Sent: Wednesday, May 09, 2018 12:26 PM
To: dev@rya.incubator.apache.org
Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?

Hi Caleb,

I've compared them and they seem identical. For the "unscrambled" data and query, I've just created a Gist:

https://urldefense.proofpoint.com/v2/url?u=https-3A__gist.github.com_joostfarla_5c075c8e468b6e40a85987b383174966&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNgqQ&m=KSUZQOWwaQJYPo8HHuU06mwwn3ESiLKUAqpT0x9F_ns&s=uvqpZy_HrZYeHWtazH1sr2VMBlwXB--vNr7wBniHCxo&e=

Cheers, Joost



2018-05-09 18:17 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:

> Hey Joost,
>
> Have a look at the following IT to make sure that you are formatting 
> your queries correctly:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache
> _incubator-2Drya_blob_master_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF
> 7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNgqQ&m=KSUZQOW
> waQJYPo8HHuU06mwwn3ESiLKUAqpT0x9F_ns&s=akVnlrNtzMve69IpjduRTAlnFXszbtj
> 4A02dzNg9DrE&e= extras/rya.geoindexing/geo.mongo/src/test/java/org/
> apache/rya/indexing/mongo/MongoGeoIndexerFilterIT.java
>
> Carefully compare your geo predicate and your geo prefixes with the 
> predicate and prefixes in the above example.  Sorry, I can't tell 
> based on the example that you provided below because URLs get 
> scrambled by our e-mail server.
>
> Caleb A. Meier, Ph.D.
> Senior Software Engineer ♦ Analyst
> Parsons Corporation
> 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> Office:  (703)797-3066
> Caleb.Meier@Parsons.com ♦ www.parsons.com
>
> -----Original Message-----
> From: Joost Farla <jo...@apiwise.nl>
> Sent: Wednesday, May 09, 2018 11:37 AM
> To: dev@rya.incubator.apache.org
> Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Hi Eric,
>
> Thanks for replying!
>
> Indexing and querying non-geo data is working well. However, when 
> filtering by a GeoSPARQL predicate, the query runs without errors, but 
> the result set is empty (where I would expect 1 binding). Please see 
> the exact data and query in my initial posting. Indexing geo-data 
> seems to work okay, since the rya_rya_geo collection is created and 
> populated with the correct statement.
>
> About spring-mongodb-geo.xml, I did already notice this and I did 
> already change the bean class to "org.apache.rya.indexing.GeoRyaSailFactory".
> Unfortunately, this does not seem to have any effect.
>
> What else can I try?
>
> Cheers, Joost
>
>
>
> 2018-05-09 16:52 GMT+02:00 White, Eric <Er...@parsons.com>:
>
> > Joost,
> >
> > You might want to confirm that non-geo data can be added and queried.
> > If only geo data isn't working then try stopping Tomcat and 
> > modifying your 
> > "<tomcat_dir>/webapps/web.rya/WEB-INF/spring/spring-mongodb-geo.xml"
> file (back it up first).
> >
> > Change the line:
> >     <bean id="sail" class="org.apache.rya.sail.config.RyaSailFactory"
> > factory-method="getInstance">
> > To:
> >     <bean id="sail" class="org.apache.rya.indexing.GeoRyaSailFactory"
> > factory-method="getInstance">
> >
> > Save the file and then restart Tomcat and try that out.  Hope that helps.
> >
> > Thanks,
> > -Eric White
> >
> > -----Original Message-----
> > From: Joost Farla <jo...@apiwise.nl>
> > Sent: Wednesday, May 09, 2018 3:28 AM
> > To: dev@rya.incubator.apache.org
> > Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
> >
> > Hi Caleb,
> >
> > Thanks for your suggestion! I've performed a rebuild with only the 
> > geoindexing profile, but still no luck....
> >
> > Any clue?
> >
> > Cheers, Joost
> >
> >
> >
> > 2018-05-08 18:43 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:
> >
> > > Hey Joost,
> > >
> > > After glancing at the pom file for web.rya, it appears that you 
> > > are enabling two profiles that will build different versions of the .war.
> > > Have a look at the two profiles that appear at lines 189 and 196 
> > > in the web.rya pom in the following link:
> > >
> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_me
> > > ie
> > > rc
> > > aleb_incubator-2Drya_blob_master_web_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRV
> > > M8
> > > _L
> > > WH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNg
> > > qQ
> > > &m
> > > =aMq-SY6ieesyfCsAA4jaNiCdWdoFihroeUYZKwuHDXQ&s=Jew4790glP7fcpwxQGs
> > > MS
> > > x2
> > > qwsReekxD5Kt48lfLD0c&e=
> > > web.rya/pom.xml
> > >
> > > In particular, -P mongodb will build and deploy a mongo backed web 
> > > service with no geo enabled, and -P geoindexing deploys a  mongo 
> > > backed web service with geo indexing enabled.  Could you try 
> > > building using only the geoindexing profile?  Hopefully that helps.
> > >
> > > Caleb
> > >
> > > Caleb A. Meier, Ph.D.
> > > Senior Software Engineer ♦ Analyst Parsons Corporation
> > > 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> > > Office:  (703)797-3066
> > > Caleb.Meier@Parsons.com ♦ www.parsons.com
> > >
> > > -----Original Message-----
> > > From: Joost Farla <jo...@apiwise.nl>
> > > Sent: Sunday, May 06, 2018 5:29 AM
> > > To: dev@rya.incubator.apache.org
> > > Subject: How to enable GeoSPARQL support for endpoint on MongoDB?
> > >
> > > Hi there,
> > >
> > > I've recently started experimenting with Rya on MongoDB. I've been 
> > > able to load geospatial data into MongoDB. The rya__triples and 
> > > rya_rya_geo collections are populated without issues.
> > >
> > > However, when I try to use GeoSPARQL functions via the provided 
> > > SPARQL endpoint implementation (web.rya), I get an empty result-set.
> > > I've also tried to query using RDF4J directly, but same result.
> > >
> > > I'm using the latest master (4.0.0-SNAPSHOT) and I've built the 
> > > .war
> > with:
> > >
> > > mvn clean install -P mongodb -P geoindexing -DskipTests
> > >
> > >
> > > Env config (relevant part):
> > >
> > > sc.useMongo=true
> > > sc.use_geo=true
> > > sc.geo.predicates=https://urldefense.proofpoint.com/v2/
> > > url?u=http-3A__www.opengis.net_ont_geosparql-23asWKT&d=
> > > DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=SJ_BJ1r2sYikKHP-BDWH
> > > Yi
> > > 8s
> > > dx-
> > > JPGSFvLqcpH-Yg0I&e=
> > > mongo.db.collectionprefix=rya_
> > > mongo.geo.maxdist=1e-10
> > >
> > >
> > > The test data:
> > >
> > > @prefix geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM
> > > 8_
> > > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0
> > > qo
> > > 8&
> > > m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=> .
> > > @prefix ex: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__example.org_&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdf
> > > xI
> > > q1 0&r= vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=BRLJlfnTwK-
> > > kcz_WOUE1bhr_TSULRNWnHs7cS-eG7Qo&e=> .
> > >
> > > ex:Foo geo:hasGeometry ex:FooGeometry.
> > > ex:FooGeometry geo:asWKT "POINT(5.091025039849683
> > 51.55845016358455)"^^geo:
> > > wktLiteral.
> > >
> > >
> > > The test query:
> > >
> > > PREFIX geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM
> > > 8_
> > > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0
> > > qo
> > > 8&
> > > m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=>
> > > PREFIX geof: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__www.opengis.net_def_function_geosparql_&d=DwIBaQ&
> > > c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=f89OhfL5oDrcth-
> > > BdEvVqs50OWIjuyAKc0ghUyiTFUg&e=>
> > >
> > > SELECT ?s ?wkt
> > > WHERE {
> > >   ?s geo:asWKT ?wkt .
> > >   FILTER(geof:sfWithin(?wkt, "POLYGON((5.034360992118195
> > > 51.595144381441415,5.149717437430695
> > > 51.595144381441415,5.149717437430695
> > > 51.52086334303003,5.034360992118195
> > > 51.52086334303003,5.034360992118195
> > > 51.595144381441415))"^^geo:wktLiteral))
> > > }
> > >
> > >
> > > The indexed POINT geometry is located within the provided POLYGON.
> > > Therefore, I would expect one binding-set as result.
> > >
> > > What should I do to get this working? Thanks!!
> > >
> > > NOTICE: This email message and all attachments transmitted with it 
> > > may contain privileged and confidential information, and 
> > > information that is protected by, and proprietary to, Parsons 
> > > Corporation, and is intended solely for the use of the addressee 
> > > for the specific purpose set forth in this communication. If the 
> > > reader of this message is not the intended recipient, you are 
> > > hereby notified that any reading, dissemination, distribution, 
> > > copying, or other use of this message or its attachments is 
> > > strictly prohibited, and you should delete this message and all 
> > > copies and backups thereof. The recipient may not further 
> > > distribute or use any of the information contained herein without 
> > > the express written authorization of the sender. If you have 
> > > received this message in error, or if you have any questions 
> > > regarding the use of the proprietary information contained 
> > > therein, please contact the sender of this message immediately, 
> > > and the sender will
> > provide you with further instructions.
> > >
> >
> > NOTICE: This email message and all attachments transmitted with it 
> > may contain privileged and confidential information, and information 
> > that is protected by, and proprietary to, Parsons Corporation, and 
> > is intended solely for the use of the addressee for the specific 
> > purpose set forth in this communication. If the reader of this 
> > message is not the intended recipient, you are hereby notified that 
> > any reading, dissemination, distribution, copying, or other use of 
> > this message or its attachments is strictly prohibited, and you 
> > should delete this message and all copies and backups thereof. The 
> > recipient may not further distribute or use any of the information 
> > contained herein without the express written authorization of the 
> > sender. If you have received this message in error, or if you have 
> > any questions regarding the use of the proprietary information 
> > contained therein, please contact the sender of this message 
> > immediately, and the sender will
> provide you with further instructions.
> >
>
> NOTICE: This email message and all attachments transmitted with it may 
> contain privileged and confidential information, and information that 
> is protected by, and proprietary to, Parsons Corporation, and is 
> intended solely for the use of the addressee for the specific purpose 
> set forth in this communication. If the reader of this message is not 
> the intended recipient, you are hereby notified that any reading, 
> dissemination, distribution, copying, or other use of this message or 
> its attachments is strictly prohibited, and you should delete this 
> message and all copies and backups thereof. The recipient may not 
> further distribute or use any of the information contained herein 
> without the express written authorization of the sender. If you have 
> received this message in error, or if you have any questions regarding 
> the use of the proprietary information contained therein, please 
> contact the sender of this message immediately, and the sender will provide you with further instructions.
>

NOTICE: This email message and all attachments transmitted with it may contain privileged and confidential information, and information that is protected by, and proprietary to, Parsons Corporation, and is intended solely for the use of the addressee for the specific purpose set forth in this communication. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited, and you should delete this message and all copies and backups thereof. The recipient may not further distribute or use any of the information contained herein without the express written authorization of the sender. If you have received this message in error, or if you have any questions regarding the use of the proprietary information contained therein, please contact the sender of this message immediately, and the sender will provide you with further instructions.

RE: How to enable GeoSPARQL support for endpoint on MongoDB?

Posted by "White, Eric" <Er...@parsons.com>.
Sounds like it's still not enabling geo entirely.  "sc.use_geo" appears to never be set in the conf.  Modify "spring-root-extensions.xml":

Add in "sc.use_geo" to the "hadoopConf":
     <hdp:configuration id="hadoopConf">
        ...
        ...
        sc.use_geo=${sc.use_geo}
        ...
        ...
      </hdp:configuration>

Thanks,
-Eric White

-----Original Message-----
From: Joost Farla <jo...@apiwise.nl>
Sent: Wednesday, May 09, 2018 12:26 PM
To: dev@rya.incubator.apache.org
Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?

Hi Caleb,

I've compared them and they seem identical. For the "unscrambled" data and query, I've just created a Gist:

https://urldefense.proofpoint.com/v2/url?u=https-3A__gist.github.com_joostfarla_5c075c8e468b6e40a85987b383174966&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNgqQ&m=KSUZQOWwaQJYPo8HHuU06mwwn3ESiLKUAqpT0x9F_ns&s=uvqpZy_HrZYeHWtazH1sr2VMBlwXB--vNr7wBniHCxo&e=

Cheers, Joost



2018-05-09 18:17 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:

> Hey Joost,
>
> Have a look at the following IT to make sure that you are formatting
> your queries correctly:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache
> _incubator-2Drya_blob_master_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF
> 7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNgqQ&m=KSUZQOW
> waQJYPo8HHuU06mwwn3ESiLKUAqpT0x9F_ns&s=akVnlrNtzMve69IpjduRTAlnFXszbtj
> 4A02dzNg9DrE&e= extras/rya.geoindexing/geo.mongo/src/test/java/org/
> apache/rya/indexing/mongo/MongoGeoIndexerFilterIT.java
>
> Carefully compare your geo predicate and your geo prefixes with the
> predicate and prefixes in the above example.  Sorry, I can't tell
> based on the example that you provided below because URLs get
> scrambled by our e-mail server.
>
> Caleb A. Meier, Ph.D.
> Senior Software Engineer ♦ Analyst
> Parsons Corporation
> 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> Office:  (703)797-3066
> Caleb.Meier@Parsons.com ♦ www.parsons.com
>
> -----Original Message-----
> From: Joost Farla <jo...@apiwise.nl>
> Sent: Wednesday, May 09, 2018 11:37 AM
> To: dev@rya.incubator.apache.org
> Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Hi Eric,
>
> Thanks for replying!
>
> Indexing and querying non-geo data is working well. However, when
> filtering by a GeoSPARQL predicate, the query runs without errors, but
> the result set is empty (where I would expect 1 binding). Please see
> the exact data and query in my initial posting. Indexing geo-data
> seems to work okay, since the rya_rya_geo collection is created and
> populated with the correct statement.
>
> About spring-mongodb-geo.xml, I did already notice this and I did
> already change the bean class to "org.apache.rya.indexing.GeoRyaSailFactory".
> Unfortunately, this does not seem to have any effect.
>
> What else can I try?
>
> Cheers, Joost
>
>
>
> 2018-05-09 16:52 GMT+02:00 White, Eric <Er...@parsons.com>:
>
> > Joost,
> >
> > You might want to confirm that non-geo data can be added and queried.
> > If only geo data isn't working then try stopping Tomcat and
> > modifying your
> > "<tomcat_dir>/webapps/web.rya/WEB-INF/spring/spring-mongodb-geo.xml"
> file (back it up first).
> >
> > Change the line:
> >     <bean id="sail" class="org.apache.rya.sail.config.RyaSailFactory"
> > factory-method="getInstance">
> > To:
> >     <bean id="sail" class="org.apache.rya.indexing.GeoRyaSailFactory"
> > factory-method="getInstance">
> >
> > Save the file and then restart Tomcat and try that out.  Hope that helps.
> >
> > Thanks,
> > -Eric White
> >
> > -----Original Message-----
> > From: Joost Farla <jo...@apiwise.nl>
> > Sent: Wednesday, May 09, 2018 3:28 AM
> > To: dev@rya.incubator.apache.org
> > Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
> >
> > Hi Caleb,
> >
> > Thanks for your suggestion! I've performed a rebuild with only the
> > geoindexing profile, but still no luck....
> >
> > Any clue?
> >
> > Cheers, Joost
> >
> >
> >
> > 2018-05-08 18:43 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:
> >
> > > Hey Joost,
> > >
> > > After glancing at the pom file for web.rya, it appears that you
> > > are enabling two profiles that will build different versions of the .war.
> > > Have a look at the two profiles that appear at lines 189 and 196
> > > in the web.rya pom in the following link:
> > >
> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_me
> > > ie
> > > rc
> > > aleb_incubator-2Drya_blob_master_web_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRV
> > > M8
> > > _L
> > > WH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNg
> > > qQ
> > > &m
> > > =aMq-SY6ieesyfCsAA4jaNiCdWdoFihroeUYZKwuHDXQ&s=Jew4790glP7fcpwxQGs
> > > MS
> > > x2
> > > qwsReekxD5Kt48lfLD0c&e=
> > > web.rya/pom.xml
> > >
> > > In particular, -P mongodb will build and deploy a mongo backed web
> > > service with no geo enabled, and -P geoindexing deploys a  mongo
> > > backed web service with geo indexing enabled.  Could you try
> > > building using only the geoindexing profile?  Hopefully that helps.
> > >
> > > Caleb
> > >
> > > Caleb A. Meier, Ph.D.
> > > Senior Software Engineer ♦ Analyst Parsons Corporation
> > > 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> > > Office:  (703)797-3066
> > > Caleb.Meier@Parsons.com ♦ www.parsons.com
> > >
> > > -----Original Message-----
> > > From: Joost Farla <jo...@apiwise.nl>
> > > Sent: Sunday, May 06, 2018 5:29 AM
> > > To: dev@rya.incubator.apache.org
> > > Subject: How to enable GeoSPARQL support for endpoint on MongoDB?
> > >
> > > Hi there,
> > >
> > > I've recently started experimenting with Rya on MongoDB. I've been
> > > able to load geospatial data into MongoDB. The rya__triples and
> > > rya_rya_geo collections are populated without issues.
> > >
> > > However, when I try to use GeoSPARQL functions via the provided
> > > SPARQL endpoint implementation (web.rya), I get an empty result-set.
> > > I've also tried to query using RDF4J directly, but same result.
> > >
> > > I'm using the latest master (4.0.0-SNAPSHOT) and I've built the
> > > .war
> > with:
> > >
> > > mvn clean install -P mongodb -P geoindexing -DskipTests
> > >
> > >
> > > Env config (relevant part):
> > >
> > > sc.useMongo=true
> > > sc.use_geo=true
> > > sc.geo.predicates=https://urldefense.proofpoint.com/v2/
> > > url?u=http-3A__www.opengis.net_ont_geosparql-23asWKT&d=
> > > DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=SJ_BJ1r2sYikKHP-BDWH
> > > Yi
> > > 8s
> > > dx-
> > > JPGSFvLqcpH-Yg0I&e=
> > > mongo.db.collectionprefix=rya_
> > > mongo.geo.maxdist=1e-10
> > >
> > >
> > > The test data:
> > >
> > > @prefix geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM
> > > 8_
> > > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0
> > > qo
> > > 8&
> > > m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=> .
> > > @prefix ex: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__example.org_&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdf
> > > xI
> > > q1 0&r= vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=BRLJlfnTwK-
> > > kcz_WOUE1bhr_TSULRNWnHs7cS-eG7Qo&e=> .
> > >
> > > ex:Foo geo:hasGeometry ex:FooGeometry.
> > > ex:FooGeometry geo:asWKT "POINT(5.091025039849683
> > 51.55845016358455)"^^geo:
> > > wktLiteral.
> > >
> > >
> > > The test query:
> > >
> > > PREFIX geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM
> > > 8_
> > > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0
> > > qo
> > > 8&
> > > m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=>
> > > PREFIX geof: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__www.opengis.net_def_function_geosparql_&d=DwIBaQ&
> > > c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=f89OhfL5oDrcth-
> > > BdEvVqs50OWIjuyAKc0ghUyiTFUg&e=>
> > >
> > > SELECT ?s ?wkt
> > > WHERE {
> > >   ?s geo:asWKT ?wkt .
> > >   FILTER(geof:sfWithin(?wkt, "POLYGON((5.034360992118195
> > > 51.595144381441415,5.149717437430695
> > > 51.595144381441415,5.149717437430695
> > > 51.52086334303003,5.034360992118195
> > > 51.52086334303003,5.034360992118195
> > > 51.595144381441415))"^^geo:wktLiteral))
> > > }
> > >
> > >
> > > The indexed POINT geometry is located within the provided POLYGON.
> > > Therefore, I would expect one binding-set as result.
> > >
> > > What should I do to get this working? Thanks!!
> > >
> > > NOTICE: This email message and all attachments transmitted with it
> > > may contain privileged and confidential information, and
> > > information that is protected by, and proprietary to, Parsons
> > > Corporation, and is intended solely for the use of the addressee
> > > for the specific purpose set forth in this communication. If the
> > > reader of this message is not the intended recipient, you are
> > > hereby notified that any reading, dissemination, distribution,
> > > copying, or other use of this message or its attachments is
> > > strictly prohibited, and you should delete this message and all
> > > copies and backups thereof. The recipient may not further
> > > distribute or use any of the information contained herein without
> > > the express written authorization of the sender. If you have
> > > received this message in error, or if you have any questions
> > > regarding the use of the proprietary information contained
> > > therein, please contact the sender of this message immediately,
> > > and the sender will
> > provide you with further instructions.
> > >
> >
> > NOTICE: This email message and all attachments transmitted with it
> > may contain privileged and confidential information, and information
> > that is protected by, and proprietary to, Parsons Corporation, and
> > is intended solely for the use of the addressee for the specific
> > purpose set forth in this communication. If the reader of this
> > message is not the intended recipient, you are hereby notified that
> > any reading, dissemination, distribution, copying, or other use of
> > this message or its attachments is strictly prohibited, and you
> > should delete this message and all copies and backups thereof. The
> > recipient may not further distribute or use any of the information
> > contained herein without the express written authorization of the
> > sender. If you have received this message in error, or if you have
> > any questions regarding the use of the proprietary information
> > contained therein, please contact the sender of this message
> > immediately, and the sender will
> provide you with further instructions.
> >
>
> NOTICE: This email message and all attachments transmitted with it may
> contain privileged and confidential information, and information that
> is protected by, and proprietary to, Parsons Corporation, and is
> intended solely for the use of the addressee for the specific purpose
> set forth in this communication. If the reader of this message is not
> the intended recipient, you are hereby notified that any reading,
> dissemination, distribution, copying, or other use of this message or
> its attachments is strictly prohibited, and you should delete this
> message and all copies and backups thereof. The recipient may not
> further distribute or use any of the information contained herein
> without the express written authorization of the sender. If you have
> received this message in error, or if you have any questions regarding
> the use of the proprietary information contained therein, please
> contact the sender of this message immediately, and the sender will provide you with further instructions.
>

NOTICE: This email message and all attachments transmitted with it may contain privileged and confidential information, and information that is protected by, and proprietary to, Parsons Corporation, and is intended solely for the use of the addressee for the specific purpose set forth in this communication. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited, and you should delete this message and all copies and backups thereof. The recipient may not further distribute or use any of the information contained herein without the express written authorization of the sender. If you have received this message in error, or if you have any questions regarding the use of the proprietary information contained therein, please contact the sender of this message immediately, and the sender will provide you with further instructions.

Re: How to enable GeoSPARQL support for endpoint on MongoDB?

Posted by Joost Farla <jo...@apiwise.nl>.
Hi Caleb,

I've compared them and they seem identical. For the "unscrambled" data and
query, I've just created a Gist:

https://gist.github.com/joostfarla/5c075c8e468b6e40a85987b383174966

Cheers, Joost



2018-05-09 18:17 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:

> Hey Joost,
>
> Have a look at the following IT to make sure that you are formatting your
> queries correctly:
>
> https://github.com/apache/incubator-rya/blob/master/
> extras/rya.geoindexing/geo.mongo/src/test/java/org/
> apache/rya/indexing/mongo/MongoGeoIndexerFilterIT.java
>
> Carefully compare your geo predicate and your geo prefixes with the
> predicate and prefixes in the above example.  Sorry, I can't tell based on
> the example that you provided below because URLs get scrambled by our
> e-mail server.
>
> Caleb A. Meier, Ph.D.
> Senior Software Engineer ♦ Analyst
> Parsons Corporation
> 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> Office:  (703)797-3066
> Caleb.Meier@Parsons.com ♦ www.parsons.com
>
> -----Original Message-----
> From: Joost Farla <jo...@apiwise.nl>
> Sent: Wednesday, May 09, 2018 11:37 AM
> To: dev@rya.incubator.apache.org
> Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Hi Eric,
>
> Thanks for replying!
>
> Indexing and querying non-geo data is working well. However, when
> filtering by a GeoSPARQL predicate, the query runs without errors, but the
> result set is empty (where I would expect 1 binding). Please see the exact
> data and query in my initial posting. Indexing geo-data seems to work okay,
> since the rya_rya_geo collection is created and populated with the correct
> statement.
>
> About spring-mongodb-geo.xml, I did already notice this and I did already
> change the bean class to "org.apache.rya.indexing.GeoRyaSailFactory".
> Unfortunately, this does not seem to have any effect.
>
> What else can I try?
>
> Cheers, Joost
>
>
>
> 2018-05-09 16:52 GMT+02:00 White, Eric <Er...@parsons.com>:
>
> > Joost,
> >
> > You might want to confirm that non-geo data can be added and queried.
> > If only geo data isn't working then try stopping Tomcat and modifying
> > your
> > "<tomcat_dir>/webapps/web.rya/WEB-INF/spring/spring-mongodb-geo.xml"
> file (back it up first).
> >
> > Change the line:
> >     <bean id="sail" class="org.apache.rya.sail.config.RyaSailFactory"
> > factory-method="getInstance">
> > To:
> >     <bean id="sail" class="org.apache.rya.indexing.GeoRyaSailFactory"
> > factory-method="getInstance">
> >
> > Save the file and then restart Tomcat and try that out.  Hope that helps.
> >
> > Thanks,
> > -Eric White
> >
> > -----Original Message-----
> > From: Joost Farla <jo...@apiwise.nl>
> > Sent: Wednesday, May 09, 2018 3:28 AM
> > To: dev@rya.incubator.apache.org
> > Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
> >
> > Hi Caleb,
> >
> > Thanks for your suggestion! I've performed a rebuild with only the
> > geoindexing profile, but still no luck....
> >
> > Any clue?
> >
> > Cheers, Joost
> >
> >
> >
> > 2018-05-08 18:43 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:
> >
> > > Hey Joost,
> > >
> > > After glancing at the pom file for web.rya, it appears that you are
> > > enabling two profiles that will build different versions of the .war.
> > > Have a look at the two profiles that appear at lines 189 and 196 in
> > > the web.rya pom in the following link:
> > >
> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_meie
> > > rc
> > > aleb_incubator-2Drya_blob_master_web_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8
> > > _L
> > > WH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNgqQ
> > > &m
> > > =aMq-SY6ieesyfCsAA4jaNiCdWdoFihroeUYZKwuHDXQ&s=Jew4790glP7fcpwxQGsMS
> > > x2
> > > qwsReekxD5Kt48lfLD0c&e=
> > > web.rya/pom.xml
> > >
> > > In particular, -P mongodb will build and deploy a mongo backed web
> > > service with no geo enabled, and -P geoindexing deploys a  mongo
> > > backed web service with geo indexing enabled.  Could you try
> > > building using only the geoindexing profile?  Hopefully that helps.
> > >
> > > Caleb
> > >
> > > Caleb A. Meier, Ph.D.
> > > Senior Software Engineer ♦ Analyst
> > > Parsons Corporation
> > > 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> > > Office:  (703)797-3066
> > > Caleb.Meier@Parsons.com ♦ www.parsons.com
> > >
> > > -----Original Message-----
> > > From: Joost Farla <jo...@apiwise.nl>
> > > Sent: Sunday, May 06, 2018 5:29 AM
> > > To: dev@rya.incubator.apache.org
> > > Subject: How to enable GeoSPARQL support for endpoint on MongoDB?
> > >
> > > Hi there,
> > >
> > > I've recently started experimenting with Rya on MongoDB. I've been
> > > able to load geospatial data into MongoDB. The rya__triples and
> > > rya_rya_geo collections are populated without issues.
> > >
> > > However, when I try to use GeoSPARQL functions via the provided
> > > SPARQL endpoint implementation (web.rya), I get an empty result-set.
> > > I've also tried to query using RDF4J directly, but same result.
> > >
> > > I'm using the latest master (4.0.0-SNAPSHOT) and I've built the .war
> > with:
> > >
> > > mvn clean install -P mongodb -P geoindexing -DskipTests
> > >
> > >
> > > Env config (relevant part):
> > >
> > > sc.useMongo=true
> > > sc.use_geo=true
> > > sc.geo.predicates=https://urldefense.proofpoint.com/v2/
> > > url?u=http-3A__www.opengis.net_ont_geosparql-23asWKT&d=
> > > DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=SJ_BJ1r2sYikKHP-BDWHYi
> > > 8s
> > > dx-
> > > JPGSFvLqcpH-Yg0I&e=
> > > mongo.db.collectionprefix=rya_
> > > mongo.geo.maxdist=1e-10
> > >
> > >
> > > The test data:
> > >
> > > @prefix geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_
> > > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo
> > > 8&
> > > m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=> .
> > > @prefix ex: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__example.org_&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxI
> > > q1 0&r= vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=BRLJlfnTwK-
> > > kcz_WOUE1bhr_TSULRNWnHs7cS-eG7Qo&e=> .
> > >
> > > ex:Foo geo:hasGeometry ex:FooGeometry.
> > > ex:FooGeometry geo:asWKT "POINT(5.091025039849683
> > 51.55845016358455)"^^geo:
> > > wktLiteral.
> > >
> > >
> > > The test query:
> > >
> > > PREFIX geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_
> > > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo
> > > 8&
> > > m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=>
> > > PREFIX geof: <https://urldefense.proofpoint.com/v2/url?u=http-
> > > 3A__www.opengis.net_def_function_geosparql_&d=DwIBaQ&
> > > c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=f89OhfL5oDrcth-
> > > BdEvVqs50OWIjuyAKc0ghUyiTFUg&e=>
> > >
> > > SELECT ?s ?wkt
> > > WHERE {
> > >   ?s geo:asWKT ?wkt .
> > >   FILTER(geof:sfWithin(?wkt, "POLYGON((5.034360992118195
> > > 51.595144381441415,5.149717437430695
> > > 51.595144381441415,5.149717437430695
> > > 51.52086334303003,5.034360992118195
> > > 51.52086334303003,5.034360992118195
> > > 51.595144381441415))"^^geo:wktLiteral))
> > > }
> > >
> > >
> > > The indexed POINT geometry is located within the provided POLYGON.
> > > Therefore, I would expect one binding-set as result.
> > >
> > > What should I do to get this working? Thanks!!
> > >
> > > NOTICE: This email message and all attachments transmitted with it
> > > may contain privileged and confidential information, and information
> > > that is protected by, and proprietary to, Parsons Corporation, and
> > > is intended solely for the use of the addressee for the specific
> > > purpose set forth in this communication. If the reader of this
> > > message is not the intended recipient, you are hereby notified that
> > > any reading, dissemination, distribution, copying, or other use of
> > > this message or its attachments is strictly prohibited, and you
> > > should delete this message and all copies and backups thereof. The
> > > recipient may not further distribute or use any of the information
> > > contained herein without the express written authorization of the
> > > sender. If you have received this message in error, or if you have
> > > any questions regarding the use of the proprietary information
> > > contained therein, please contact the sender of this message
> > > immediately, and the sender will
> > provide you with further instructions.
> > >
> >
> > NOTICE: This email message and all attachments transmitted with it may
> > contain privileged and confidential information, and information that
> > is protected by, and proprietary to, Parsons Corporation, and is
> > intended solely for the use of the addressee for the specific purpose
> > set forth in this communication. If the reader of this message is not
> > the intended recipient, you are hereby notified that any reading,
> > dissemination, distribution, copying, or other use of this message or
> > its attachments is strictly prohibited, and you should delete this
> > message and all copies and backups thereof. The recipient may not
> > further distribute or use any of the information contained herein
> > without the express written authorization of the sender. If you have
> > received this message in error, or if you have any questions regarding
> > the use of the proprietary information contained therein, please
> > contact the sender of this message immediately, and the sender will
> provide you with further instructions.
> >
>
> NOTICE: This email message and all attachments transmitted with it may
> contain privileged and confidential information, and information that is
> protected by, and proprietary to, Parsons Corporation, and is intended
> solely for the use of the addressee for the specific purpose set forth in
> this communication. If the reader of this message is not the intended
> recipient, you are hereby notified that any reading, dissemination,
> distribution, copying, or other use of this message or its attachments is
> strictly prohibited, and you should delete this message and all copies and
> backups thereof. The recipient may not further distribute or use any of the
> information contained herein without the express written authorization of
> the sender. If you have received this message in error, or if you have any
> questions regarding the use of the proprietary information contained
> therein, please contact the sender of this message immediately, and the
> sender will provide you with further instructions.
>

RE: How to enable GeoSPARQL support for endpoint on MongoDB?

Posted by "Meier, Caleb" <Ca...@parsons.com>.
Hey Joost,

Have a look at the following IT to make sure that you are formatting your queries correctly:

https://github.com/apache/incubator-rya/blob/master/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/mongo/MongoGeoIndexerFilterIT.java

Carefully compare your geo predicate and your geo prefixes with the predicate and prefixes in the above example.  Sorry, I can't tell based on the example that you provided below because URLs get scrambled by our e-mail server.

Caleb A. Meier, Ph.D.
Senior Software Engineer ♦ Analyst
Parsons Corporation
1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
Office:  (703)797-3066
Caleb.Meier@Parsons.com ♦ www.parsons.com

-----Original Message-----
From: Joost Farla <jo...@apiwise.nl>
Sent: Wednesday, May 09, 2018 11:37 AM
To: dev@rya.incubator.apache.org
Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?

Hi Eric,

Thanks for replying!

Indexing and querying non-geo data is working well. However, when filtering by a GeoSPARQL predicate, the query runs without errors, but the result set is empty (where I would expect 1 binding). Please see the exact data and query in my initial posting. Indexing geo-data seems to work okay, since the rya_rya_geo collection is created and populated with the correct statement.

About spring-mongodb-geo.xml, I did already notice this and I did already change the bean class to "org.apache.rya.indexing.GeoRyaSailFactory".
Unfortunately, this does not seem to have any effect.

What else can I try?

Cheers, Joost



2018-05-09 16:52 GMT+02:00 White, Eric <Er...@parsons.com>:

> Joost,
>
> You might want to confirm that non-geo data can be added and queried.
> If only geo data isn't working then try stopping Tomcat and modifying
> your
> "<tomcat_dir>/webapps/web.rya/WEB-INF/spring/spring-mongodb-geo.xml" file (back it up first).
>
> Change the line:
>     <bean id="sail" class="org.apache.rya.sail.config.RyaSailFactory"
> factory-method="getInstance">
> To:
>     <bean id="sail" class="org.apache.rya.indexing.GeoRyaSailFactory"
> factory-method="getInstance">
>
> Save the file and then restart Tomcat and try that out.  Hope that helps.
>
> Thanks,
> -Eric White
>
> -----Original Message-----
> From: Joost Farla <jo...@apiwise.nl>
> Sent: Wednesday, May 09, 2018 3:28 AM
> To: dev@rya.incubator.apache.org
> Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Hi Caleb,
>
> Thanks for your suggestion! I've performed a rebuild with only the
> geoindexing profile, but still no luck....
>
> Any clue?
>
> Cheers, Joost
>
>
>
> 2018-05-08 18:43 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:
>
> > Hey Joost,
> >
> > After glancing at the pom file for web.rya, it appears that you are
> > enabling two profiles that will build different versions of the .war.
> > Have a look at the two profiles that appear at lines 189 and 196 in
> > the web.rya pom in the following link:
> >
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_meie
> > rc
> > aleb_incubator-2Drya_blob_master_web_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8
> > _L
> > WH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNgqQ
> > &m
> > =aMq-SY6ieesyfCsAA4jaNiCdWdoFihroeUYZKwuHDXQ&s=Jew4790glP7fcpwxQGsMS
> > x2
> > qwsReekxD5Kt48lfLD0c&e=
> > web.rya/pom.xml
> >
> > In particular, -P mongodb will build and deploy a mongo backed web
> > service with no geo enabled, and -P geoindexing deploys a  mongo
> > backed web service with geo indexing enabled.  Could you try
> > building using only the geoindexing profile?  Hopefully that helps.
> >
> > Caleb
> >
> > Caleb A. Meier, Ph.D.
> > Senior Software Engineer ♦ Analyst
> > Parsons Corporation
> > 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> > Office:  (703)797-3066
> > Caleb.Meier@Parsons.com ♦ www.parsons.com
> >
> > -----Original Message-----
> > From: Joost Farla <jo...@apiwise.nl>
> > Sent: Sunday, May 06, 2018 5:29 AM
> > To: dev@rya.incubator.apache.org
> > Subject: How to enable GeoSPARQL support for endpoint on MongoDB?
> >
> > Hi there,
> >
> > I've recently started experimenting with Rya on MongoDB. I've been
> > able to load geospatial data into MongoDB. The rya__triples and
> > rya_rya_geo collections are populated without issues.
> >
> > However, when I try to use GeoSPARQL functions via the provided
> > SPARQL endpoint implementation (web.rya), I get an empty result-set.
> > I've also tried to query using RDF4J directly, but same result.
> >
> > I'm using the latest master (4.0.0-SNAPSHOT) and I've built the .war
> with:
> >
> > mvn clean install -P mongodb -P geoindexing -DskipTests
> >
> >
> > Env config (relevant part):
> >
> > sc.useMongo=true
> > sc.use_geo=true
> > sc.geo.predicates=https://urldefense.proofpoint.com/v2/
> > url?u=http-3A__www.opengis.net_ont_geosparql-23asWKT&d=
> > DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=SJ_BJ1r2sYikKHP-BDWHYi
> > 8s
> > dx-
> > JPGSFvLqcpH-Yg0I&e=
> > mongo.db.collectionprefix=rya_
> > mongo.geo.maxdist=1e-10
> >
> >
> > The test data:
> >
> > @prefix geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_
> > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo
> > 8&
> > m=
> > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=> .
> > @prefix ex: <https://urldefense.proofpoint.com/v2/url?u=http-
> > 3A__example.org_&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxI
> > q1 0&r= vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=BRLJlfnTwK-
> > kcz_WOUE1bhr_TSULRNWnHs7cS-eG7Qo&e=> .
> >
> > ex:Foo geo:hasGeometry ex:FooGeometry.
> > ex:FooGeometry geo:asWKT "POINT(5.091025039849683
> 51.55845016358455)"^^geo:
> > wktLiteral.
> >
> >
> > The test query:
> >
> > PREFIX geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_
> > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo
> > 8&
> > m=
> > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=>
> > PREFIX geof: <https://urldefense.proofpoint.com/v2/url?u=http-
> > 3A__www.opengis.net_def_function_geosparql_&d=DwIBaQ&
> > c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=f89OhfL5oDrcth-
> > BdEvVqs50OWIjuyAKc0ghUyiTFUg&e=>
> >
> > SELECT ?s ?wkt
> > WHERE {
> >   ?s geo:asWKT ?wkt .
> >   FILTER(geof:sfWithin(?wkt, "POLYGON((5.034360992118195
> > 51.595144381441415,5.149717437430695
> > 51.595144381441415,5.149717437430695
> > 51.52086334303003,5.034360992118195
> > 51.52086334303003,5.034360992118195
> > 51.595144381441415))"^^geo:wktLiteral))
> > }
> >
> >
> > The indexed POINT geometry is located within the provided POLYGON.
> > Therefore, I would expect one binding-set as result.
> >
> > What should I do to get this working? Thanks!!
> >
> > NOTICE: This email message and all attachments transmitted with it
> > may contain privileged and confidential information, and information
> > that is protected by, and proprietary to, Parsons Corporation, and
> > is intended solely for the use of the addressee for the specific
> > purpose set forth in this communication. If the reader of this
> > message is not the intended recipient, you are hereby notified that
> > any reading, dissemination, distribution, copying, or other use of
> > this message or its attachments is strictly prohibited, and you
> > should delete this message and all copies and backups thereof. The
> > recipient may not further distribute or use any of the information
> > contained herein without the express written authorization of the
> > sender. If you have received this message in error, or if you have
> > any questions regarding the use of the proprietary information
> > contained therein, please contact the sender of this message
> > immediately, and the sender will
> provide you with further instructions.
> >
>
> NOTICE: This email message and all attachments transmitted with it may
> contain privileged and confidential information, and information that
> is protected by, and proprietary to, Parsons Corporation, and is
> intended solely for the use of the addressee for the specific purpose
> set forth in this communication. If the reader of this message is not
> the intended recipient, you are hereby notified that any reading,
> dissemination, distribution, copying, or other use of this message or
> its attachments is strictly prohibited, and you should delete this
> message and all copies and backups thereof. The recipient may not
> further distribute or use any of the information contained herein
> without the express written authorization of the sender. If you have
> received this message in error, or if you have any questions regarding
> the use of the proprietary information contained therein, please
> contact the sender of this message immediately, and the sender will provide you with further instructions.
>

NOTICE: This email message and all attachments transmitted with it may contain privileged and confidential information, and information that is protected by, and proprietary to, Parsons Corporation, and is intended solely for the use of the addressee for the specific purpose set forth in this communication. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited, and you should delete this message and all copies and backups thereof. The recipient may not further distribute or use any of the information contained herein without the express written authorization of the sender. If you have received this message in error, or if you have any questions regarding the use of the proprietary information contained therein, please contact the sender of this message immediately, and the sender will provide you with further instructions.

Re: How to enable GeoSPARQL support for endpoint on MongoDB?

Posted by Joost Farla <jo...@apiwise.nl>.
Hi Eric,

Thanks for replying!

Indexing and querying non-geo data is working well. However, when filtering
by a GeoSPARQL predicate, the query runs without errors, but the result set
is empty (where I would expect 1 binding). Please see the exact data and
query in my initial posting. Indexing geo-data seems to work okay, since
the rya_rya_geo collection is created and populated with the correct
statement.

About spring-mongodb-geo.xml, I did already notice this and I did already
change the bean class to "org.apache.rya.indexing.GeoRyaSailFactory".
Unfortunately, this does not seem to have any effect.

What else can I try?

Cheers, Joost



2018-05-09 16:52 GMT+02:00 White, Eric <Er...@parsons.com>:

> Joost,
>
> You might want to confirm that non-geo data can be added and queried.  If
> only geo data isn't working then try stopping Tomcat and modifying your
> "<tomcat_dir>/webapps/web.rya/WEB-INF/spring/spring-mongodb-geo.xml" file
> (back it up first).
>
> Change the line:
>     <bean id="sail" class="org.apache.rya.sail.config.RyaSailFactory"
> factory-method="getInstance">
> To:
>     <bean id="sail" class="org.apache.rya.indexing.GeoRyaSailFactory"
> factory-method="getInstance">
>
> Save the file and then restart Tomcat and try that out.  Hope that helps.
>
> Thanks,
> -Eric White
>
> -----Original Message-----
> From: Joost Farla <jo...@apiwise.nl>
> Sent: Wednesday, May 09, 2018 3:28 AM
> To: dev@rya.incubator.apache.org
> Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Hi Caleb,
>
> Thanks for your suggestion! I've performed a rebuild with only the
> geoindexing profile, but still no luck....
>
> Any clue?
>
> Cheers, Joost
>
>
>
> 2018-05-08 18:43 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:
>
> > Hey Joost,
> >
> > After glancing at the pom file for web.rya, it appears that you are
> > enabling two profiles that will build different versions of the .war.
> > Have a look at the two profiles that appear at lines 189 and 196 in
> > the web.rya pom in the following link:
> >
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_meierc
> > aleb_incubator-2Drya_blob_master_web_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8_L
> > WH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNgqQ&m
> > =aMq-SY6ieesyfCsAA4jaNiCdWdoFihroeUYZKwuHDXQ&s=Jew4790glP7fcpwxQGsMSx2
> > qwsReekxD5Kt48lfLD0c&e=
> > web.rya/pom.xml
> >
> > In particular, -P mongodb will build and deploy a mongo backed web
> > service with no geo enabled, and -P geoindexing deploys a  mongo
> > backed web service with geo indexing enabled.  Could you try building
> > using only the geoindexing profile?  Hopefully that helps.
> >
> > Caleb
> >
> > Caleb A. Meier, Ph.D.
> > Senior Software Engineer ♦ Analyst
> > Parsons Corporation
> > 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> > Office:  (703)797-3066
> > Caleb.Meier@Parsons.com ♦ www.parsons.com
> >
> > -----Original Message-----
> > From: Joost Farla <jo...@apiwise.nl>
> > Sent: Sunday, May 06, 2018 5:29 AM
> > To: dev@rya.incubator.apache.org
> > Subject: How to enable GeoSPARQL support for endpoint on MongoDB?
> >
> > Hi there,
> >
> > I've recently started experimenting with Rya on MongoDB. I've been
> > able to load geospatial data into MongoDB. The rya__triples and
> > rya_rya_geo collections are populated without issues.
> >
> > However, when I try to use GeoSPARQL functions via the provided SPARQL
> > endpoint implementation (web.rya), I get an empty result-set. I've
> > also tried to query using RDF4J directly, but same result.
> >
> > I'm using the latest master (4.0.0-SNAPSHOT) and I've built the .war
> with:
> >
> > mvn clean install -P mongodb -P geoindexing -DskipTests
> >
> >
> > Env config (relevant part):
> >
> > sc.useMongo=true
> > sc.use_geo=true
> > sc.geo.predicates=https://urldefense.proofpoint.com/v2/
> > url?u=http-3A__www.opengis.net_ont_geosparql-23asWKT&d=
> > DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=SJ_BJ1r2sYikKHP-BDWHYi8s
> > dx-
> > JPGSFvLqcpH-Yg0I&e=
> > mongo.db.collectionprefix=rya_
> > mongo.geo.maxdist=1e-10
> >
> >
> > The test data:
> >
> > @prefix geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_
> > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&
> > m=
> > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=> .
> > @prefix ex: <https://urldefense.proofpoint.com/v2/url?u=http-
> > 3A__example.org_&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq1
> > 0&r= vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=BRLJlfnTwK-
> > kcz_WOUE1bhr_TSULRNWnHs7cS-eG7Qo&e=> .
> >
> > ex:Foo geo:hasGeometry ex:FooGeometry.
> > ex:FooGeometry geo:asWKT "POINT(5.091025039849683
> 51.55845016358455)"^^geo:
> > wktLiteral.
> >
> >
> > The test query:
> >
> > PREFIX geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> > 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_
> > LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&
> > m=
> > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> > sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=>
> > PREFIX geof: <https://urldefense.proofpoint.com/v2/url?u=http-
> > 3A__www.opengis.net_def_function_geosparql_&d=DwIBaQ&
> > c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> > vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> > hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=f89OhfL5oDrcth-
> > BdEvVqs50OWIjuyAKc0ghUyiTFUg&e=>
> >
> > SELECT ?s ?wkt
> > WHERE {
> >   ?s geo:asWKT ?wkt .
> >   FILTER(geof:sfWithin(?wkt, "POLYGON((5.034360992118195
> > 51.595144381441415,5.149717437430695
> > 51.595144381441415,5.149717437430695
> > 51.52086334303003,5.034360992118195
> > 51.52086334303003,5.034360992118195
> > 51.595144381441415))"^^geo:wktLiteral))
> > }
> >
> >
> > The indexed POINT geometry is located within the provided POLYGON.
> > Therefore, I would expect one binding-set as result.
> >
> > What should I do to get this working? Thanks!!
> >
> > NOTICE: This email message and all attachments transmitted with it may
> > contain privileged and confidential information, and information that
> > is protected by, and proprietary to, Parsons Corporation, and is
> > intended solely for the use of the addressee for the specific purpose
> > set forth in this communication. If the reader of this message is not
> > the intended recipient, you are hereby notified that any reading,
> > dissemination, distribution, copying, or other use of this message or
> > its attachments is strictly prohibited, and you should delete this
> > message and all copies and backups thereof. The recipient may not
> > further distribute or use any of the information contained herein
> > without the express written authorization of the sender. If you have
> > received this message in error, or if you have any questions regarding
> > the use of the proprietary information contained therein, please
> > contact the sender of this message immediately, and the sender will
> provide you with further instructions.
> >
>
> NOTICE: This email message and all attachments transmitted with it may
> contain privileged and confidential information, and information that is
> protected by, and proprietary to, Parsons Corporation, and is intended
> solely for the use of the addressee for the specific purpose set forth in
> this communication. If the reader of this message is not the intended
> recipient, you are hereby notified that any reading, dissemination,
> distribution, copying, or other use of this message or its attachments is
> strictly prohibited, and you should delete this message and all copies and
> backups thereof. The recipient may not further distribute or use any of the
> information contained herein without the express written authorization of
> the sender. If you have received this message in error, or if you have any
> questions regarding the use of the proprietary information contained
> therein, please contact the sender of this message immediately, and the
> sender will provide you with further instructions.
>

RE: How to enable GeoSPARQL support for endpoint on MongoDB?

Posted by "White, Eric" <Er...@parsons.com>.
Joost,

You might want to confirm that non-geo data can be added and queried.  If only geo data isn't working then try stopping Tomcat and modifying your "<tomcat_dir>/webapps/web.rya/WEB-INF/spring/spring-mongodb-geo.xml" file (back it up first).

Change the line:
    <bean id="sail" class="org.apache.rya.sail.config.RyaSailFactory" factory-method="getInstance">
To:
    <bean id="sail" class="org.apache.rya.indexing.GeoRyaSailFactory" factory-method="getInstance">

Save the file and then restart Tomcat and try that out.  Hope that helps.

Thanks,
-Eric White

-----Original Message-----
From: Joost Farla <jo...@apiwise.nl>
Sent: Wednesday, May 09, 2018 3:28 AM
To: dev@rya.incubator.apache.org
Subject: Re: How to enable GeoSPARQL support for endpoint on MongoDB?

Hi Caleb,

Thanks for your suggestion! I've performed a rebuild with only the geoindexing profile, but still no luck....

Any clue?

Cheers, Joost



2018-05-08 18:43 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:

> Hey Joost,
>
> After glancing at the pom file for web.rya, it appears that you are
> enabling two profiles that will build different versions of the .war.
> Have a look at the two profiles that appear at lines 189 and 196 in
> the web.rya pom in the following link:
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_meierc
> aleb_incubator-2Drya_blob_master_web_&d=DwIFaQ&c=Nwf-pp4xtYRe0sCRVM8_L
> WH54joYF7EKmrYIdfxIq10&r=RaJkRMooYbg4vmML14E10F9hYEBLOeOHS3mAimFNgqQ&m
> =aMq-SY6ieesyfCsAA4jaNiCdWdoFihroeUYZKwuHDXQ&s=Jew4790glP7fcpwxQGsMSx2
> qwsReekxD5Kt48lfLD0c&e=
> web.rya/pom.xml
>
> In particular, -P mongodb will build and deploy a mongo backed web
> service with no geo enabled, and -P geoindexing deploys a  mongo
> backed web service with geo indexing enabled.  Could you try building
> using only the geoindexing profile?  Hopefully that helps.
>
> Caleb
>
> Caleb A. Meier, Ph.D.
> Senior Software Engineer ♦ Analyst
> Parsons Corporation
> 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> Office:  (703)797-3066
> Caleb.Meier@Parsons.com ♦ www.parsons.com
>
> -----Original Message-----
> From: Joost Farla <jo...@apiwise.nl>
> Sent: Sunday, May 06, 2018 5:29 AM
> To: dev@rya.incubator.apache.org
> Subject: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Hi there,
>
> I've recently started experimenting with Rya on MongoDB. I've been
> able to load geospatial data into MongoDB. The rya__triples and
> rya_rya_geo collections are populated without issues.
>
> However, when I try to use GeoSPARQL functions via the provided SPARQL
> endpoint implementation (web.rya), I get an empty result-set. I've
> also tried to query using RDF4J directly, but same result.
>
> I'm using the latest master (4.0.0-SNAPSHOT) and I've built the .war with:
>
> mvn clean install -P mongodb -P geoindexing -DskipTests
>
>
> Env config (relevant part):
>
> sc.useMongo=true
> sc.use_geo=true
> sc.geo.predicates=https://urldefense.proofpoint.com/v2/
> url?u=http-3A__www.opengis.net_ont_geosparql-23asWKT&d=
> DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=SJ_BJ1r2sYikKHP-BDWHYi8s
> dx-
> JPGSFvLqcpH-Yg0I&e=
> mongo.db.collectionprefix=rya_
> mongo.geo.maxdist=1e-10
>
>
> The test data:
>
> @prefix geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_
> LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&
> m=
> hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=> .
> @prefix ex: <https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__example.org_&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq1
> 0&r= vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=BRLJlfnTwK-
> kcz_WOUE1bhr_TSULRNWnHs7cS-eG7Qo&e=> .
>
> ex:Foo geo:hasGeometry ex:FooGeometry.
> ex:FooGeometry geo:asWKT "POINT(5.091025039849683 51.55845016358455)"^^geo:
> wktLiteral.
>
>
> The test query:
>
> PREFIX geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_
> LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&
> m=
> hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=>
> PREFIX geof: <https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__www.opengis.net_def_function_geosparql_&d=DwIBaQ&
> c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=f89OhfL5oDrcth-
> BdEvVqs50OWIjuyAKc0ghUyiTFUg&e=>
>
> SELECT ?s ?wkt
> WHERE {
>   ?s geo:asWKT ?wkt .
>   FILTER(geof:sfWithin(?wkt, "POLYGON((5.034360992118195
> 51.595144381441415,5.149717437430695
> 51.595144381441415,5.149717437430695
> 51.52086334303003,5.034360992118195
> 51.52086334303003,5.034360992118195
> 51.595144381441415))"^^geo:wktLiteral))
> }
>
>
> The indexed POINT geometry is located within the provided POLYGON.
> Therefore, I would expect one binding-set as result.
>
> What should I do to get this working? Thanks!!
>
> NOTICE: This email message and all attachments transmitted with it may
> contain privileged and confidential information, and information that
> is protected by, and proprietary to, Parsons Corporation, and is
> intended solely for the use of the addressee for the specific purpose
> set forth in this communication. If the reader of this message is not
> the intended recipient, you are hereby notified that any reading,
> dissemination, distribution, copying, or other use of this message or
> its attachments is strictly prohibited, and you should delete this
> message and all copies and backups thereof. The recipient may not
> further distribute or use any of the information contained herein
> without the express written authorization of the sender. If you have
> received this message in error, or if you have any questions regarding
> the use of the proprietary information contained therein, please
> contact the sender of this message immediately, and the sender will provide you with further instructions.
>

NOTICE: This email message and all attachments transmitted with it may contain privileged and confidential information, and information that is protected by, and proprietary to, Parsons Corporation, and is intended solely for the use of the addressee for the specific purpose set forth in this communication. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited, and you should delete this message and all copies and backups thereof. The recipient may not further distribute or use any of the information contained herein without the express written authorization of the sender. If you have received this message in error, or if you have any questions regarding the use of the proprietary information contained therein, please contact the sender of this message immediately, and the sender will provide you with further instructions.

Re: How to enable GeoSPARQL support for endpoint on MongoDB?

Posted by Joost Farla <jo...@apiwise.nl>.
Hi Caleb,

Thanks for your suggestion! I've performed a rebuild with only the
geoindexing profile, but still no luck....

Any clue?

Cheers, Joost



2018-05-08 18:43 GMT+02:00 Meier, Caleb <Ca...@parsons.com>:

> Hey Joost,
>
> After glancing at the pom file for web.rya, it appears that you are
> enabling two profiles that will build different versions of the .war.  Have
> a look at the two profiles that appear at lines 189 and 196 in the web.rya
> pom in the following link:
>
> https://github.com/meiercaleb/incubator-rya/blob/master/web/
> web.rya/pom.xml
>
> In particular, -P mongodb will build and deploy a mongo backed web service
> with no geo enabled, and -P geoindexing deploys a  mongo backed web service
> with geo indexing enabled.  Could you try building using only the
> geoindexing profile?  Hopefully that helps.
>
> Caleb
>
> Caleb A. Meier, Ph.D.
> Senior Software Engineer ♦ Analyst
> Parsons Corporation
> 1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
> Office:  (703)797-3066
> Caleb.Meier@Parsons.com ♦ www.parsons.com
>
> -----Original Message-----
> From: Joost Farla <jo...@apiwise.nl>
> Sent: Sunday, May 06, 2018 5:29 AM
> To: dev@rya.incubator.apache.org
> Subject: How to enable GeoSPARQL support for endpoint on MongoDB?
>
> Hi there,
>
> I've recently started experimenting with Rya on MongoDB. I've been able to
> load geospatial data into MongoDB. The rya__triples and rya_rya_geo
> collections are populated without issues.
>
> However, when I try to use GeoSPARQL functions via the provided SPARQL
> endpoint implementation (web.rya), I get an empty result-set. I've also
> tried to query using RDF4J directly, but same result.
>
> I'm using the latest master (4.0.0-SNAPSHOT) and I've built the .war with:
>
> mvn clean install -P mongodb -P geoindexing -DskipTests
>
>
> Env config (relevant part):
>
> sc.useMongo=true
> sc.use_geo=true
> sc.geo.predicates=https://urldefense.proofpoint.com/v2/
> url?u=http-3A__www.opengis.net_ont_geosparql-23asWKT&d=
> DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=SJ_BJ1r2sYikKHP-BDWHYi8sdx-
> JPGSFvLqcpH-Yg0I&e=
> mongo.db.collectionprefix=rya_
> mongo.geo.maxdist=1e-10
>
>
> The test data:
>
> @prefix geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_
> LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=> .
> @prefix ex: <https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__example.org_&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=BRLJlfnTwK-
> kcz_WOUE1bhr_TSULRNWnHs7cS-eG7Qo&e=> .
>
> ex:Foo geo:hasGeometry ex:FooGeometry.
> ex:FooGeometry geo:asWKT "POINT(5.091025039849683 51.55845016358455)"^^geo:
> wktLiteral.
>
>
> The test query:
>
> PREFIX geo: <https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_
> LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-
> sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=>
> PREFIX geof: <https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__www.opengis.net_def_function_geosparql_&d=DwIBaQ&
> c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=
> vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=
> hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=f89OhfL5oDrcth-
> BdEvVqs50OWIjuyAKc0ghUyiTFUg&e=>
>
> SELECT ?s ?wkt
> WHERE {
>   ?s geo:asWKT ?wkt .
>   FILTER(geof:sfWithin(?wkt, "POLYGON((5.034360992118195
> 51.595144381441415,5.149717437430695 51.595144381441415,5.149717437430695
> 51.52086334303003,5.034360992118195 51.52086334303003,5.034360992118195
> 51.595144381441415))"^^geo:wktLiteral))
> }
>
>
> The indexed POINT geometry is located within the provided POLYGON.
> Therefore, I would expect one binding-set as result.
>
> What should I do to get this working? Thanks!!
>
> NOTICE: This email message and all attachments transmitted with it may
> contain privileged and confidential information, and information that is
> protected by, and proprietary to, Parsons Corporation, and is intended
> solely for the use of the addressee for the specific purpose set forth in
> this communication. If the reader of this message is not the intended
> recipient, you are hereby notified that any reading, dissemination,
> distribution, copying, or other use of this message or its attachments is
> strictly prohibited, and you should delete this message and all copies and
> backups thereof. The recipient may not further distribute or use any of the
> information contained herein without the express written authorization of
> the sender. If you have received this message in error, or if you have any
> questions regarding the use of the proprietary information contained
> therein, please contact the sender of this message immediately, and the
> sender will provide you with further instructions.
>

RE: How to enable GeoSPARQL support for endpoint on MongoDB?

Posted by "Meier, Caleb" <Ca...@parsons.com>.
Hey Joost,

After glancing at the pom file for web.rya, it appears that you are enabling two profiles that will build different versions of the .war.  Have a look at the two profiles that appear at lines 189 and 196 in the web.rya pom in the following link:

https://github.com/meiercaleb/incubator-rya/blob/master/web/web.rya/pom.xml

In particular, -P mongodb will build and deploy a mongo backed web service with no geo enabled, and -P geoindexing deploys a  mongo backed web service with geo indexing enabled.  Could you try building using only the geoindexing profile?  Hopefully that helps.

Caleb

Caleb A. Meier, Ph.D.
Senior Software Engineer ♦ Analyst
Parsons Corporation
1911 N. Fort Myer Drive, Suite 800 ♦ Arlington, VA 22209
Office:  (703)797-3066
Caleb.Meier@Parsons.com ♦ www.parsons.com

-----Original Message-----
From: Joost Farla <jo...@apiwise.nl>
Sent: Sunday, May 06, 2018 5:29 AM
To: dev@rya.incubator.apache.org
Subject: How to enable GeoSPARQL support for endpoint on MongoDB?

Hi there,

I've recently started experimenting with Rya on MongoDB. I've been able to load geospatial data into MongoDB. The rya__triples and rya_rya_geo collections are populated without issues.

However, when I try to use GeoSPARQL functions via the provided SPARQL endpoint implementation (web.rya), I get an empty result-set. I've also tried to query using RDF4J directly, but same result.

I'm using the latest master (4.0.0-SNAPSHOT) and I've built the .war with:

mvn clean install -P mongodb -P geoindexing -DskipTests


Env config (relevant part):

sc.useMongo=true
sc.use_geo=true
sc.geo.predicates=https://urldefense.proofpoint.com/v2/url?u=http-3A__www.opengis.net_ont_geosparql-23asWKT&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=SJ_BJ1r2sYikKHP-BDWHYi8sdx-JPGSFvLqcpH-Yg0I&e=
mongo.db.collectionprefix=rya_
mongo.geo.maxdist=1e-10


The test data:

@prefix geo: <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=> .
@prefix ex: <https://urldefense.proofpoint.com/v2/url?u=http-3A__example.org_&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=BRLJlfnTwK-kcz_WOUE1bhr_TSULRNWnHs7cS-eG7Qo&e=> .

ex:Foo geo:hasGeometry ex:FooGeometry.
ex:FooGeometry geo:asWKT "POINT(5.091025039849683 51.55845016358455)"^^geo:wktLiteral.


The test query:

PREFIX geo: <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.opengis.net_ont_geosparql-23&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=52Htwc-sfw0ZKjI8kGG5i3H4oytUmbntwPY0rWBtEtE&e=>
PREFIX geof: <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.opengis.net_def_function_geosparql_&d=DwIBaQ&c=Nwf-pp4xtYRe0sCRVM8_LWH54joYF7EKmrYIdfxIq10&r=vuVdzYC2kksVZR5STiFwDpzJ7CrMHCgeo_4WXTD0qo8&m=hL9E1Bkzma7jWCW41bMKQOYWz2WY8WLuFGPmqH4hrdM&s=f89OhfL5oDrcth-BdEvVqs50OWIjuyAKc0ghUyiTFUg&e=>

SELECT ?s ?wkt
WHERE {
  ?s geo:asWKT ?wkt .
  FILTER(geof:sfWithin(?wkt, "POLYGON((5.034360992118195
51.595144381441415,5.149717437430695 51.595144381441415,5.149717437430695
51.52086334303003,5.034360992118195 51.52086334303003,5.034360992118195
51.595144381441415))"^^geo:wktLiteral))
}


The indexed POINT geometry is located within the provided POLYGON.
Therefore, I would expect one binding-set as result.

What should I do to get this working? Thanks!!

NOTICE: This email message and all attachments transmitted with it may contain privileged and confidential information, and information that is protected by, and proprietary to, Parsons Corporation, and is intended solely for the use of the addressee for the specific purpose set forth in this communication. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited, and you should delete this message and all copies and backups thereof. The recipient may not further distribute or use any of the information contained herein without the express written authorization of the sender. If you have received this message in error, or if you have any questions regarding the use of the proprietary information contained therein, please contact the sender of this message immediately, and the sender will provide you with further instructions.