Module: RGeo::CoordSys

Defined in:
lib/rgeo/coord_sys.rb,
lib/rgeo/coord_sys/cs/entities.rb,
lib/rgeo/coord_sys/cs/factories.rb,
lib/rgeo/coord_sys/cs/wkt_parser.rb

Overview

This module provides data structures and tools related to coordinate systems and coordinate transforms. It comprises the following parts:

RGeo::CoordSys::Proj4 is a wrapper around the proj4 library, which defines a commonly-used syntax for specifying geographic and projected coordinate systems, and performs coordinate transformations.

The RGeo::CoordSys::CS module contains an implementation of the CS (coordinate systems) package of the OGC Coordinate Transform spec. This includes classes for representing ellipsoids, datums, coordinate systems, and other related concepts, as well as a parser for the WKT format for specifying coordinate systems.

Defined Under Namespace

Modules: CS

Class Method Summary collapse

Class Method Details

.check!(key) ⇒ Object


33
34
35
# File 'lib/rgeo/coord_sys.rb', line 33

def self.check!(key)
  supported?(key) || raise(Error::UnsupportedOperation, "Coordinate system '#{key}' is not supported.")
end

.supported?(key) ⇒ Boolean

The only valid key is :proj4

Returns:

  • (Boolean)

Raises:


28
29
30
31
# File 'lib/rgeo/coord_sys.rb', line 28

def self.supported?(key)
  raise(Error::UnsupportedOperation, "Invalid key. The only valid key is :proj4.") unless key == :proj4
  defined?(RGeo::CoordSys::Proj4) && RGeo::CoordSys::Proj4.supported?
end