Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Problem with spatial query

$
0
0
Can anyone explain to me why the following SPARQL query against a Fuseki
service, which exposes a spatial dataset, with the spatial data indexed in
SOLR transposes the coordinates when it passes the query to SOLR?

PREFIX spatial: <http://jena.apache.org/spatial#>
SELECT * WHERE { ?place spatial:nearby (53.782974 -1.760434 100 'km') . }

In SOLR, I have items indexed with a uri and geo field (which is defined as
a location_rpt) eg:

"uri": "http://uri removed from here",
"geo": [
"53.7829742431641 -1.76043450832367"
],
"_version_": 1484766006125527000
},

"uri": "http://uri removed from here",
"geo": [
"53.578800201416 -1.78437972068787"
],
"_version_": 1484766006126575600

I'd expect it to pass to solr something like:
IsWithin(Circle(53.782974 -1.760434))

But on the SOLR machine, it logs to the console:
INFO org.apache.solr.core.SolrCore – [spatialcollection] webapp=/solr
path=/select
params={q=*:*&wt=javabin&fq=geo:"IsWithin(Circle(-1.760434+53.782974+d%3D0.089932))+distErrPct%3D0"&version=2}
hits=0 status=0 QTime=2

This then doesn't return any data, however if I transpose the coordinates,
it returns matched items.

This would seem like in order to find (lat long) I need to search for (long
lat).

Thanks

Tim

Viewing all articles
Browse latest Browse all 5648

Trending Articles