Module: RGeo::ImplHelper::ValidOp
- Included in:
- Cartesian::GeometryCollectionImpl, Cartesian::LineImpl, Cartesian::LineStringImpl, Cartesian::LinearRingImpl, Cartesian::MultiLineStringImpl, Cartesian::MultiPointImpl, Cartesian::MultiPolygonImpl, Cartesian::PointImpl, Cartesian::ValidOp, Geographic::SphericalGeometryCollectionImpl, Geographic::SphericalLineImpl, Geographic::SphericalLineStringImpl, Geographic::SphericalLinearRingImpl, Geographic::SphericalMultiLineStringImpl, Geographic::SphericalMultiPointImpl, Geographic::SphericalMultiPolygonImpl, Geographic::SphericalPointImpl, Geographic::SphericalPolygonImpl
- Defined in:
- lib/rgeo/impl_helper/valid_op.rb
Overview
Mixin based off of the JTS/GEOS IsValidOp class. Implements #valid? and #invalid_reason on Features that include this.
Instance Method Summary collapse
-
#invalid_reason ⇒ Object
Reason for invalidity or nil if valid.
-
#valid? ⇒ Boolean
Validity of geometry.
Instance Method Details
#invalid_reason ⇒ Object
Reason for invalidity or nil if valid
22 23 24 25 |
# File 'lib/rgeo/impl_helper/valid_op.rb', line 22 def invalid_reason return @invalid_reason if defined?(@invalid_reason) @invalid_reason = check_valid end |
#valid? ⇒ Boolean
Validity of geometry
15 16 17 |
# File 'lib/rgeo/impl_helper/valid_op.rb', line 15 def valid? invalid_reason.nil? end |