rNews: The Location Class

The Location Class
Figure: Attributes of the Location class.
The Location class is a subclass of the Tag class used for annotating geographic real-world entities. In addition to the name attribute inherited from the Tag class, the Location class provides three attributes: latitude, longitude, and altitude. These attributes all expect a value of type xsd:double and should be assigned based on the geographic center of the underlying geographic entity. For instance, for the location Libya we might assign the latitude 27.4, and the longitude 17.6, since these values are very near the center of the country.

 

Location Attribute Summary
The table below enumerates all attributes of the Location class and provides the expected data type, category (core/power) and a definition of each attribute.

 

Attribute Type Category Definition
latitude xsd:double power The latitude of the location. Latitudes north of the equator shall be designated by use of the plus sign (+), latitudes south of the equator shall be designated by use of the minus sign (-). The equator shall be designated by use of the plus sign (+)
longitude xsd:double power "The longitude of the location. Longitudes east of Greenwich shall be designated by use of the plus sign (+), longitudes west of Greenwich shall be designated by use of the minus sign (-). The Prime Meridian shall be designated by use of the plus sign (+). The 180th meridian shall be designated by use of the minus sign (-)."
altitude xsd:double power "The altitude of the location. The altitude is given in meters. A positive integer means a position above the zero elevation, a negative value below the zero elevation."

 

Applying the Location Class
Our sample article contains five locations:
  • Libya
  • France
  • Great Britain
  • United States
  • Turkey
To express these tags in RDF/Turtle using attributes from the rnews Tag and Location classes, we would write the following:
      @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
      @prefix rnews: <http://iptc.org/std/rNews/2011-02-02#> .

      <http://data.nytimes.com/66285699086722007041> 
        a rnews:Location ;
        rnews:latitude "25.0" ;
        rnews:longitude "17.0" ;
        rnews:name "Libya" . 
      
      <http://data.nytimes.com/67127587134490296321> 
        a rnews:Location ;
        rnews:latitude "46.0" ;
        rnews:longitude "2.0" ;
        rnews:name "France" . 

      <http://data.nytimes.com/42273881931420178781> 
        a rnews:Location ;
        rnews:latitude "54.0" ;
        rnews:longitude "-4.0" ;
        rnews:name "Great Britain" .
         
      <http://data.nytimes.com/N84789043836346105961> 
        a rnews:Location ;
        rnews:latitude "39.76" ;
        rnews:longitude "-98.5" ;
        rnews:name "United States" .
         
      <http://data.nytimes.com/55791562732592005121> 
        a rnews:Location ;
        rnews:latitude "39.0" ;
        rnews:longitude "35.0" ;
        rnews:name "Turkey" . 

 

Want to comment on rNews: we invite you to post your comment to the rNews Forum.