owntracks / ios

OwnTracks' iPhone App
http://owntracks.org
Other
315 stars 90 forks source link

Revisit Address publishing? #769

Closed lnjustin closed 4 months ago

lnjustin commented 5 months ago

I see in the closed issues that, about 3-4 years ago, others requested publishing of the reverse geocode address results. At the time, it was decided not to publish this information, in the interest of keeping data transfer low. Has anything changed in the last few years to justify a different decision now? I would kindly request reconsideration if so, as it seems the address information would be quite useful to some. Thanks for your work on this open-source project!

(refers to #616)

jpmens commented 5 months ago

I don't think much has changed in this regard. Our backend Recorder performs reverse geo lookups (if configured to do so), and this data is stored alongside the published location data. It is made available via the API when a query for such records is performed.

Here's a query for JSON for a particular time frame; note the address data which is retrieved from the backend storage:

$ ocat -u jpm -d 5s --format json --from 2023-12-17
...
  {
   "_type": "location",
   "acc": 50,
   "alt": 109,
   "batt": 87,
   "bs": 1,
   "conn": "m",
   "lat": 50.046997,
   "lon": 8.570846,
   "m": 1,
   "p": 102.665,
   "t": "C",
   "tid": "jp",
   "tst": 1702806899,
   "vac": 27,
   "ghash": "u0yhenc",
   "cc": "DE",
   "addr": "Terminal 1 Flugsteig B, Ankunftbogen, 60549 Frankfurt, Germany",
   "locality": "Frankfurt",
   "isorcv": "2023-12-17T09:54:59Z",
   "isotst": "2023-12-17T09:54:59Z",
   "disptst": "2023-12-17 09:54:59"
  },
...

rate-limiting performed by the OS for geo coordinates would cause reverse geo information to become unavailable is a limiting factor when reverse geo is performed on-device.

We find this remains the most stable solution.

ckrey commented 4 months ago

In addition reverse geocoding is rate limited on the iPhone. Therefore we do not use it for all sent locations, but only when a location is displayed on user request.

This is in line with CLGeoCoder | Apple Developer Documentation

We will therefore not publish address from the iOS app