# Class: RGeo::CoordSys::CS::CoordinateSystem

Inherits:
Info
• Object
show all
Defined in:
lib/rgeo/coord_sys/cs/entities.rb

## OGC spec description

Base interface for all coordinate systems.

A coordinate system is a mathematical space, where the elements of the space are called positions. Each position is described by a list of numbers. The length of the list corresponds to the dimension of the coordinate system. So in a 2D coordinate system each position is described by a list containing 2 numbers.

However, in a coordinate system, not all lists of numbers correspond to a position – some lists may be outside the domain of the coordinate system. For example, in a 2D Lat/Lon coordinate system, the list (91,91) does not correspond to a position.

Some coordinate systems also have a mapping from the mathematical space into locations in the real world. So in a Lat/Lon coordinate system, the mathematical position (lat, long) corresponds to a location on the surface of the Earth. This mapping from the mathematical space into real-world locations is called a Datum.

## Notes

This is a non-instantiable abstract class. You must instantiate one of the subclasses GeocentricCoordinateSystem, GeographicCoordinateSystem, ProjectedCoordinateSystem, VerticalCoordinateSystem, LocalCoordinateSystem, or CompoundCoordinateSystem.

## Instance Attribute Summary collapse

Dimension of the coordinate system.

## Instance Method Summary collapse

• Gets axis details for dimension within coordinate system.

• Gets units for dimension within coordinate system.

• constructor

:nodoc:.

#extension

## Constructor Details

### #initialize(name_, dimension_, *optional_) ⇒ CoordinateSystem

:nodoc:

 ``` 1076 1077 1078 1079``` ```# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1076 def initialize(name_, dimension_, *optional_) # :nodoc: super(name_, *optional_) @dimension = dimension_.to_i end```

## Instance Attribute Details

Dimension of the coordinate system

 ``` 1083 1084 1085``` ```# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1083 def dimension @dimension end```

## Instance Method Details

### #get_axis(dimension_) ⇒ Object

Gets axis details for dimension within coordinate system. Each dimension in the coordinate system has a corresponding axis.

 ``` 1089 1090 1091``` ```# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1089 def get_axis(dimension_) nil end```

### #get_units(dimension_) ⇒ Object

Gets units for dimension within coordinate system. Each dimension in the coordinate system has corresponding units.

 ``` 1097 1098 1099``` ```# File 'lib/rgeo/coord_sys/cs/entities.rb', line 1097 def get_units(dimension_) nil end```