-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Enhance API data with timezone at location's position #444
Comments
Two new fields:
{
"_type": "location",
"acc": 11,
"alt": 1562,
"batt": 55,
"bs": 1,
"cog": 264,
"conn": "m",
"lat": 17.069333,
"lon": -96.717628,
"m": 1,
"p": 84.441,
"t": "p",
"tid": "jp",
"tst": 1703116330,
"vac": 4,
"vel": 0,
"ghash": "9g51p5k",
"cc": "MX",
"addr": "C Narciso Mendoza, 68080 Oaxaca, OAX, Mexico",
"locality": "Oaxaca",
"isorcv": "2023-12-20T23:52:10Z",
"isotst": "2023-12-20T23:52:10Z",
"disptst": "2023-12-20 23:52:10",
"tz": "America/Mexico_City",
"isolocal": "2023-12-20T17:52:10-0600"
} |
@jpmens I am running latest version, but don't see new fields. |
Do you see TZDATADB diagnostic when launching recorder,? Does the file exist? Is it readable? |
it was problem with file, all works as expected. Are you planning to allow access this fields inside lua hook? |
it was problem with file, all works as expected.
Let me know if the installer (make) failed, please.
Are you planning to allow access this fields inside lua hook?
I’ve not tested, but they should be there automatically. Are they not?
|
I got this error: error don't appear
print nulls |
I see "tz" and "isolocal" in
but not in api:
|
@ckrey one possible cause is that your Recorder process can't access the TZDATADB file (permissions, path)? Another that the Recorder hasn't been restarted? The data produced by |
you are absolutely right, I had a mélange of package installed and locally built versions |
So, we're changing the strategy a bit, also to accomodate @centralhardware's wish to have the timezone in Lua, which I'll admit to have not previously considered. The code I'll be pushing in a moment now does the following:
|
serve from cached entries if available, else use tzdatadb with time penalty addresses #444
Will be tz field available even without reverse geo coding (via tzdatadb)? |
The field is now named To clarify, in the case of no reverse geo, |
Also to clarify, OpenCageData have a free tier you can sign up for. They offer one API key and up to 2500 reverse geo queries per day which is likely enough for many of us. :-) |
it's good news, but I can't get it to work. I am trying OTR_GEOKEY and rebuild image with --geokey opencage:, but it 's still don't work |
I'll need a bit more info than that ... First, you should not need to rebuild. I'm assuming your Then, please remember, that if you post or publish a location you've already been at (!) the query will not be performed, as the Recorder has already "not cached" (yes, it sounds strange) the location. Move your Now publish a position. Do you see the reverse geo on the console? What does |
It's work now, thank you |
I believe we might consider this complete now (famous last words). We spent quite some time (thank you, @ckrey) optimizing output and have been able to lower processing time on |
- FIX: Tour data (requests and submissions) contain corrupt data in .rec file b/c of pretty-printing (#437) - UPD: Change permissions (+r) on binaries (#428) - NEW: Add support for dumping POI in GeoJSON format (#439) - FIX: create {static,utils}/index.html to avoid directory listing - FIX: remove HikeBike layer (and control) from views (#442) - UPD: Autoload track in Recorder views / tours (#441) - NEW: Optionally enhance API data with timezone at location's position (#444) - UPD: locations API returns Recorder version number alongside count/status - NEW: add experimental utility with which to enhance ghash/ with tzdata - UPD: location and tzname are stored in ghash cache only if they're non-null - UPD: Reduce default size of LMDB to 5368709120 (5GB); it can be configured via environment - UPD: Improve gcache error handling - FIX: Add missing OTR_HTTPPREFIX to ot-defaults (#440)
We might consider enhancing API data with timezone at a location's position.
Inspired by #443
The text was updated successfully, but these errors were encountered: