Calendar: [Feature request] Handle the GEO property

Created on 2 Oct 2018  Â·  11Comments  Â·  Source: nextcloud/calendar

The iCal standard has a GEO property to allow specifying the geographic coordinates of an event or task.

Being able to edit it could be useful in some cases (like, to properly specify conference venues…).


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

1 - to develop enhancement-approved

Most helpful comment

My plan about this is the following:

  • Add a new input like in the Contacts app, that allows you to select "advanced" properties:
    e2f1cc0e-2972-4b71-b943-142def9c518e
  • So if there is a GEO-property already, it will simply be displayed next to the other properties
  • If there is no GEO-property yet, you will have to select GEO in the dropdown first.

All 11 comments

Being able to edit it could be useful in some cases

Can you elaborate? I don't know any calendar application that allows you to enter this property nor any application that makes use of it. If you just want to add geographic coordinates, you can always include them in the event's description.
Putting them into the GEO property would be semantically cleaner - yes - but I don't want to introduce a new input field that's used ever so rarely. We shouldn't clutter the interface with input fields only 0,...% of users will ever use.

That's the classic chicken-and-egg problem : I'd probably have used it already if I knew it existed, that is, if either Thunderbird or NC exposed it in some way.

There are several cases where you want precise coordinates, though I agree not average usage :

  • when you use an ics as source of events for a list/calendar on your website. The amr-ical-events-list can handle it for example,
  • when you publish an ics to describe the talks of your conferences (granted that's an abuse of the format, but sadly most conference orgs only know about this), that apps like Giggity can use to handle schedule conflicts. For now Giggity accepts rooms coordinates separately in the JSON description of the conference, but that means adding them manually.

Not being able to enter it anywhere makes it not usable. Just like not being able to add attendees, when adding them with Thunderbird wants to add myself as organizer when it's not what I want…
At least it'd be nice not to tamper with it when synchronized from another app, as I recall some data being stripped when I added them in Thunderbird once, can't remember which.

For average users it might not be as useful, at least until properly supported in the contacts as well. But what if the contacts supported it as well, and proposed to lookup the coordinates when entering addresses? Then when synchronized with a mobile app it would allow one-clic to a GPS app without having to look up the address each time.

But again, that means having the property exposed in the first place. Thunderbird has tickets about this: 583569, 1370160.

Since it is a standard property I would most definately like to use it. And there is more than Thunderbird...
I use the calendar ics export to sync with the events calendar on http://cadet.nl this also shows a little map on the next upcoming location of an event. (windy).
I am sure I am not the only one using maps in either calendar or synced 'anything' like mobile phones or web pages showing events.

Now I am syncing and adding GEO data using a plugin in the CMS. But now each sync, there is no GEO property set and the CMS plugin has to do all entries again since the GEO is missing.
Doing geocoding in a batch may run you into trouble with the geocoding providers such as Google (which is paid nowadays), OpenStreetmaps (blocking you with to many requests in a short time), Geocoding.xyz (being very slow sometimes).

Having the GEO property to add manually or automatically would come in handy.
By the way I can also imagine this same GEO property to be added to the Contacts app.
This way when a location is picked from the Contacts list, there is no need to query the third party services.

Being able to use a standard GEO property would reduce the amount of workflows for synced applications. It would reduce issues with geocoding providers, it would allow to minimize costs (or not at all) on geocoding.

My plan about this is the following:

  • Add a new input like in the Contacts app, that allows you to select "advanced" properties:
    e2f1cc0e-2972-4b71-b943-142def9c518e
  • So if there is a GEO-property already, it will simply be displayed next to the other properties
  • If there is no GEO-property yet, you will have to select GEO in the dropdown first.

If this is also added to the contacts app it would be even more awesome.
the GEO property is also in vcf/vcard https://en.wikipedia.org/wiki/VCard#Properties

Calendar can then pickup the GEO location from the contacts when adding a known location.

First many thanks for providing the geo URI feature in NextCloud. You are once more ahead of your users and I am astonished that it is already implemented!

I checked this feature in NextCloud Contacts, it allows to add the "Ort" / Geolocation attribute to a VCard.
Unfortunately there are several shortcomings:

  1. NextCloud uses semicolon as coordinate separator: 90.000;0.000 RFC 5870 uses comma for coordinates (x,y and optional ,z) and semicolon for other optional attributes, e.g. CRS system, uncertainty

  2. The Contacts in the NextCloud UI provide a link to open in a new Window / Tab.
    It leads to https://90.000;0.000/ and an expected 404 error on my browser. According to RFC 5870 it should lead to geo:90.000,0.000 (ie. Geographic Northpole) which can be linked to the Geo Application of Choice, e.g. Gnome Maps under Linux.

image

  1. The NextCloud implementation in the VCard does add the GEO location tag as following
    GEO;VALUE=FLOAT:90.000,0.000
    The site https://geouri.org describes an example for different types of Geo Tags according to RFC 2426 and follows the RFC 5870 specification by preferring lowercase for geo: URIs.
    GEO;TYPE=work:geo:90.000,0.000

Dear @georgehrke, would you be willing to switch to comma separator and add the geo: prefix to the VCard and Link instead of https:// ?

@stefan123t This is the repository of the __Calendar__ app, not Contacts.
Please open an issue here: https://github.com/nextcloud/contacts/issues

Thanks @georgehrke I have opened https://github.com/nextcloud/contacts/issues/1720 to track it under Contacts app.

Why has it moved from 2.1.0 to "maybe some day"?
It is a standard vCal property used to point to Event locations.
The property is in the RFC. Imho it should be supported.
Since the option already has been added to contacts app (optional property: location) There should be no reason to not add it to the calendar app.

Though the feature that auto-completes locations from contacts app still hasn't been repaired.

Off-topic: @pieter-groeneweg the problem with adding locations for addresses in contacts app is most likely due to the fact that you would need access to a so called geocoding service that searches your address and returns lat/lon coordinates. This usually requires eg. an API key (eg Google Maps) or access to the OpenStreetmap (OSM) database. There are at least two projects around OSM for this purpose afaik:

Nominatim
https://github.com/osm-search/Nominatim

Photon
https://github.com/komoot/photon

Here is a php wrapper for multiple geocoding APIs, you may want to check their cookbook chapters on Caching and Rate Limiting to stay within the acceptable use limits of Nominatim/Photon API backends.

Geocoder/PHP
https://github.com/geocoder-php/Geocoder

It also supports a configurable Formatter for location strings.

What should happen if the suggestions in the location field can not be retrieved with your current entry (same for contacts or calendar) ?

Please note that especially calendar entries may include a floor/room number usually not retrievable from OSM. Maybe we need to split the location field (using a custom delimiter) in location address and location floor/room to make it failsave.

@stefan123t As I wrote in my comment:

Having the GEO property to add manually or automatically would come in handy.
By the way I can also imagine this same GEO property to be added to the Contacts app.
This way when a location is picked from the Contacts list, there is no need to query the third party services.

The GEO properties already can be entered manually in contacts app.

In the past the LOCATION (without GEO) could be picked up automatically from contacts app if it was available.(https://github.com/nextcloud/calendar/issues/1959)
Soon as the LOCATION autocompletion is repaired, GEO property could be included imo

Question remains if you need this automated. That would be an extra service.
Google Maps API, OpenStreetMaps, Geocode.xyz are but a few.
The usual way to request GEO results is by domain.com?details+of+location. They all return either an XML or JSON.
They almost all work the same.

Caching and rate limiting can be an issue when you are not using a paid subscription, but in reality I cannot type and enter contacts and calendar items that fast to reach these limits.
This only becomes an issue when I send batches of locations to be geo-ed.
In my setup, if the GEO property is available, I don't need to send batch requests anymore.

Plse note
LOCATION is a property used in both vCard and vCal
GEO is a property used in both vCard and vCal also
Though on a map they will almost always show the same, they are not. LOCATION != GEO
They should be both available and also be allowed to change manually.

Was this page helpful?
0 / 5 - 0 ratings