geo-brainstorming

From Microformats Wiki
Revision as of 11:48, 7 November 2010 by Steelman (talk | contribs) (→‎RFC 5870: dleted unnecessary words)
Jump to navigation Jump to search

Geo brainstorming

This page is about geo both as a stand-alone microformat, and as a sub-set of hCard. See also hcard-brainstorming.

Geo improvements

I (Tantek) have seen examples of where there is a human viewable/clickable presentation of a point on a map, and the desire to include the machine readable geo information with the same element, e.g. something like:

<abbr class="geo" title="machine-readable-geo-info">
 human readable/clickable point on a map
</abbr>

But to do this we must specify a syntax for putting both the latitude and longitude into the title attribute as the machine-readable-geo-info.

Fortunately, there already is a syntax for that, in vCard RFC 2426 3.4.2:

   Type value: A single structured value consisting of two float values
   separated by the SEMI-COLON character (ASCII decimal 59).

   Type special notes: This type specifies information related to the
   global position of the object associated with the vCard. The value
   specifies latitude and longitude, in that order (i.e., "LAT LON"
   ordering).

...

   Type example:

        GEO:37.386013;-122.082932

Thus:

<abbr class="geo" title="37.386013;-122.082932">
 Mountain View, CA
</abbr>

I think this is pretty much a no-brainer, because the rules for parsing "geo" are simply altered to:


latitude longitude shorthand

If a "geo" property lacks explicit "latitude" and "longitude" subproperties, then the "geo" property is treated like any other string property (e.g. following rules for parsing <abbr title>, <img alt> etc.), where that string value has the same literal syntax as specified in RFC 2426 section 3.4.2: single structured value consisting of two float values separated by the SEMI-COLON character (ASCII decimal 59), specifying latitude and longitude, in that order.

geo links

In addition, people may publish Google Maps links like this:

<a href="http://maps.google.com/maps?q=37.386013+-122.082932">this spot</a>

or Yahoo! Maps links like this:

<a href="http://maps.yahoo.com/#lat=37.386013&lon=-122.082932&mag=3">this spot</a>

Is it worth permitting this to be a geo as well?

I'm raising this to make sure it is considered.

However, my first guess is NO for two reasons.

  1. No such examples in the wild have been documented or seen as of yet (I certainly haven't seen any).
  2. It would involve additional parsing requirements which are almost certainly going to be site/domain specific, and encoding a particular site's query parameter syntax into a format seems like a bad idea (against principle of decentralization).

This could be mitigated if mapping services would simply accept the literal vCard GEO syntax "37.386013;-122.082932", e.g. http://maps.google.com/maps?q=37.386013;-122.082932 (which currently doesn't work) then we could make a simple rule such as for hyperlinks, parse the href attribute for a geo value at the end of the href, delimited before the value by a "=" (or perhaps "/" for services that use friendlier URLs).

-OttoOtto 12:51, 6 Sep 2007 (PDT)


latitude longitude shorthand and geo link

The idea is a mixture of using latitude longitude shorthand and geo link which could be represented by:

<a href="http://www.geonames.org/6077243" title="45.5140800;-73.6111000"
class="geo">Montréal, Quebec, Canada</a>

This is an existing publishing practice:

Some of this is covered in this mailing list thread: http://microformats.org/discuss/mail/microformats-discuss/2009-December/013167.html

-Sarven Capadisli 11:19, 31 December 2009 (UTC)


There are a few things interesting about this example.

  • It's prime for marking up as an adr - a structured address, since it has locality, region, country-name semantics.
    • I acknowledge that adr can be used here, but example is minimized for geo. -Sarven Capadisli 13:55, 15 January 2010 (UTC)
      • Need complete example. It's better to work with a complete real-world example rather than one that has been minimized, so that all the relevant content/markup/context can be considered. Tantek 20:37, 8 February 2010 (UTC)
  • Using the title attribute for semicolon separated lat-long may not be the user-friendliest thing to do.
    • I'd presume that this is similar to the general public comprehending the full ISO8601 format, but much harder. So, I can agree with that. For this geo minimization though, it had to go somewhere. -Sarven Capadisli 13:55, 15 January 2010 (UTC)
      • However, we must avoid presenting the user with content that is not human readable/listenable. If it "has to go somewhere", we must figure out a human readable/listenable way to do so. Tantek 20:37, 8 February 2010 (UTC)
  • Given microformats experience with various uses of the the title attribute - a good rule of thumb is to check to make sure that the content you are putting into the title attribute is both reasonably human readable and listenable.

Here is some better markup that could be applied to the example today:

<a class="adr" href="http://www.geonames.org/6077243">
 <span class="locality">Montréal</span>, 
 <span class="region">Quebec<span>, 
 <span class="country-name">Canada</span>
 (<span class="geo">lat:<span class="latitude">45.5140800</span>; 
    long <span class="longitude">-73.6111000</span></span>)
</a>

- Tantek 15:08, 31 December 2009 (UTC)

That is changing the example. Could you explain how

(<span class="geo">lat:<span class="latitude">45.5140800</span>; 
long <span class="longitude">-73.6111000</span></span>)

is more user friendly than

title="45.5140800;-73.6111000"

-Sarven Capadisli 13:55, 15 January 2010 (UTC)


When the two examples are rendered, the first:

  • lat:45.5140800; long:-73.6111000

is more user friendly than

  • 45.5140800;-73.6111000

by the simple fact that at least the user is given labels which provide context for the numbers.

-Tantek 20:37, 8 February 2010 (UTC)

altitude

Some folks have asked for "altitude" as an extension to GEO. See geo-extension-elevation . Currently we are rejecting all property/value extensions to hCard/vCard.

radius/zoom

Kevin Marks has asked for "radius" or "zoom" as an extension to GEO. Currently we are rejecting all property/value extensions to hCard/vCard.

ISO 19136

When it comes to anything geospatial, any unadorned / simple encoding must remain upwardly-compatible with the more sophisticated GML schema (Geography Markup Language ) which is also known as ISO 19136. This is so that all the fundamental nuances underpinning geocoding ( different datums, different projections, elevation, etc etc ) can ultimately ( or sooner ? ) be completely accounted for.

If you don't know/supply your Coordinate Reference System CRS identifier, your location could fall 100s of metres away from the position intended ie plot in the wrong location on a map. Appendix B of draft ISO/DIS 6709 highlights the variation among three commonly used systems.

ISO 6709

The Geo field in the vCard format seems to be based on ISO 6709:1983.

The International Standard is being updated, ISO/DIS 6709, to allow for depths as well as heights and to include Coordinate Reference System (CRS) identification. Voting on the revised standard finishes on the 15th February 2007.

Section 6.3 of ISO/DIS 6709 notes the elements required required for geographic point location:

In this International Standard, geographic point location shall be represented by five elements:

  • a coordinate reference system identification;
  • coordinate representing “x” horizontal position such as latitude;
  • coordinate representing “y” horizontal position such as longitude;
  • for three-dimensional point locations, a value representing vertical position through either height or depth;
  • metadata associated with geographic point location(s) (ISO 19115)

The CRS identifier is important otherwise your location could fall 100s of metres away from the position intended.

Annex H details the ISO standard for text string representation of point location.

H.6 Format

H.6.1 Elements shall be combined in a point location string in the following sequence:

a) Latitude

