Class: RGeo::Geographic::ProjectedPointImpl
- Inherits:
-
Object
- Object
- RGeo::Geographic::ProjectedPointImpl
- 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
Instance Method Summary collapse
- #_validate_geometry ⇒ Object
- #canonical_point ⇒ Object
- #canonical_x ⇒ Object (also: #canonical_longitude, #canonical_lon)
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
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_geometry ⇒ Object
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_point ⇒ Object
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_x ⇒ Object 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 |