Module: RGeo::Geographic::ProjectedGeometryMethods
- Included in:
- ProjectedGeometryCollectionImpl, ProjectedLineImpl, ProjectedLineStringImpl, ProjectedLinearRingImpl, ProjectedMultiLineStringImpl, ProjectedMultiPointImpl, ProjectedMultiPolygonImpl, ProjectedPointImpl, ProjectedPolygonImpl
- Defined in:
- lib/rgeo/geographic/projected_feature_methods.rb
Overview
:nodoc:
Instance Method Summary collapse
- #boundary ⇒ Object
- #buffer(distance) ⇒ Object
- #buffer_with_style(distance, end_cap_style, join_style, mitre_limit) ⇒ Object
- #contains?(rhs) ⇒ Boolean
- #convex_hull ⇒ Object
- #coordinate_dimension ⇒ Object
- #crosses?(rhs) ⇒ Boolean
- #difference(rhs) ⇒ Object
- #disjoint?(rhs) ⇒ Boolean
- #distance(rhs) ⇒ Object
- #empty? ⇒ Boolean
- #envelope ⇒ Object
- #equals?(rhs) ⇒ Boolean
- #intersection(rhs) ⇒ Object
- #intersects?(rhs) ⇒ Boolean
- #invalid_reason ⇒ Object
- #is_3d? ⇒ Boolean
-
#make_valid ⇒ Object
Try and make the geometry valid, this may change its shape.
- #measured? ⇒ Boolean
- #overlaps?(rhs) ⇒ Boolean
- #point_on_surface ⇒ Object
- #projection ⇒ Object
- #relate(rhs, pattern_) ⇒ Object
- #simple? ⇒ Boolean
- #simplify(tolerance) ⇒ Object
- #simplify_preserve_topology(tolerance) ⇒ Object
- #spatial_dimension ⇒ Object
- #srid ⇒ Object
- #sym_difference(rhs) ⇒ Object
- #touches?(rhs) ⇒ Boolean
- #union(rhs) ⇒ Object
- #valid? ⇒ Boolean
- #within?(rhs) ⇒ Boolean
Instance Method Details
#boundary ⇒ Object
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
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_hull ⇒ Object
123 124 125 |
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 123 def convex_hull factory.unproject(projection.unsafe_convex_hull) end |
#coordinate_dimension ⇒ Object
25 26 27 |
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 25 def coordinate_dimension factory.coordinate_dimension end |
#crosses?(rhs) ⇒ 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
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
41 42 43 |
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 41 def empty? projection.empty? end |
#envelope ⇒ Object
21 22 23 |
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 21 def envelope factory.unproject(projection.unsafe_envelope) end |
#equals?(rhs) ⇒ 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
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_reason ⇒ Object
53 54 55 |
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 53 def invalid_reason projection.invalid_reason end |
#is_3d? ⇒ Boolean
33 34 35 |
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 33 def is_3d? factory.property(:has_z_coordinate) end |
#make_valid ⇒ Object
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
37 38 39 |
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 37 def measured? factory.property(:has_m_coordinate) end |
#overlaps?(rhs) ⇒ 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_surface ⇒ Object
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 |
#projection ⇒ Object
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
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_dimension ⇒ Object
29 30 31 |
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 29 def spatial_dimension factory.spatial_dimension end |
#srid ⇒ Object
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
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
49 50 51 |
# File 'lib/rgeo/geographic/projected_feature_methods.rb', line 49 def valid? projection.valid? end |