-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
area/querylang/geoIssues related to geolocation.Issues related to geolocation.kind/featureSomething completely new we should consider.Something completely new we should consider.priority/P2Somehow important but would not block a release.Somehow important but would not block a release.status/acceptedWe accept to investigate/work on it.We accept to investigate/work on it.
Milestone
Description
- What version of Dgraph are you using?
Dgraph version : v1.0.4
Commit SHA-1 : aad5907
Commit timestamp : 2018-03-09 17:37:44 +1100
Branch : HEAD
- Have you tried reproducing the issue with latest release?
whatever was on master as of a few hours ago
- What is the hardware spec (RAM, OS)?
system_profiler SPHardwareDataType | grep " Memory:"
Memory: 16 GB
sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.3
BuildVersion: 17D47
- Steps to reproduce the issue (command/config used to run Dgraph).
Load geojson:
find ../json/*json | xargs -IHMM bash -c 'filename=`basename -- "HMM"`; go run dgraph/cmd/dgraph-converter/main.go --geo ../json/$filename --out ../rdf_gz/"${filename%.*}".rdf.gz'
find ../rdf_gz | xargs -I{} bash -c 'dgraph live -r {}'Unable to query featues type "LineString" coordinates :
curl -s http://127.0.0.1:8080/query -X POST -d $'q(func: near(loc, [ -93.962679,44.320331], 100) ) {\n from_name,\n }' | python -m json.tool
- Expected behaviour and actual result.
approximate behaviour :
{
"data": {
"q": [
{
"circuit": "1",
"from_name": "XXX",
"loc": {
"coordinates": [
[
-93.962679,
44.320331
],
[
-93.962679,
44.320331
]
],
"type": "LineString"
},
"status": "Closed",
"to_name": "YYY"
}
]
},
"extensions": {
"server_latency": {
"encoding_ns": 784000,
"parsing_ns": 35000,
"processing_ns": 4496000
},
"txn": {
"lin_read": {
"ids": {
"1": 455
}
},
"start_ts": 464
}
}
}
actual result:
{
"data": {
"q": []
},
"extensions": {
"server_latency": {
"encoding_ns": 412000,
"parsing_ns": 11000,
"processing_ns": 107000
},
"txn": {
"lin_read": {
"ids": {
"1": 456
}
},
"start_ts": 478
}
}
}
Related:
- Investigate supporting MultiPolygon type for geo indexing. #1349
- Have a way to upload geojson data through dgraphloader #1341
- https://docs.dgraph.io/master/query-language/#geolocation
- https://github.com/dgraph-io/dgraph/blob/master/types/geofilter.go
- https://github.com/twpayne/go-geom/blob/master/linestring.go#L5
New to go, but wondering what it would take to do a near query on the points of a LineString.
Metadata
Metadata
Assignees
Labels
area/querylang/geoIssues related to geolocation.Issues related to geolocation.kind/featureSomething completely new we should consider.Something completely new we should consider.priority/P2Somehow important but would not block a release.Somehow important but would not block a release.status/acceptedWe accept to investigate/work on it.We accept to investigate/work on it.