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 Base
#_to_wkt, #eql?, #inspect, #to_s, #to_wkt
Constructor Details
#initialize(name_, class_name_, parameters_, *optional_) ⇒ Projection
:nodoc:
919 920 921 922 923 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 919 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”).
928 929 930 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 928 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.
968 969 970 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 968 def create(name_, class_name_, parameters_, *optional_) new(name_, class_name_, parameters_, *optional_) end |
Instance Method Details
#_wkt_content(open_, close_) ⇒ Object
:nodoc:
956 957 958 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 956 def _wkt_content(open_, close_) # :nodoc: [] end |
#_wkt_typename ⇒ Object
:nodoc:
952 953 954 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 952 def _wkt_typename # :nodoc: "PROJECTION" end |
#each_parameter(&block_) ⇒ Object
Iterates over the parameters of the projection.
947 948 949 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 947 def each_parameter(&block_) @parameters.each(&block_) end |
#get_parameter(index_) ⇒ Object
Gets an inexed parameter of the projection.
940 941 942 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 940 def get_parameter(index_) @parameters[index_] end |
#num_parameters ⇒ Object
Gets number of parameters of the projection.
933 934 935 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 933 def num_parameters @parameters.size end |