Class: RGeo::CoordSys::CS::Info
- Defined in:
- lib/rgeo/coord_sys/cs/entities.rb
Overview
OGC spec description
A base interface for metadata applicable to coordinate system objects.
The metadata items “Abbreviation”’, “Alias”, “Authority”, “AuthorityCode”, “Name” and “Remarks” were specified in the Simple Features interfaces, so they have been kept here.
This specification does not dictate what the contents of these items should be. However, the following guidelines are suggested:
When CS_CoordinateSystemAuthorityFactory is used to create an object, the “Authority” and “AuthorityCode” values should be set to the authority name of the factory object, and the authority code supplied by the client, respectively. The other values may or may not be set. (If the authority is EPSG, the implementer may consider using the corresponding metadata values in the EPSG tables.)
When CS_CoordinateSystemFactory creates an object, the “Name” should be set to the value supplied by the client. All of the other metadata items should be left empty.
Notes
This is a non-instantiable abstract class.
Most subclasses will have a set of optional parameters in their “create” method to set the metadata fields. These parameters are, in order:
-
authority: authority name
-
authority_code: authority-specific identification code
-
abbreviation: an abbreviation
-
alias: an alias
-
remarks: provider-supplied remarks.
Direct Known Subclasses
CoordinateSystem, Datum, Ellipsoid, PrimeMeridian, Projection, Unit
Instance Attribute Summary collapse
-
#abbreviation ⇒ Object
readonly
Gets the abbreviation.
-
#alias ⇒ Object
readonly
Gets the alias.
-
#authority ⇒ Object
readonly
Gets the authority name.
-
#authority_code ⇒ Object
readonly
Gets the authority-specific identification code.
-
#name ⇒ Object
readonly
Gets the name.
-
#remarks ⇒ Object
readonly
Gets the provider-supplied remarks.
Instance Method Summary collapse
-
#initialize(name_, authority_ = nil, authority_code_ = nil, abbreviation_ = nil, alias_ = nil, remarks_ = nil) ⇒ Info
constructor
:nodoc:.
Methods inherited from Base
#_to_wkt, #eql?, #inspect, #to_s, #to_wkt
Constructor Details
#initialize(name_, authority_ = nil, authority_code_ = nil, abbreviation_ = nil, alias_ = nil, remarks_ = nil) ⇒ Info
:nodoc:
447 448 449 450 451 452 453 454 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 447 def initialize(name_, =nil, =nil, abbreviation_=nil, alias_=nil, remarks_=nil) # :nodoc: @name = name_ @authority = ? .to_s : nil @authority_code = ? .to_s : nil @abbreviation = abbreviation_ ? abbreviation_.to_s : nil @alias = alias_ ? alias_.to_s : nil @remarks = remarks_ ? remarks_.to_s : nil end |
Instance Attribute Details
#abbreviation ⇒ Object (readonly)
Gets the abbreviation.
458 459 460 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 458 def abbreviation @abbreviation end |
#alias ⇒ Object (readonly)
Gets the alias.
461 462 463 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 461 def alias @alias end |
#authority ⇒ Object (readonly)
Gets the authority name. An Authority is an organization that maintains definitions of Authority Codes. For example the European Petroleum Survey Group (EPSG) maintains a database of coordinate systems, and other spatial referencing objects, where each object has a code number ID. For example, the EPSG code for a WGS84 Lat/Lon coordinate system is “4326”.
470 471 472 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 470 def @authority end |
#authority_code ⇒ Object (readonly)
Gets the authority-specific identification code. The AuthorityCode is a compact string defined by an Authority to reference a particular spatial reference object. For example, the European Survey Group (EPSG) authority uses 32 bit integers to reference coordinate systems, so all their code strings will consist of a few digits. The EPSG code for WGS84 Lat/Lon is “4326”.
479 480 481 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 479 def @authority_code end |
#name ⇒ Object (readonly)
Gets the name.
482 483 484 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 482 def name @name end |
#remarks ⇒ Object (readonly)
Gets the provider-supplied remarks.
485 486 487 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 485 def remarks @remarks end |