Skip to content

Commit

Permalink
feat: remove Style/Documentation rubocop todos
Browse files Browse the repository at this point in the history
  • Loading branch information
thestelz committed Oct 18, 2022
1 parent 7794cff commit d6ad9fe
Show file tree
Hide file tree
Showing 38 changed files with 15 additions and 71 deletions.
4 changes: 0 additions & 4 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ Naming/VariableNumber:
- 'test/geos_capi/multi_polygon_test.rb'
- 'test/simple_cartesian/point_test.rb'

# Offense count: 60
Style/Documentation:
Enabled: false

# Offense count: 3
# Configuration parameters: AllowedVariables.
Style/GlobalVars:
Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/cartesian/analysis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module RGeo
module Cartesian
# This provides includes some spatial analysis algorithms supporting
# Cartesian data.

module Analysis
class << self
# Check orientation of a ring, returns `true` if it is counter-clockwise
Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/cartesian/bounding_box.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module Cartesian
# adding the geometries to it. You may then query it for the bounds,
# or use it to determine whether it encloses other geometries or
# bounding boxes.

class BoundingBox
# Returns the bounding box's factory.
attr_reader :factory
Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/cartesian/factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module RGeo
module Cartesian
# This class implements the factory for the simple cartesian
# implementation.

class Factory
include Feature::Factory::Instance
include ImplHelper::Utils
Expand Down
2 changes: 1 addition & 1 deletion lib/rgeo/cartesian/feature_classes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
require_relative "../impl_helper/validity_check"

module RGeo
module Cartesian
module Cartesian # :nodoc:
class PointImpl # :nodoc:
include Feature::Point
include ImplHelper::ValidityCheck
Expand Down
2 changes: 1 addition & 1 deletion lib/rgeo/cartesian/interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# -----------------------------------------------------------------------------

module RGeo
module Cartesian
module Cartesian # :nodoc:
class << self
# Creates and returns a cartesian factory of the preferred
# Cartesian implementation.
Expand Down
4 changes: 2 additions & 2 deletions lib/rgeo/cartesian/valid_op.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

module RGeo
module Cartesian
module ValidOp
module ValidOp # :nodoc:
include ImplHelper::ValidOp

def validity_helper
ValidOpHelpers
end
end

module ValidOpHelpers
module ValidOpHelpers # :nodoc:
include ImplHelper::ValidOpHelpers

module_function(*ImplHelper::ValidOpHelpers.singleton_methods) # rubocop:disable Style/AccessModifierDeclarations
Expand Down
23 changes: 0 additions & 23 deletions lib/rgeo/coord_sys/cs/entities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ module CS
# Coordinate Transformation spec.
#
# This is a non-instantiable abstract class.

class Base
# Standard object inspection output

Expand Down Expand Up @@ -242,7 +241,6 @@ def brackets(standard)
#
# Details of axis. This is used to label axes, and indicate the
# orientation.

class AxisInfo < Base
# :stopdoc:
NAMES_BY_VALUE = %w[OTHER NORTH SOUTH EAST WEST UP DOWN].freeze
Expand Down Expand Up @@ -298,7 +296,6 @@ def wkt_content(_)
# projected coordinate system. The angular units of parameter
# values match the angular units of the geographic coordinate
# system that the projected coordinate system is based on.

class ProjectionParameter < Base
def initialize(name, value) # :nodoc:
@name = name
Expand Down Expand Up @@ -336,7 +333,6 @@ def wkt_content(_)
# Wolf parameters should be applied to geocentric coordinates, where
# the X axis points towards the Greenwich Prime Meridian, the Y axis
# points East, and the Z axis points North.

class WGS84ConversionInfo < Base
def initialize(dxm, dym, dzm, exas, eyas, ezas, ppm) # :nodoc:
@dx = dxm.to_f
Expand Down Expand Up @@ -424,7 +420,6 @@ def create(dxm, dym, dzm, exas, eyas, ezas, ppm)
# * <b>alias</b>: an alias
# * <b>remarks</b>: provider-supplied remarks.
# * <b>extensions</b>: a hash of extension keys and values

class Info < Base
def initialize(name, authority = nil, authority_code = nil, abbreviation = nil, init_alias = nil, remarks = nil, extensions = nil) # :nodoc:
@name = name
Expand Down Expand Up @@ -485,7 +480,6 @@ def extension(key)
# Normally, you will instantiate one of the subclasses LinearUnit or
# AngularUnit. However, it is possible to instantiate Unit if it is
# not clear whether the data refers to a LinearUnit or AngularUnit.

class Unit < Info
def initialize(name, conversion_factor, *optional) # :nodoc:
super(name, *optional)
Expand Down Expand Up @@ -522,7 +516,6 @@ def wkt_content(_)
# == OGC spec description
#
# Definition of linear units.

class LinearUnit < Unit
# Returns the number of meters per LinearUnit.
# Also available as Unit#conversion_factor.
Expand All @@ -545,7 +538,6 @@ def create(name, meters_per_unit, *optional)
# == OGC spec description
#
# Definition of angular units.

