Module: RGeo::Geographic::ProjectedGeometryMethods

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#boundaryObject


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

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

#buffer(distance) ⇒ Object


78
79
80
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 78

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

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


82
83
84
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 82

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)

62
63
64
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 62

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

#convex_hullObject


94
95
96
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 94

def convex_hull
  factory.unproject(projection.convex_hull)
end

#crosses?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

54
55
56
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 54

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

#difference(rhs) ⇒ Object


106
107
108
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 106

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

#disjoint?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

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

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

#distance(rhs) ⇒ Object


74
75
76
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 74

def distance(rhs)
  projection.distance(Feature.cast(rhs, factory).projection)
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)

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

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

#intersection(rhs) ⇒ Object


98
99
100
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 98

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

#intersects?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

46
47
48
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 46

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

#is_empty?Boolean

Returns:

  • (Boolean)

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

def is_empty?
  projection.is_empty?
end

#is_simple?Boolean

Returns:

  • (Boolean)

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

def is_simple?
  projection.is_simple?
end

#overlaps?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

66
67
68
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 66

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

#point_on_surfaceObject


114
115
116
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 114

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


70
71
72
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 70

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

#simplify(tolerance) ⇒ Object


86
87
88
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 86

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

#simplify_preserve_topology(tolerance) ⇒ Object


90
91
92
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 90

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


110
111
112
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 110

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

#touches?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

50
51
52
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 50

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

#union(rhs) ⇒ Object


102
103
104
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 102

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

#within?(rhs) ⇒ Boolean

Returns:

  • (Boolean)

58
59
60
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 58

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