Module: RGeo::Geographic::ProjectedGeometryMethods

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#boundaryObject



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

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

#buffer(distance) ⇒ Object



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

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

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



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

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

#contains?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#convex_hullObject



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

def convex_hull
  factory.unproject(projection.unsafe_convex_hull)
end

#coordinate_dimensionObject



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

def coordinate_dimension
  factory.coordinate_dimension
end

#crosses?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#difference(rhs) ⇒ Object



135
136
137
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 135

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

#disjoint?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#distance(rhs) ⇒ Object



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

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

#empty?Boolean

Returns:

  • (Boolean)


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

def empty?
  projection.empty?
end

#envelopeObject



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

def envelope
  factory.unproject(projection.unsafe_envelope)
end

#equals?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#intersection(rhs) ⇒ Object



127
128
129
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 127

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

#intersects?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#invalid_reasonObject



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

def invalid_reason
  projection.invalid_reason
end

#is_3d?Boolean

Returns:

  • (Boolean)


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

def is_3d?
  factory.property(:has_z_coordinate)
end

#make_validObject

Try and make the geometry valid, this may change its shape. Returns a valid copy of the geometry.



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

def make_valid
  factory.unproject projection.make_valid
end

#measured?Boolean

Returns:

  • (Boolean)


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

def measured?
  factory.property(:has_m_coordinate)
end

#overlaps?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#point_on_surfaceObject



143
144
145
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 143

def point_on_surface
  factory.unproject(projection.unsafe_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



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

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

#simple?Boolean

Returns:

  • (Boolean)


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

def simple?
  projection.simple?
end

#simplify(tolerance) ⇒ Object



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

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

#simplify_preserve_topology(tolerance) ⇒ Object



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

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

#spatial_dimensionObject



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

def spatial_dimension
  factory.spatial_dimension
end

#sridObject



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

def srid
  factory.srid
end

#sym_difference(rhs) ⇒ Object



139
140
141
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 139

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

#touches?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#union(rhs) ⇒ Object



131
132
133
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 131

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

#valid?Boolean

Returns:

  • (Boolean)


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

def valid?
  projection.valid?
end

#within?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


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

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