Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Provide GEO uri next to permalink on the map #3330

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 9 comments
Closed

Provide GEO uri next to permalink on the map #3330

openstreetmap-trac opened this issue Jul 23, 2021 · 9 comments

Comments

@openstreetmap-trac
Copy link

Reporter: steelman
[Submitted to the original trac issue database at 4.35am, Sunday, 7th November 2010]

[http://tools.ietf.org/html/rfc5870 RFC 5870] describes a "geo:" uri scheme that is design to point to geographic locations. This patch adds a GEO link next to Permalink in the lower right corner of the map.

The patch contains some comments around the JS code, which may of course be removed.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 4.04pm, Sunday, 7th November 2010]

Is there anything that actually uses such URIs though?

@openstreetmap-trac
Copy link
Author

Author: steelman
[Added to the original trac issue at 4.27pm, Sunday, 7th November 2010]

I know of two pieces of software:

  • [http://geouri.org/2007/02/26/firefox-extension-handles-geo-uri/ a Firefox extension]
  • [https://github.com/steelman/org-mode/blob/org-geo/contrib/lisp/org-geo.el an extension] to Emacs' org-mode

And I hope there will be more because geouri is the most convenient (well defined) way to exchange geographic coordinats between geo-aware applications. The org-mode extension, for example, accepts dropped geo links and sets GEO property on a note.

@openstreetmap-trac
Copy link
Author

Author: steelman
[Added to the original trac issue at 10.11pm, Sunday, 7th November 2010]

Do not apply this patch yet. I need to make the uncertainty calculation take the rounding done at the beginning of the function into account properly. I'll tell you when it's ready.

@openstreetmap-trac
Copy link
Author

Author: steelman
[Added to the original trac issue at 1.19am, Friday, 12th November 2010]

OK. Here is a piece of maths:

Let's assume Earth's average circumference is 40041455m

At zoom 0 one pixel corresponds 156412m (40041455m / 256px), and it is
divided with every next zoom level by two. At zoom level 15 one
pixel is 4.77m.

The degree uncertainty which lies in rounding:

decimals = Math.pow(10, Math.floor(zoom/3));
lat = Math.round(lat * decimals) / decimals;

with decimals equal 1 for zoom 0, starts at 111226m (40041455m /
360). It drops tenfold every three zoom levels which is 2.15.
This makes degree uncertainty always less than ''pixel
uncertainty'', hence the latter should be used. The pxunc
variable is of arbitrary choice and specifies our assumption about how
many pixels a human can miss while choosing a position.

PS. I consider uncertainty here as a maximum error (east-west on the
equator, north-south everywhere assuming the Earth is e sphere) with a
[http://en.wikipedia.org/wiki/Uniform_distribution_%28continuous%29
uniform distribution] (the RFC doesn't specify the distribution). The
diagonal degree error (on the equator) is something about 157297m,
while diagonal pixel error is 221200m.

@openstreetmap-trac
Copy link
Author

Author: steelman
[Added to the original trac issue at 1.24am, Friday, 12th November 2010]

I mean: "which is 2.15 per one zoom level".

@openstreetmap-trac
Copy link
Author

Author: steelman
[Added to the original trac issue at 10.43pm, Wednesday, 1st December 2010]

Ping!

@openstreetmap-trac
Copy link
Author

Author: steelman
[Added to the original trac issue at 7.29pm, Friday, 22nd April 2011]

Ping!

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 2.51pm, Tuesday, 26th April 2011]

I'm very reluctant to use up precious screen real estate for this while there are so few potential users for it.

The risk is that we will confuse people who will see this link but (in 99.999% of cases) find that nothing happens (or they get an error) when they click on it. I don't see that the benefits are currently sufficient to outweigh that downside.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 1.01pm, Thursday, 23rd July 2015]

This was implemented in [changeset:6403cb9/rails].

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant