h-geo

(Difference between revisions)

Jump to: navigation, search
m (Reverted edits by Gowrvw (Talk) to last version by Tantek)
Line 1: Line 1:
-
HOW THING THROUGH
+
<entry-title>h-geo</entry-title>
-
HOW MAKE THING THROUGH
+
<span class="h-card vcard"><span class="p-name fn">[[User:Tantek|Tantek Çelik]]</span> (<span class="p-role role">Editor</span>)</span>
-
HOW THING BE THROUGH
+
----
-
HOW MAKE THING BE THROUGH
+
<dfn style="font-style:normal;font-weight:bold">h-geo</dfn> is a simple, open format for publishing [http://en.wikipedia.org/wiki/WGS84 WGS84] geographic coordinates. h-geo is one of several open [[microformats|microformat]] draft standards suitable for embedding data in HTML/HTML5.
-
HOW ANYTHING THROUGH
+
 
-
HOW MAKE ANYTHING THROUGH
+
h-geo is the [[microformats2]] update to [[geo]]. It is most commonly used as part of an [[h-card]] or [[h-event]].
-
HOW ANYTHING BE THROUGH
+
 
-
HOW MAKE ANYTHING BE THROUGH
+
{{cc0-owfa-license}}
-
HOW EVERYTHING THROUGH
+
 
-
HOW MAKE EVERYTHING THROUGH
+
== Example ==
-
HOW EVERYTHING BE THROUGH
+
Here is a simple h-geo example:
-
HOW MAKE EVERYTHING BE THROUGH
+
 
-
HOW UNIVERSE THROUGH
+
<source lang=html4strict>
-
HOW MAKE UNIVERSE THROUGH
+
<p class="h-geo">
-
HOW UNIVERSE BE THROUGH
+
  <span class="p-latitude">-27.116667</span>,
-
HOW MAKE UNIVERSE BE THROUGH
+
  <span class="p-longitude">-109.366667</span>
-
HOW THING OUT
+
</p>
-
HOW MAKE THING OUT
+
</source>
-
HOW THING BE OUT
+
 
-
HOW MAKE THING BE OUT
+
=== Get started ===
-
HOW ANYTHING OUT
+
The class '''<code>h-geo</code>''' is a ''root class name'' that indicates the presence of an h-geo.
-
HOW MAKE ANYTHING OUT
+
 
-
HOW ANYTHING BE OUT
+
'''p-latitude''', '''p-longitude''' and '''p-altitude''' classnames define an element as a ''property'' of the h-geo.
-
HOW MAKE ANYTHING BE OUT
+
 
-
HOW EVERYTHING OUT
+
See [[microformats2-parsing]] to learn more about property classnames.
-
HOW MAKE EVERYTHING OUT
+
 
-
HOW EVERYTHING BE OUT
+
== Properties ==
-
HOW MAKE EVERYTHING BE OUT
+
h-geo properties, inside an element with class '''h-geo''':
-
HOW UNIVERSE OUT
+
* '''<code>p-latitude</code>''' - decimal latitude
-
HOW MAKE UNIVERSE OUT
+
* '''<code>p-longitude</code>''' - decimal longitude
-
HOW UNIVERSE BE OUT
+
* '''<code>p-altitude</code>''' - decimal altitude
-
HOW MAKE UNIVERSE BE OUT
+
 
-
HOW THING THROUGH
+
All properties are optional.
-
HOW MAKE THING THROUGH
+
 
-
HOW THING BE THROUGH
+
== Status ==
-
HOW MAKE THING BE THROUGH
+
 
-
HOW ANYTHING THROUGH
+
'''h-geo''' is a microformats.org draft specification. Public discussion on h-geo takes place on [[h-geo-feedback]], the #microformats [[irc]] channel on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-new/ microformats-new mailing list].
-
HOW MAKE ANYTHING THROUGH
+
 
-
HOW ANYTHING BE THROUGH
+
h-geo is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-geos up with classic [[geo]] classnames.
-
HOW MAKE ANYTHING BE THROUGH
+
 
-
HOW EVERYTHING THROUGH
+
== Property Details ==
-
HOW MAKE EVERYTHING THROUGH
+
 
-
HOW EVERYTHING BE THROUGH
+
'''p-altitude''' refers to the distance in metres from the nominal sea level along the tangent of the earth’s curve. For more information refer to the [http://en.wikipedia.org/wiki/WGS84 WGS84] specification.
-
HOW MAKE EVERYTHING BE THROUGH
+
 
-
HOW UNIVERSE THROUGH
+
== FAQ ==
-
HOW MAKE UNIVERSE THROUGH
+
 
-
HOW UNIVERSE BE THROUGH
+
'''How should I mark up lat/long coordinates without them looking messy and confusing?'''
-
HOW MAKE UNIVERSE BE THROUGH
+
 
-
HOW THING OUT
+
Unless your content is targeted at an audience with a high leg authoring '''p-latitude''' and '''p-longitude''' as plain numbers on a webpage may not be the best approach. In addition to this there may be accessibility issues due to the potentially long strings of numbers being read out.
-
HOW MAKE THING OUT
+
 
-
HOW THING BE OUT
+
You could present the coordinates in a more human-readable form, retaining the decimal coordinates inside data value attributes:
-
HOW MAKE THING BE OUT
+
 
-
HOW ANYTHING OUT
+
<source lang=html4strict>
-
HOW MAKE ANYTHING OUT
+
<p class="h-geo">
-
HOW ANYTHING BE OUT
+
  <data class="p-longitude" value="-27.116667">27° 7′ 0″ S</data>,
-
HOW MAKE ANYTHING BE OUT
+
  <data class="p-latitude" value="-109.366667">109° 22′ 0″ W</data>
-
HOW EVERYTHING OUT
+
</p>
-
HOW MAKE EVERYTHING OUT
+
</source>
-
HOW EVERYTHING BE OUT
+
 
-
HOW MAKE EVERYTHING BE OUT
+
Alternatively you could not show coordinates at all and simply show a human-readable representation of the location, with the lat/long in value attributes of empty data elements.
-
HOW UNIVERSE OUT
+
 
-
HOW MAKE UNIVERSE OUT
+
== Examples in the Wild ==
-
HOW UNIVERSE BE OUT
+
* … add any h-geo examples you find in the wild
-
HOW MAKE UNIVERSE BE OUT
+
 
 +
 
 +
{{h-spec-section-validating}}
 +
 
 +
 
 +
== Backward Compatibility ==
 +
=== Publisher Compatibility ===
 +
For backward compatibility, you may wish to use classic [[geo]] classnames in addition to the more future-proof h-geo properties, for example:
 +
 
 +
<source lang=html4strict>
 +
<p class="h-geo geo">
 +
  <span class="p-latitude latitude">-27.116667</span>,
 +
  <span class="p-longitude longitude">-109.366667</span>
 +
</p>
 +
</source>
 +
 
 +
=== Parser Compatibility ===
 +
Microformats parsers should detect classic properties and parse them as microformats2 properties. If an "h-geo" is found, don't look for an "geo" on the same element.
 +
 
 +
Compatibility root class name: geo
 +
 
 +
Properties: (parsed as p- plain text unless otherwise specified)
 +
 
 +
* latitude
 +
* longitude
 +
 
 +
== Background ==
 +
 
 +
h-geo is based on the [http://en.wikipedia.org/wiki/WGS84 WGS84] standard, as well as existing [[geo]] specification, which was extracted from [[hCard]] in order to allow it to be used for applications other than contact information.
 +
 
 +
== See Also ==
 +
* [[microformats2]]
 +
* [[h-card]] and [[h-event]] often contain h-geo
 +
* [[h-adr]] is used to mark up human-readable structured addresses
 +
 
 +
[[Category:Draft Specifications]]

Revision as of 19:49, 25 August 2013

Tantek Çelik (Editor)


h-geo is a simple, open format for publishing WGS84 geographic coordinates. h-geo is one of several open microformat draft standards suitable for embedding data in HTML/HTML5.

h-geo is the microformats2 update to geo. It is most commonly used as part of an h-card or h-event.

Per CC0, to the extent possible under law, the editors have waived all copyright and related or neighboring rights to this work. In addition, as of 2020-01-20, the editors have made this specification available under the Open Web Foundation Agreement Version 1.0.

Contents

Example

Here is a simple h-geo example:

<p class="h-geo">
  <span class="p-latitude">-27.116667</span>,
  <span class="p-longitude">-109.366667</span>
</p>

Get started

The class h-geo is a root class name that indicates the presence of an h-geo.

p-latitude, p-longitude and p-altitude classnames define an element as a property of the h-geo.

See microformats2-parsing to learn more about property classnames.

Properties

h-geo properties, inside an element with class h-geo:

All properties are optional.

Status

h-geo is a microformats.org draft specification. Public discussion on h-geo takes place on h-geo-feedback, the #microformats irc channel on irc.freenode.net, and microformats-new mailing list.

h-geo is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-geos up with classic geo classnames.

Property Details

p-altitude refers to the distance in metres from the nominal sea level along the tangent of the earth’s curve. For more information refer to the WGS84 specification.

FAQ

How should I mark up lat/long coordinates without them looking messy and confusing?

Unless your content is targeted at an audience with a high leg authoring p-latitude and p-longitude as plain numbers on a webpage may not be the best approach. In addition to this there may be accessibility issues due to the potentially long strings of numbers being read out.

You could present the coordinates in a more human-readable form, retaining the decimal coordinates inside data value attributes:

<p class="h-geo">
  <data class="p-longitude" value="-27.116667">27° 7′ 0″ S</data>,
  <data class="p-latitude" value="-109.366667">109° 22′ 0″ W</data>
</p>

Alternatively you could not show coordinates at all and simply show a human-readable representation of the location, with the lat/long in value attributes of empty data elements.

Examples in the Wild


Main article: validators

Test and validate microformats2 markup in general with:


Backward Compatibility

Publisher Compatibility

For backward compatibility, you may wish to use classic geo classnames in addition to the more future-proof h-geo properties, for example:

<p class="h-geo geo">
  <span class="p-latitude latitude">-27.116667</span>,
  <span class="p-longitude longitude">-109.366667</span>
</p>

Parser Compatibility

Microformats parsers should detect classic properties and parse them as microformats2 properties. If an "h-geo" is found, don't look for an "geo" on the same element.

Compatibility root class name: geo

Properties: (parsed as p- plain text unless otherwise specified)

Background

h-geo is based on the WGS84 standard, as well as existing geo specification, which was extracted from hCard in order to allow it to be used for applications other than contact information.

See Also

Categories

h-geo was last modified: Wednesday, December 31st, 1969

Views