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 <eric.wh...@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 <caleb.me...@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.me...@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 <eric.wh...@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 <caleb.me...@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.me...@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.

Reply via email to