Class: RGeo::Geographic::ProjectedPointImpl

Inherits:
Object
  • Object
show all
Includes:
Feature::Point, ProjectedGeometryMethods, ImplHelper::BasicGeometryMethods, ImplHelper::BasicPointMethods
Defined in:
lib/rgeo/geographic/projected_feature_classes.rb

Overview

:nodoc:

Constant Summary

Constants included from Feature::Type

Feature::Type::Instance

Instance Method Summary collapse

Methods included from ProjectedGeometryMethods

#boundary, #buffer, #contains?, #convex_hull, #crosses?, #difference, #disjoint?, #distance, #envelope, #equals?, #intersection, #intersects?, #is_empty?, #is_simple?, #overlaps?, #projection, #relate, #srid, #sym_difference, #touches?, #union, #within?

Methods included from ImplHelper::BasicPointMethods

#boundary, #convex_hull, #dimension, #envelope, #eql?, #equals?, #geometry_type, #initialize, #is_empty?, #is_simple?, #m, #x, #y, #z

Methods included from ImplHelper::BasicGeometryMethods

#_set_factory, #as_binary, #as_text, #factory, #inspect, #to_s

Methods included from Feature::Point

#m, #x, #y, #z

Methods included from Feature::Type

#check_type, #subtype_of?, #type_name

Methods included from Feature::Geometry

#*, #+, #-, #==, #as_binary, #as_text, #boundary, #buffer, #contains?, #convex_hull, #crosses?, #difference, #dimension, #disjoint?, #distance, #envelope, #eql?, #equals?, #factory, #geometry_type, #intersection, #intersects?, #is_empty?, #is_simple?, #overlaps?, #relate, #srid, #sym_difference, #touches?, #union, #within?

Instance Method Details

#_validate_geometryObject



51
52
53
54
55
# File 'lib/rgeo/geographic/projected_feature_classes.rb', line 51

def _validate_geometry
  @y = 85.0511287 if @y > 85.0511287
  @y = -85.0511287 if @y < -85.0511287
  super
end

#canonical_pointObject



67
68
69
70
71
72
73
# File 'lib/rgeo/geographic/projected_feature_classes.rb', line 67

def canonical_point
  if @x >= -180.0 && @x < 180.0
    self
  else
    PointImpl.new(@factory, canonical_x, @y)
  end
end

#canonical_xObject Also known as: canonical_longitude, canonical_lon



58
59
60
61
62
# File 'lib/rgeo/geographic/projected_feature_classes.rb', line 58

def canonical_x
  x_ = @x % 360.0
  x_ -= 360.0 if x_ >= 180.0
  x_
end