Conversation
added calculations for arbitrary rotated rectangular geofences added tests for the rotated geofence in the python-client
|
Thanks for sending this arXiv paper! It's good to see some research into this Instead of a test using the same geobox, could your example use a rotated shape? That way we can be sure to have coordinates x1,y1 to x4,y4 in the right places |
|
Glad to help. I am working on it. Usually, this should not be much of a problem but somehow I managed to run into strange behaviour of my evaluation when the point was outside the geofence. This could take a while as I am prone to interchange latitudes and longitudes... |
|
hi ! I was just remembering this. Any luck on tests? Would be happy to add it in. |
|
hi. lately, i did not have too much time on my hands to test this. currently there seems to be the need to make a monte carlo simulation to picture the shape of the geofence by evaluating random coordinates near and inside of it. It seems that the Geofences that I used for my first practical Proof of Concept worked because of their low rotation angle. Also, when I tested it, I left the Geofence to the left side. The coordinates that i could not evaluate correctly were outside to the right of the Geofence. |
Hello, it is me again.
I added support for arbitrary rotated rectangular Geofences. This is done by homomorphically calculating the perpendicular projection of the point onto two non-opposing borders and comparing whether the length of the resulting vectors are not longer than the respective borders are. Mathematical proof can be found in this paper under section IV-Implementation.
To be more consistent with the mathematical descriptions in the paper I used a small vector class, which is a little bloated from other things that were tested with it.
The prefix
e_indicates a homomorphically encrypted value.With this it should be possible to evaluate triangles (taking a detour) by combining two rectangular Geofences.