b) Longitude

c) if represented, height or depth

d) Coordinate Reference System identifier


H.6.2 The number of digits for latitude, longitude and height (depth) shall indicate the precision of available data.


H.6.3 There shall be no separator between the elements for latitude, longitude, height (depth) and CRS. NOTE The use of designators "+", "-" and "CRS" preceding the value part of each element permits the recognition of the start of each element and the termination of the previous one.


H.6.4 The point location string shall be terminated. The terminator character shall be a solidus (/), unless otherwise specified in the documentation associated with interchange.

A small explanation can be found in Wikipedia.

It differs from the notation of vCard, for example.

If ISO6709 is used, it is likely to be able to write as follows.

examples
<abbr class="geo" title="+40-075CRSxxxx/">
 Point represented as Degrees
</abbr>

<abbr class="geo" title="+401213.1-0750015.1+2.79CRSxxxx/">
 Point represented as Degrees, minutes, seconds and decimal seconds, with +2.79 a height or depth as defined through the CRS.
</abbr>

A C# library to read and write ISO 6709 coordinates from/to xml can be found in Codeplex

Geo Encodings

It is important that whenever location is described that it is achieved in the most openly interoperable manner. A relatively small number of encodings is needed that will meet the needs of a wide range of information communities and users. At http://www.georss.org/ two relatively simple schema have been published; one for WGS84 latitude/longitude ( termed 'simple'), and the other provisions for this AND coordinate reference systems other than WGS84 latitude/longitude ... of which there are a multitude - so this an argument for simple encodings to be upwardly-compatible with the more sophisticated GML schema (Geography Markup Language ).

ISO 19115

ISO 19115:2003 defines the schema required for describing geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal schema, spatial reference, and distribution of digital geographic data.

Categorising locations

Perhaps categorsing locations would enable map mashups of microformatted information ? For example, show me a map of the nearest 'place of worship'. This fragment from an application schema illustrates a range of place categories http://www.linz.govt.nz/resources/esa-appl-schema-v1-9-5/esa-46.html#1804

UN/LOCODEs

UN/LOCODE is a geographic coding scheme developed and maintained by United Nations Economic Commission for Europe, a unit of the United Nations. It provides a unified way to identify interesting points through definition of functions. It may be useful if the geo microformat could support it. http://en.wikipedia.org/wiki/UN/LOCODE

RFC 5870

Quite recently an the RFC 5870 document has been published that describes a URI format for geographic locations. The draft for vCard version 4.0 establishes new GEO parameter format with reference to that RFC. You can find more information related to the RFC at http://geouri.org/ . With this RFC at hand a reference to a geographic position in microformats (and in HTML generally) should look as simple as:

<a href="geo:51.511233,-0.128317">Leicester Square, London</a>

Geo implementations

GPX

Parsers might convert Geo to GPX ("GPS eXchange Format"), an XML schema designed for transferring GPS data between software applications (and GPS devices), which can be used to describe waypoints, tracks, and routes. See GPX on Wikipedia. Andy Mabbett 11:44, 3 Apr 2007 (PDT)

Great circle distance

A parser might offer the option to select two Geo-uFs from a page, or the single Geo on each of two pages, and calculate the distance between them. Andy Mabbett 04:36, 18 Apr 2007 (PDT)

  • Example on-line calculators: [1], [2]

Other use cases

Please add your suggestions!

Geo microformats could be used to:

  • Generate GPX files
  • ...


Related pages