-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/1677 geo location #1801
Conversation
@@ -243,7 +243,7 @@ static int uriArgumentGet(void* cbDataP, MHD_ValueKind kind, const char* ckey, c | |||
{ | |||
containsForbiddenChars = forbiddenChars(val, ";"); | |||
} | |||
else if ((key != "q") && (key != "idPattern")) | |||
else if ((key != "q") && (key != "idPattern") && (key != "geometry") && (key != "georel")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that geometry has its own "if clause" some lines above (around 238).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, this was already taken care of.
Didn't see that ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 6bcd211 (georel treated as geometry)
…iware-orion into feature/1677_geo_location
Finally got some time to run functests on this branch ... Complete 'make test' running (again) right now |
…iware-orion into feature/1677_geo_location
@@ -299,7 +299,7 @@ Fields used as identifiers in the NGSIv2 API follow special rules regarding allo | |||
|
|||
The rules are: | |||
|
|||
* Allowed characters are the ones in the plain ASCII set except the following ones: whitespace, `&`, ?`, `/` and `#`. | |||
* Allowed characters are the ones in the plain ASCII set except the following ones: whitespace, `&`, `?`, `/` and `#`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not actually related with this PR, but a small typo known time ago now being fixed. NTC
@@ -20,3 +20,5 @@ | |||
- Add: detect forbidden chars in entity ids and attr names in URI (Issue #1793) | |||
- Add: dates support in attribute values (Issue #1038) | |||
- Add: implemented new operation: POST /v2/op/query (Issue #1080) | |||
- Fix: NGSIv2 URI param 'georel' (along with 'geometry' and 'coords') proper support (Issue #1677) | |||
- Add: scope FIWARE::Location::NGSIv2 to allow using NGSIv2 geo-queries also with NGSIv1 (Issue #1677) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This last line is not actually part of this PR, but soon to be added.
NTC
else if (scoP->areaType == orion::BoxType) | ||
{ | ||
BSONArrayBuilder ps; | ||
ps.append(BSON_ARRAY(scoP->box.lowerLeft.longitude() << scoP->box.lowerLeft.latitude())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order this to work, lowerLeft has to be the real lower left corner and upperRight has to be the real upper right corner. Is the fill() method at Scope class ensuring this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed over skype - no, there is no check/fix for that right now. Must be implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 92aaa61
{ | ||
type = FIWARE_LOCATION_V2; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I wrote these 8 lines ..
Now I wish I had done it like this, on one line:
type = (apiVersion == "v1")? FIWARE_LOCATION : FIWARE_LOCATION_V2:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 92aaa61
I just realized a thing I've forgotten to implement - the release of the area objects.
We need to call the release() methods also for point, line, and box (and circle?), and create the methods if they don't exist. |
@@ -281,7 +309,31 @@ int Scope::fill | |||
pointV.clear(); | |||
return -1; | |||
} | |||
box.fill(pointV[0], pointV[1]); | |||
|
|||
// Check that points are different an not aligned (either horizontally or vertically) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type: an => and
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 367b713
LGTM |
1 similar comment
LGTM |
Added some stuff missing for geo-location in URI params #1677
functest running ...