class AngularUnit < Unit
# Returns the number of radians per AngularUnit.
# Also available as Unit#conversion_factor.
Expand All @@ -568,7 +560,6 @@ def create(name, radians_per_unit, *optional)
# == OGC spec description
#
# A meridian used to take longitude measurements from.

class PrimeMeridian < Info
def initialize(name, angular_unit, longitude, *optional) # :nodoc:
super(name, *optional)
Expand Down Expand Up @@ -608,7 +599,6 @@ def wkt_content(_)
# == OGC spec description
#
# An approximation of the Earth's surface as a squashed sphere.

class Ellipsoid < Info
def initialize(name, semi_major_axis, semi_minor_axis, inverse_flattening, ivf_definitive, linear_unit, *optional) # :nodoc:
super(name, *optional)
Expand Down Expand Up @@ -715,7 +705,6 @@ def wkt_content(_)
# This is a non-instantiable abstract class. You must instantiate
# one of the subclasses HorizontalDatum, VerticalDatum, or
# LocalDatum.

class Datum < Info
def initialize(name, datum_type, *optional) # :nodoc:
super(name, *optional)
Expand All @@ -735,7 +724,6 @@ def wkt_content(_)
# == OGC spec description
#
# Procedure used to measure vertical distances.

class VerticalDatum < Datum
def wkt_typename
"VERT_DATUM"
Expand Down Expand Up @@ -765,7 +753,6 @@ def wkt_content(_)
# coordinates can be transformed between two different local
# coordinate systems, as long as they are based on the same local
# datum.

class LocalDatum < Datum
def wkt_typename
"LOCAL_DATUM"
Expand All @@ -791,7 +778,6 @@ def wkt_content(_)
# == OGC spec description
#
# Procedure used to measure positions on the surface of the Earth.

class HorizontalDatum < Datum
def initialize(name, datum_type, ellipsoid, wgs84_parameters, *optional) # :nodoc:
super(name, datum_type, *optional)
Expand Down Expand Up @@ -834,7 +820,6 @@ def wkt_content(standard_brackets)
# == OGC spec description
#
# A projection from geographic coordinates to projected coordinates.

class Projection < Info
def initialize(name, class_name, parameters, *optional) # :nodoc:
super(name, *optional)
Expand Down Expand Up @@ -913,7 +898,6 @@ def wkt_content(_)
# GeographicCoordinateSystem, ProjectedCoordinateSystem,
# VerticalCoordinateSystem, LocalCoordinateSystem, or
# CompoundCoordinateSystem.

class CoordinateSystem < Info
def initialize(name, dimension, *optional) # :nodoc:
super(name, *optional)
Expand Down Expand Up @@ -990,7 +974,6 @@ def wkt_content(_)
# as a geographic or a projected coordinate system with a horizontal
# datum. The other is a vertical CRS which is a one-dimensional
# coordinate system with a vertical datum.

class CompoundCoordinateSystem < CoordinateSystem
def initialize(name, head, tail, *optional) # :nodoc:
super(name, head.dimension + tail.dimension, *optional)
Expand Down Expand Up @@ -1057,7 +1040,6 @@ def wkt_content(standard_brackets)
#
# RGeo's implementation does not provide the Coordinate
# Transformation (CT) package.

class LocalCoordinateSystem < CoordinateSystem
def initialize(name, local_datum, unit, axes, *optional) # :nodoc:
super(name, axes.size, *optional)
Expand Down Expand Up @@ -1114,7 +1096,6 @@ def wkt_content(standard_brackets)
# the Z axis will point North, and the Y axis will point East (e.g.
# a right handed system), but you should check the axes for
# non-default values.

class GeocentricCoordinateSystem < CoordinateSystem
def initialize(name, horizontal_datum, prime_meridian, linear_unit, axis0, axis1, axis2, *optional) # :nodoc:
super(name, 3, *optional)
Expand Down Expand Up @@ -1189,7 +1170,6 @@ def wkt_content(standard_brackets)
#
# A one-dimensional coordinate system suitable for vertical
# measurements.

class VerticalCoordinateSystem < CoordinateSystem
def initialize(name, vertical_datum, vertical_unit, axis, *optional) # :nodoc:
super(name, 1, *optional)
Expand Down Expand Up @@ -1250,7 +1230,6 @@ def wkt_content(standard_brackets)
# This is a non-instantiable abstract class. You must instantiate
# one of the subclasses GeographicCoordinateSystem or
# ProjectedCoordinateSystem.

class HorizontalCoordinateSystem < CoordinateSystem
def initialize(name, horizontal_datum, *optional) # :nodoc:
super(name, 2, *optional)
Expand All @@ -1268,7 +1247,6 @@ def initialize(name, horizontal_datum, *optional) # :nodoc:
# You can find out which this is by examining the axes. You should
# also check the angular units, since not all geographic coordinate
# systems use degrees.

