Module: RGeo::Geographic::ProjectedGeometryMethods

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#boundaryObject


43
44
45
46
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 43

def boundary
  boundary = projection.boundary
  boundary ? factory.unproject(boundary) : nil
end

#buffer(distance) ⇒ Object


88
89
90
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 88

def buffer(distance)
  factory.unproject(projection.buffer(distance))
end

#buffer_with_style(distance, end_cap_style, join_style, mitre_limit) ⇒ Object


92
93
94
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 92

def buffer_with_style(distance, end_cap_style, join_style, mitre_limit)
  factory.unproject(projection.buffer_with_style(distance, end_cap_style, join_style, mitre_limit))
end

#contains?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

72
73
74
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 72

def contains?(rhs)
  projection.contains?(Feature.cast(rhs, factory).projection)
end

#convex_hullObject


104
105
106
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 104

def convex_hull
  factory.unproject(projection.convex_hull)
end

#crosses?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

64
65
66
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 64

def crosses?(rhs)
  projection.crosses?(Feature.cast(rhs, factory).projection)
end

#difference(rhs) ⇒ Object


116
117
118
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 116

def difference(rhs)
  factory.unproject(projection.difference(Feature.cast(rhs, factory).projection))
end

#disjoint?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

52
53
54
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 52

def disjoint?(rhs)
  projection.disjoint?(Feature.cast(rhs, factory).projection)
end

#distance(rhs) ⇒ Object


84
85
86
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 84

def distance(rhs)
  projection.distance(Feature.cast(rhs, factory).projection)
end

#empty?Boolean

Returns:

  • (Boolean)

25
26
27
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 25

def empty?
  projection.empty?
end

#envelopeObject


21
22
23
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 21

def envelope
  factory.unproject(projection.envelope)
end

#equals?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

48
49
50
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 48

def equals?(rhs)
  projection.equals?(Feature.cast(rhs, factory).projection)
end

#intersection(rhs) ⇒ Object


108
109
110
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 108

def intersection(rhs)
  factory.unproject(projection.intersection(Feature.cast(rhs, factory).projection))
end

#intersects?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

56
57
58
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 56

def intersects?(rhs)
  projection.intersects?(Feature.cast(rhs, factory).projection)
end

#is_empty?Boolean

Returns:

  • (Boolean)

29
30
31
32
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 29

def is_empty?
  warn "The is_empty? method is deprecated, please use the empty? counterpart, will be removed in v3" unless ENV["RGEO_SILENCE_DEPRECATION"]
  empty?
end

#is_simple?Boolean

Returns:

  • (Boolean)

38
39
40
41
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 38

def is_simple?
  warn "The is_simple? method is deprecated, please use the simple? counterpart, will be removed in v3" unless ENV["RGEO_SILENCE_DEPRECATION"]
  simple?
end

#overlaps?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

76
77
78
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 76

def overlaps?(rhs)
  projection.overlaps?(Feature.cast(rhs, factory).projection)
end

#point_on_surfaceObject


124
125
126
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 124

def point_on_surface
  factory.unproject(projection.point_on_surface)
end

#projectionObject


16
17
18
19
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 16

def projection
  @projection = factory.project(self) unless defined?(@projection)
  @projection
end

#relate(rhs, pattern_) ⇒ Object


80
81
82
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 80

def relate(rhs, pattern_)
  projection.relate(Feature.cast(rhs, factory).projection, pattern_)
end

#simple?Boolean

Returns:

  • (Boolean)

34
35
36
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 34

def simple?
  projection.simple?
end

#simplify(tolerance) ⇒ Object


96
97
98
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 96

def simplify(tolerance)
  factory.unproject(projection.simplify(tolerance))
end

#simplify_preserve_topology(tolerance) ⇒ Object


100
101
102
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 100

def simplify_preserve_topology(tolerance)
  factory.unproject(projection.simplify_preserve_topology(tolerance))
end

#sridObject


12
13
14
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 12

def srid
  factory.srid
end

#sym_difference(rhs) ⇒ Object


120
121
122
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 120

def sym_difference(rhs)
  factory.unproject(projection.sym_difference(Feature.cast(rhs, factory).projection))
end

#touches?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

60
61
62
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 60

def touches?(rhs)
  projection.touches?(Feature.cast(rhs, factory).projection)
end

#union(rhs) ⇒ Object


112
113
114
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 112

def union(rhs)
  factory.unproject(projection.union(Feature.cast(rhs, factory).projection))
end

#within?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

68
69
70
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 68

def within?(rhs)
  projection.within?(Feature.cast(rhs, factory).projection)
end