Class: RGeo::CoordSys::CS::Projection
- Defined in:
- lib/rgeo/coord_sys/cs/entities.rb
Overview
OGC spec description
A projection from geographic coordinates to projected coordinates.
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Gets the projection classification name (e.g. “Transverse_Mercator”).
Attributes inherited from Info
#abbreviation, #alias, #authority, #authority_code, #name, #remarks
Class Method Summary collapse
-
.create(name_, class_name_, parameters_, *optional_) ⇒ Object
Create a Projection given a name, a projection class, and an array of ProjectionParameter.
Instance Method Summary collapse
-
#_wkt_content(_open_, _close_) ⇒ Object
:nodoc:.
-
#_wkt_typename ⇒ Object
:nodoc:.
-
#each_parameter(&block_) ⇒ Object
Iterates over the parameters of the projection.
-
#get_parameter(index_) ⇒ Object
Gets an inexed parameter of the projection.
-
#initialize(name_, class_name_, parameters_, *optional_) ⇒ Projection
constructor
:nodoc:.
-
#num_parameters ⇒ Object
Gets number of parameters of the projection.
Methods inherited from Info
Methods inherited from Base
#_to_wkt, #encode_with, #eql?, #hash, #init_with, #inspect, #marshal_dump, #marshal_load, #to_s, #to_wkt
Constructor Details
#initialize(name_, class_name_, parameters_, *optional_) ⇒ Projection
:nodoc:
817 818 819 820 821 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 817 def initialize(name_, class_name_, parameters_, *optional_) # :nodoc: super(name_, *optional_) @class_name = class_name_.to_s @parameters = parameters_ ? parameters_.dup : [] end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Gets the projection classification name (e.g. “Transverse_Mercator”).
825 826 827 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 825 def class_name @class_name end |
Class Method Details
.create(name_, class_name_, parameters_, *optional_) ⇒ Object
Create a Projection given a name, a projection class, and an array of ProjectionParameter. You may also provide the optional parameters specified by the Info interface.
858 859 860 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 858 def create(name_, class_name_, parameters_, *optional_) new(name_, class_name_, parameters_, *optional_) end |
Instance Method Details
#_wkt_content(_open_, _close_) ⇒ Object
:nodoc:
849 850 851 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 849 def _wkt_content(_open_, _close_) # :nodoc: [] end |
#_wkt_typename ⇒ Object
:nodoc:
845 846 847 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 845 def _wkt_typename # :nodoc: "PROJECTION" end |
#each_parameter(&block_) ⇒ Object
Iterates over the parameters of the projection.
841 842 843 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 841 def each_parameter(&block_) @parameters.each(&block_) end |
#get_parameter(index_) ⇒ Object
Gets an inexed parameter of the projection.
835 836 837 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 835 def get_parameter(index_) @parameters[index_] end |
#num_parameters ⇒ Object
Gets number of parameters of the projection.
829 830 831 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 829 def num_parameters @parameters.size end |