class GeographicCoordinateSystem < HorizontalCoordinateSystem
def initialize(name, angular_unit, horizontal_datum, prime_meridian, axis0, axis1, *optional) # :nodoc:
super(name, horizontal_datum, *optional)
Expand Down Expand Up @@ -1350,7 +1328,6 @@ def wkt_content(standard_brackets)
# == OGC spec description
#
# A 2D cartographic coordinate system.

class ProjectedCoordinateSystem < HorizontalCoordinateSystem
def initialize(name, geographic_coordinate_system, projection, linear_unit, axis0, axis1, *optional) # :nodoc:
super(name, geographic_coordinate_system.horizontal_datum, *optional)
Expand Down
2 changes: 0 additions & 2 deletions lib/rgeo/coord_sys/cs/factories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module CoordSys
# * FittedCoordinateSystem is not implemented.
# * The defaultEnvelope attribute of CS_CoordinateSystem is not
# implemented.

module CS
# A class implementing the CS_CoordinateSystemFactory interface.
# It provides methods for building up complex objects from simpler
Expand All @@ -37,7 +36,6 @@ module CS
# Note that the methods of CS_CoordinateSystemFactory do not provide
# facilities for setting the authority. If you need to set authority
# values, use the create methods for the object classes themselves.

class CoordinateSystemFactory
# Create a CompoundCoordinateSystem from a name, and two
# constituent coordinate systems.
Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/feature/curve.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ module Feature
# class method (or === operator) defined in the Type module.
#
# Some implementations may support higher dimensional points.

module Curve
include Geometry
extend Type
Expand Down
2 changes: 0 additions & 2 deletions lib/rgeo/feature/factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ module Feature
# is provided. All factory implementation classes MUST include
# <tt>Factory::Instance</tt>, and you may use it in <tt>is_a?</tt>,
# <tt>===</tt>, and case-when constructs.

module Factory
# All factory implementations MUST include this submodule.
# This serves as a marker that may be used to test an object for
# factory-ness.

module Instance
end

Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/feature/factory_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ module Feature
# necessarily include this module itself. Therefore, you should not
# depend on the kind_of? method to determine if an object is a
# factory generator.

module FactoryGenerator
# Generate a factory given a configuration as a hash.
#
Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/feature/geometry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ module Feature
# Therefore, if an implementation cannot provide a suitable test for
# their equivalence types, they must degrade to use a stronger form
# of equivalence.

module Geometry
extend Type

Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/feature/geometry_collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module Feature
# include this module itself. Therefore, you should not depend on the
# kind_of? method to check type. Instead, use the provided check_type
# class method (or === operator) defined in the Type module.

module GeometryCollection
include Geometry
extend Type
Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/feature/line_string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module Feature
# include this module itself. Therefore, you should not depend on the
# kind_of? method to check type. Instead, use the provided check_type
# class method (or === operator) defined in the Type module.

module LineString
include Curve
extend Type
Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/feature/linear_ring.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module Feature
# include this module itself. Therefore, you should not depend on the
# kind_of? method to check type. Instead, use the provided check_type
# class method (or === operator) defined in the Type module.

module LinearRing
include LineString
extend Type
Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/feature/multi_curve.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ module Feature
# include this module itself. Therefore, you should not depend on the
# kind_of? method to check type. Instead, use the provided check_type
# class method (or === operator) defined in the Type module.

module MultiCurve
include GeometryCollection
extend Type
Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/feature/multi_surface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module Feature
# include this module itself. Therefore, you should not depend on the
# kind_of? method to check type. Instead, use the provided check_type
# class method (or === operator) defined in the Type module.

module MultiSurface
include GeometryCollection
extend Type
Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/feature/point.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ module Feature
# replace them with empty GeometryCollection objects. Therefore,
# currently, every RGeo Point object represents an actual location
# with real coordinates.

module Point
include Geometry
extend Type
Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/feature/polygon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ module Feature
# include this module itself. Therefore, you should not depend on the
# kind_of? method to check type. Instead, use the provided check_type
# class method (or === operator) defined in the Type module.

module Polygon
include Surface
extend Type
Expand Down
1 change: 0 additions & 1 deletion lib/rgeo/feature/surface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ module Feature
# class method (or === operator) defined in the Type module.
#
# Some implementations may support higher dimensional points.

module Surface
include Geometry
extend Type
Expand Down
4 changes: 1 addition & 3 deletions lib/rgeo/feature/types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
# -----------------------------------------------------------------------------

module RGeo
module Feature
module Feature # :nodoc:
# All geometry implementations MUST include this submodule.
# This serves as a marker that may be used to test an object for
# feature-ness.

module Instance
end

Expand Down Expand Up @@ -49,7 +48,6 @@ module Instance
# a particular object is a feature type:
#
# RGeo::Feature::Type === object.geometry_type # true

module Type
# Returns true if the given object is this type or a subtype
# thereof, or if it is a feature object whose geometry_type is
Expand Down
Loading

0 comments on commit d6ad9fe

Please sign in to comment.