konsultaner/jsonOdm

View on GitHub
src/geo.js

Summary

Maintainability
F
1 mo
Test Coverage

File geo.js has 976 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"use strict";

// for code climate recognition
if (typeof jsonOdm === "undefined") {
    var jsonOdm;
Severity: Major
Found in src/geo.js - About 2 days to fix

    Function within has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.MultiPoint.within = function (multiPoint, geometry) {
        var i, j, k, found;
        if (!multiPoint.coordinates || !jsonOdm.util.isArray(multiPoint.coordinates)) {
            return false;
        }
    Severity: Minor
    Found in src/geo.js - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function intersects has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.MultiPoint.intersects = function (multiPoint, geometry) {
        var i, j, k;
        if (!multiPoint.coordinates || !jsonOdm.util.isArray(multiPoint.coordinates)) {
            return false;
        }
    Severity: Minor
    Found in src/geo.js - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function within has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.MultiLineString.within = function (multiLineString, geometry) {
        var i, j, k, found;
        if (!multiLineString.coordinates || !jsonOdm.util.isArray(multiLineString.coordinates)) {
            return false;
        }
    Severity: Minor
    Found in src/geo.js - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function intersects has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.MultiLineString.intersects = function (multiLineString, geometry) {
        var i, j, k;
        if (!multiLineString.coordinates || !jsonOdm.util.isArray(multiLineString.coordinates)) {
            return false;
        }
    Severity: Minor
    Found in src/geo.js - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function within has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.MultiPolygon.within = function (multiPolygon, geometry) {
        var i, j, k, found;
        if (!multiPolygon.coordinates || !jsonOdm.util.isArray(multiPolygon.coordinates)) {
            return false;
        }
    Severity: Minor
    Found in src/geo.js - About 7 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function intersects has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.LineString.intersects = function (lineString, geometry) {
        var i, j;
        if (!lineString.coordinates || !jsonOdm.util.isArray(lineString.coordinates)) {
            return false;
        }
    Severity: Minor
    Found in src/geo.js - About 7 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function within has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.Point.within = function (point, geometry) {
        var i, j;
        if (!point.coordinates) {
            return false;
        }
    Severity: Minor
    Found in src/geo.js - About 6 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function within has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.LineString.within = function (lineString, geometry) {
        var i, j;
        if (!lineString.coordinates || !jsonOdm.util.isArray(lineString.coordinates)) {
            return false;
        }
    Severity: Minor
    Found in src/geo.js - About 5 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function intersects has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.MultiPolygon.intersects = function (multiPolygon, geometry) {
        var i, j, k;
        if (!multiPolygon.coordinates || !jsonOdm.util.isArray(multiPolygon.coordinates)) {
            return false;
        }
    Severity: Minor
    Found in src/geo.js - About 5 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function within has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.Polygon.within = function (polygon, geometry) {
        var i, j;
        if (!polygon.coordinates || !jsonOdm.util.isArray(polygon.coordinates)) {
            return false;
        }
    Severity: Minor
    Found in src/geo.js - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function intersects has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.Polygon.intersects = function (polygon, geometry) {
        var i, j;
        if (!polygon.coordinates || !jsonOdm.util.isArray(polygon.coordinates)) {
            return false;
        }
    Severity: Minor
    Found in src/geo.js - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function within has 82 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.MultiPoint.within = function (multiPoint, geometry) {
        var i, j, k, found;
        if (!multiPoint.coordinates || !jsonOdm.util.isArray(multiPoint.coordinates)) {
            return false;
        }
    Severity: Major
    Found in src/geo.js - About 3 hrs to fix

      Function within has 73 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      jsonOdm.Geo.MultiLineString.within = function (multiLineString, geometry) {
          var i, j, k, found;
          if (!multiLineString.coordinates || !jsonOdm.util.isArray(multiLineString.coordinates)) {
              return false;
          }
      Severity: Major
      Found in src/geo.js - About 2 hrs to fix

        Function lineStringWithinLineString has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
        Open

        jsonOdm.Geo.lineStringWithinLineString = function (lineString, inLineString) {
            if (!(jsonOdm.util.isArray(lineString) && jsonOdm.util.isArray(inLineString))) {
                return false;
            }
            var i, j;
        Severity: Minor
        Found in src/geo.js - About 2 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function intersects has 67 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        jsonOdm.Geo.MultiPoint.intersects = function (multiPoint, geometry) {
            var i, j, k;
            if (!multiPoint.coordinates || !jsonOdm.util.isArray(multiPoint.coordinates)) {
                return false;
            }
        Severity: Major
        Found in src/geo.js - About 2 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                  if (
                      // out of bounds check
                  (
                      (point[0] >= lineString[i][0] && point[0] <= lineString[i + 1][0] && lineString[i][0] <= lineString[i + 1][0]) ||
                      (point[0] <= lineString[i][0] && point[0] >= lineString[i + 1][0] && lineString[i][0] >= lineString[i + 1][0])
          Severity: Critical
          Found in src/geo.js - About 2 hrs to fix

            Function intersects has 63 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            jsonOdm.Geo.MultiLineString.intersects = function (multiLineString, geometry) {
                var i, j, k;
                if (!multiLineString.coordinates || !jsonOdm.util.isArray(multiLineString.coordinates)) {
                    return false;
                }
            Severity: Major
            Found in src/geo.js - About 2 hrs to fix

              Function intersects has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              jsonOdm.Geo.LineString.intersects = function (lineString, geometry) {
                  var i, j;
                  if (!lineString.coordinates || !jsonOdm.util.isArray(lineString.coordinates)) {
                      return false;
                  }
              Severity: Major
              Found in src/geo.js - About 2 hrs to fix

                Function pointWithinLineString has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                jsonOdm.Geo.pointWithinLineString = function (point, lineString) {
                    if (!(jsonOdm.util.isArray(point) && jsonOdm.util.isArray(lineString) && lineString.length >= 2)) {
                        return false;
                    }
                    for (var i = 0; i < lineString.length - 1; i++) {
                Severity: Minor
                Found in src/geo.js - About 2 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function within has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                jsonOdm.Geo.MultiPolygon.within = function (multiPolygon, geometry) {
                    var i, j, k, found;
                    if (!multiPolygon.coordinates || !jsonOdm.util.isArray(multiPolygon.coordinates)) {
                        return false;
                    }
                Severity: Major
                Found in src/geo.js - About 2 hrs to fix

                  Function within has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  jsonOdm.Geo.LineString.within = function (lineString, geometry) {
                      var i, j;
                      if (!lineString.coordinates || !jsonOdm.util.isArray(lineString.coordinates)) {
                          return false;
                      }
                  Severity: Minor
                  Found in src/geo.js - About 2 hrs to fix

                    Function intersects has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    jsonOdm.Geo.Polygon.intersects = function (polygon, geometry) {
                        var i, j;
                        if (!polygon.coordinates || !jsonOdm.util.isArray(polygon.coordinates)) {
                            return false;
                        }
                    Severity: Minor
                    Found in src/geo.js - About 1 hr to fix

                      Function pointWithinPolygon has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                      Open

                      jsonOdm.Geo.pointWithinPolygon = function (point, polygon) {
                          if (!(jsonOdm.util.isArray(point) && jsonOdm.util.isArray(polygon) && polygon.length > 2)) {
                              return false;
                          }
                      
                      
                      Severity: Minor
                      Found in src/geo.js - About 1 hr to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function intersects has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      jsonOdm.Geo.MultiPolygon.intersects = function (multiPolygon, geometry) {
                          var i, j, k;
                          if (!multiPolygon.coordinates || !jsonOdm.util.isArray(multiPolygon.coordinates)) {
                              return false;
                          }
                      Severity: Minor
                      Found in src/geo.js - About 1 hr to fix

                        Function within has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        jsonOdm.Geo.Point.within = function (point, geometry) {
                            var i, j;
                            if (!point.coordinates) {
                                return false;
                            }
                        Severity: Minor
                        Found in src/geo.js - About 1 hr to fix

                          Function within has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          jsonOdm.Geo.Polygon.within = function (polygon, geometry) {
                              var i, j;
                              if (!polygon.coordinates || !jsonOdm.util.isArray(polygon.coordinates)) {
                                  return false;
                              }
                          Severity: Minor
                          Found in src/geo.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                                    } else if (jsonOdm.util.isArray(geometry) && geometry.length >= 1 &&
                                        jsonOdm.util.isArray(geometry[0]) && geometry[0].length >= 1 &&
                                        jsonOdm.util.isArray(geometry[0][0]) && geometry[0][0].length >= 1 &&
                                        jsonOdm.util.isArray(geometry[0][0][0]) && geometry[0][0][0].length === 2 && !jsonOdm.util.isArray(geometry[0][0][0][0])) {
                                        geometry = new jsonOdm.Geo.MultiPolygon(geometry);
                            Severity: Critical
                            Found in src/geo.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                          if (
                                              (lineString[i][0] === point[0] && lineString[i][1] === point[1]) ||
                                              (lineString[i + 1][0] === point[0] && lineString[i + 1][1] === point[1]) ||
                              
                                              ((lineString[i][1] - lineString[i + 1][1]) != 0 && ((lineString[i][0] - lineString[i + 1][0]) * ((point[1] - lineString[i + 1][1]) / (lineString[i][1] - lineString[i + 1][1])) + lineString[i + 1][0] === point[0])) ||
                              Severity: Critical
                              Found in src/geo.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                    if (
                                        (bounds1[0] > bounds2[0] && bounds1[0] > bounds2[2]) || (bounds1[1] > bounds2[1] && bounds1[1] > bounds2[3]) ||
                                        (bounds2[0] > bounds1[0] && bounds2[0] > bounds1[2]) || (bounds2[1] > bounds1[1] && bounds2[1] > bounds1[3])
                                    ) {
                                        return false;
                                Severity: Critical
                                Found in src/geo.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                  if (
                                                      !(
                                                          // next is not the next one
                                                          (inLineString[j + 1] && lineString[i + 1][0] === inLineString[j + 1][0] && lineString[i + 1][1] === inLineString[j + 1][1]) ||
                                                          // next is not the same one
                                  Severity: Critical
                                  Found in src/geo.js - About 1 hr to fix

                                    Function lineStringWithinLineString has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    jsonOdm.Geo.lineStringWithinLineString = function (lineString, inLineString) {
                                        if (!(jsonOdm.util.isArray(lineString) && jsonOdm.util.isArray(inLineString))) {
                                            return false;
                                        }
                                        var i, j;
                                    Severity: Minor
                                    Found in src/geo.js - About 1 hr to fix

                                      Function detectAsGeometry has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      jsonOdm.Geo.detectAsGeometry = function (geometry) {
                                          if (!geometry.type) {
                                              if (jsonOdm.util.isArray(geometry) && geometry.length === 2 && !jsonOdm.util.isArray(geometry[0])) {
                                                  geometry = new jsonOdm.Geo.Point(geometry);
                                              } else if (jsonOdm.util.isArray(geometry) && geometry.length === 4 && !jsonOdm.util.isArray(geometry[0])) {
                                      Severity: Minor
                                      Found in src/geo.js - About 1 hr to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Function within has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      jsonOdm.Geo.GeometryCollection.within = function (geometryCollection, geometry) {
                                          if (!jsonOdm.util.isArray(geometryCollection.geometries) || !geometryCollection.geometries.length || !geometry.type) {
                                              return false;
                                          }
                                          for (var i = 0; i < geometryCollection.geometries.length; i++) {
                                      Severity: Minor
                                      Found in src/geo.js - About 1 hr to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Function edgeIntersectsEdge has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      jsonOdm.Geo.edgeIntersectsEdge = function (edge1, edge2, allowOnEdge) {
                                          allowOnEdge = typeof allowOnEdge === "undefined" ? true : allowOnEdge;
                                          var directionVector1 = [edge1[1][0] - edge1[0][0], edge1[1][1] - edge1[0][1]],
                                              bounds1 = [Math.min(edge1[0][0], edge1[1][0]), Math.min(edge1[0][1], edge1[1][1]), Math.max(edge1[0][0], edge1[1][0]), Math.max(edge1[0][1], edge1[1][1])],
                                              directionVector2 = [edge2[1][0] - edge2[0][0], edge2[1][1] - edge2[0][1]],
                                      Severity: Minor
                                      Found in src/geo.js - About 1 hr to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Function pointWithinPolygon has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      jsonOdm.Geo.pointWithinPolygon = function (point, polygon) {
                                          if (!(jsonOdm.util.isArray(point) && jsonOdm.util.isArray(polygon) && polygon.length > 2)) {
                                              return false;
                                          }
                                      
                                      
                                      Severity: Minor
                                      Found in src/geo.js - About 1 hr to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                } else if (jsonOdm.util.isArray(geometry) && geometry.length >= 1 &&
                                                    jsonOdm.util.isArray(geometry[0]) && geometry[0].length >= 1 &&
                                                    jsonOdm.util.isArray(geometry[0][0]) && geometry[0][0].length === 2 && !jsonOdm.util.isArray(geometry[0][0][0])) {
                                                    geometry = new jsonOdm.Geo.Polygon(geometry);
                                                } else if (jsonOdm.util.isArray(geometry) && geometry.length >= 1 &&
                                        Severity: Major
                                        Found in src/geo.js - About 1 hr to fix

                                          Function intersects has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          jsonOdm.Geo.GeometryCollection.intersects = function (geometryCollection, geometry) {
                                              if (!jsonOdm.util.isArray(geometryCollection.geometries) || !geometryCollection.geometries.length || !geometry.type) {
                                                  return false;
                                              }
                                              for (var i = 0; i < geometryCollection.geometries.length; i++) {
                                          Severity: Minor
                                          Found in src/geo.js - About 55 mins to fix

                                          Cognitive Complexity

                                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                          A method's cognitive complexity is based on a few simple rules:

                                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                          • Code is considered more complex for each "break in the linear flow of the code"
                                          • Code is considered more complex when "flow breaking structures are nested"

                                          Further reading

                                          Avoid deeply nested control flow statements.
                                          Open

                                                              if (jsonOdm.Geo.edgeIntersectsPolygon([multiLineString.coordinates[j][k], multiLineString.coordinates[j][k + 1]], geometry.coordinates[i][0])) {
                                                                  return true;
                                                              }
                                          Severity: Major
                                          Found in src/geo.js - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                if (!inside) {
                                                                    break;
                                                                }
                                            Severity: Major
                                            Found in src/geo.js - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                  if (jsonOdm.Geo.edgeIntersectsLineString([multiLineString.coordinates[j][k], multiLineString.coordinates[j][k + 1]], geometry.coordinates[i])) {
                                                                      return true;
                                                                  }
                                              Severity: Major
                                              Found in src/geo.js - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                    if (inside && k + 1 === multiPolygon.coordinates[i][0].length - 1) {
                                                                        found = true;
                                                                        break;
                                                                    }
                                                Severity: Major
                                                Found in src/geo.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                      if (jsonOdm.Geo.pointWithinPolygon(multiPolygon.coordinates[i][0][k], geometry.coordinates[j][0])) {
                                                                          return true;
                                                                      }
                                                  Severity: Major
                                                  Found in src/geo.js - About 45 mins to fix

                                                    Function edgeIntersectsPolygon has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                    jsonOdm.Geo.edgeIntersectsPolygon = function (edge, polygon) {
                                                        if (!(jsonOdm.util.isArray(edge) && edge.length === 2 && jsonOdm.util.isArray(polygon) && polygon.length >= 2)) {
                                                            return false;
                                                        }
                                                    
                                                    
                                                    Severity: Minor
                                                    Found in src/geo.js - About 45 mins to fix

                                                    Cognitive Complexity

                                                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                    A method's cognitive complexity is based on a few simple rules:

                                                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                    • Code is considered more complex for each "break in the linear flow of the code"
                                                    • Code is considered more complex when "flow breaking structures are nested"

                                                    Further reading

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                        if (jsonOdm.Geo.edgeWithinPolygon([multiLineString.coordinates[j][k], multiLineString.coordinates[j][k + 1]], geometry.coordinates[i][0]) && k + 1 === multiLineString.coordinates[j].length - 1) {
                                                                            found = true;
                                                                            break;
                                                                        }
                                                    Severity: Major
                                                    Found in src/geo.js - About 45 mins to fix

                                                      Consider simplifying this complex logical expression.
                                                      Open

                                                              if (
                                                                  polygon[i][0] < point[0] && polygon[i + 1][0] < point[0] || // the vector is only in section 1 or 4 of the coordinate system normalized to the point, so it does not intersect the positive x-axis
                                                                  polygon[i][1] < point[1] && polygon[i + 1][1] < point[1] || // the vector is only in section 1 or 2 of the coordinate system normalized to the point, so it does not intersect the positive x-axis
                                                                  polygon[i][1] > point[1] && polygon[i + 1][1] > point[1]    // the vector is only in section 3 or 4 of the coordinate system normalized to the point, so it does not intersect the positive x-axis
                                                              ) {
                                                      Severity: Major
                                                      Found in src/geo.js - About 40 mins to fix

                                                        Function edgeWithinPolygon has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                        Open

                                                        jsonOdm.Geo.edgeWithinPolygon = function (edge, polygon) {
                                                            if (!(jsonOdm.util.isArray(edge) && edge.length === 2 && jsonOdm.util.isArray(polygon) && polygon.length >= 2)) {
                                                                return false;
                                                            }
                                                        
                                                        
                                                        Severity: Minor
                                                        Found in src/geo.js - About 35 mins to fix

                                                        Cognitive Complexity

                                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                        A method's cognitive complexity is based on a few simple rules:

                                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                        • Code is considered more complex for each "break in the linear flow of the code"
                                                        • Code is considered more complex when "flow breaking structures are nested"

                                                        Further reading

                                                        Avoid too many return statements within this function.
                                                        Open

                                                                return true;
                                                        Severity: Major
                                                        Found in src/geo.js - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                                          return true;
                                                          Severity: Major
                                                          Found in src/geo.js - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                    return false;
                                                            Severity: Major
                                                            Found in src/geo.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                              return false;
                                                              Severity: Major
                                                              Found in src/geo.js - About 30 mins to fix

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                        return true;
                                                                Severity: Major
                                                                Found in src/geo.js - About 30 mins to fix

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                          return false;
                                                                  Severity: Major
                                                                  Found in src/geo.js - About 30 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                                    return false;
                                                                    Severity: Major
                                                                    Found in src/geo.js - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                          return false;
                                                                      Severity: Major
                                                                      Found in src/geo.js - About 30 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                                            return true;
                                                                        Severity: Major
                                                                        Found in src/geo.js - About 30 mins to fix

                                                                          Avoid too many return statements within this function.
                                                                          Open

                                                                                  return false;
                                                                          Severity: Major
                                                                          Found in src/geo.js - About 30 mins to fix

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                return false;
                                                                            Severity: Major
                                                                            Found in src/geo.js - About 30 mins to fix

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                              return true;
                                                                              Severity: Major
                                                                              Found in src/geo.js - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                                return true;
                                                                                Severity: Major
                                                                                Found in src/geo.js - About 30 mins to fix

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                                          return true;
                                                                                  Severity: Major
                                                                                  Found in src/geo.js - About 30 mins to fix

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

                                                                                            return true;
                                                                                    Severity: Major
                                                                                    Found in src/geo.js - About 30 mins to fix

                                                                                      Avoid too many return statements within this function.
                                                                                      Open

                                                                                              return false;
                                                                                      Severity: Major
                                                                                      Found in src/geo.js - About 30 mins to fix

                                                                                        Avoid too many return statements within this function.
                                                                                        Open

                                                                                                        return true;
                                                                                        Severity: Major
                                                                                        Found in src/geo.js - About 30 mins to fix

                                                                                          Avoid too many return statements within this function.
                                                                                          Open

                                                                                              return true;
                                                                                          Severity: Major
                                                                                          Found in src/geo.js - About 30 mins to fix

                                                                                            Avoid too many return statements within this function.
                                                                                            Open

                                                                                                    return false;
                                                                                            Severity: Major
                                                                                            Found in src/geo.js - About 30 mins to fix

                                                                                              Avoid too many return statements within this function.
                                                                                              Open

                                                                                                      return false;
                                                                                              Severity: Major
                                                                                              Found in src/geo.js - About 30 mins to fix

                                                                                                Avoid too many return statements within this function.
                                                                                                Open

                                                                                                    return true;
                                                                                                Severity: Major
                                                                                                Found in src/geo.js - About 30 mins to fix

                                                                                                  Avoid too many return statements within this function.
                                                                                                  Open

                                                                                                                      return true;
                                                                                                  Severity: Major
                                                                                                  Found in src/geo.js - About 30 mins to fix

                                                                                                    Avoid too many return statements within this function.
                                                                                                    Open

                                                                                                            return false;
                                                                                                    Severity: Major
                                                                                                    Found in src/geo.js - About 30 mins to fix

                                                                                                      Avoid too many return statements within this function.
                                                                                                      Open

                                                                                                                      return true;
                                                                                                      Severity: Major
                                                                                                      Found in src/geo.js - About 30 mins to fix

                                                                                                        Avoid too many return statements within this function.
                                                                                                        Open

                                                                                                                        return false;
                                                                                                        Severity: Major
                                                                                                        Found in src/geo.js - About 30 mins to fix

                                                                                                          Avoid too many return statements within this function.
                                                                                                          Open

                                                                                                                  return true;
                                                                                                          Severity: Major
                                                                                                          Found in src/geo.js - About 30 mins to fix

                                                                                                            Avoid too many return statements within this function.
                                                                                                            Open

                                                                                                                    return false;
                                                                                                            Severity: Major
                                                                                                            Found in src/geo.js - About 30 mins to fix

                                                                                                              Avoid too many return statements within this function.
                                                                                                              Open

                                                                                                                      return false;
                                                                                                              Severity: Major
                                                                                                              Found in src/geo.js - About 30 mins to fix

                                                                                                                Avoid too many return statements within this function.
                                                                                                                Open

                                                                                                                                return true;
                                                                                                                Severity: Major
                                                                                                                Found in src/geo.js - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this function.
                                                                                                                  Open

                                                                                                                          return true;
                                                                                                                  Severity: Major
                                                                                                                  Found in src/geo.js - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this function.
                                                                                                                    Open

                                                                                                                        return jsonOdm.Geo.pointWithinBounds(point.coordinates, geometry);
                                                                                                                    Severity: Major
                                                                                                                    Found in src/geo.js - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this function.
                                                                                                                      Open

                                                                                                                              return true;
                                                                                                                      Severity: Major
                                                                                                                      Found in src/geo.js - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this function.
                                                                                                                        Open

                                                                                                                                            return true;
                                                                                                                        Severity: Major
                                                                                                                        Found in src/geo.js - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this function.
                                                                                                                          Open

                                                                                                                                  return false;
                                                                                                                          Severity: Major
                                                                                                                          Found in src/geo.js - About 30 mins to fix

                                                                                                                            Avoid too many return statements within this function.
                                                                                                                            Open

                                                                                                                                            return false;
                                                                                                                            Severity: Major
                                                                                                                            Found in src/geo.js - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this function.
                                                                                                                              Open

                                                                                                                                                  return true;
                                                                                                                              Severity: Major
                                                                                                                              Found in src/geo.js - About 30 mins to fix

                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                Open

                                                                                                                                        return false;
                                                                                                                                Severity: Major
                                                                                                                                Found in src/geo.js - About 30 mins to fix

                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                  Open

                                                                                                                                                  return true;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in src/geo.js - About 30 mins to fix

                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                    Open

                                                                                                                                                        return true;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in src/geo.js - About 30 mins to fix

                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                      Open

                                                                                                                                              return false;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in src/geo.js - About 30 mins to fix

                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                        Open

                                                                                                                                                        return true;
                                                                                                                                        Severity: Major
                                                                                                                                        Found in src/geo.js - About 30 mins to fix

                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                          Open

                                                                                                                                                          return false;
                                                                                                                                          Severity: Major
                                                                                                                                          Found in src/geo.js - About 30 mins to fix

                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                            Open

                                                                                                                                                    return false;
                                                                                                                                            Severity: Major
                                                                                                                                            Found in src/geo.js - About 30 mins to fix

                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                              Open

                                                                                                                                                      return false;
                                                                                                                                              Severity: Major
                                                                                                                                              Found in src/geo.js - About 30 mins to fix

                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                Open

                                                                                                                                                                    return true;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in src/geo.js - About 30 mins to fix

                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                  Open

                                                                                                                                                      return false;
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in src/geo.js - About 30 mins to fix

                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                    Open

                                                                                                                                                                            return true;
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in src/geo.js - About 30 mins to fix

                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                      Open

                                                                                                                                                                  return false;
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in src/geo.js - About 30 mins to fix

                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                        Open

                                                                                                                                                                return false;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in src/geo.js - About 30 mins to fix

                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                          Open

                                                                                                                                                                  return false;
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in src/geo.js - About 30 mins to fix

                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                            Open

                                                                                                                                                                                return true;
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in src/geo.js - About 30 mins to fix

                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                              Open

                                                                                                                                                                              return true;
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                Open

                                                                                                                                                                        return false;
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                  Open

                                                                                                                                                                              return false;
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                    Open

                                                                                                                                                                                return true;
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                      Open

                                                                                                                                                                                          return false;
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                        Open

                                                                                                                                                                                        return false;
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                          Open

                                                                                                                                                                                  return jsonOdm.Geo.MultiLineString.intersects(geometry, polygon);
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                            Open

                                                                                                                                                                                            return true;
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                              Open

                                                                                                                                                                                      return false;
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                Open

                                                                                                                                                                                        return false;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                  Open

                                                                                                                                                                                                  return false;
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                    Open

                                                                                                                                                                                                        return true;
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                                      Open

                                                                                                                                                                                                      return true;
                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                      Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                                        Open

                                                                                                                                                                                                return false;
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                          Open

                                                                                                                                                                                                  return true;
                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                          Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                            Open

                                                                                                                                                                                                            return false;
                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                            Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                              Open

                                                                                                                                                                                                  return true;
                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                              Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                Open

                                                                                                                                                                                                            return true;
                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                  Open

                                                                                                                                                                                                                  return true;
                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                  Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                                    Open

                                                                                                                                                                                                            return false;
                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                    Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              return false;
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                                                        Open

                                                                                                                                                                                                                return jsonOdm.Geo.pointWithinPolygon(point.coordinates, geometry.coordinates ? geometry.coordinates[0] : null);
                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                        Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                          Open

                                                                                                                                                                                                                          return true;
                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                          Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                            Open

                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                            Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                                              Open

                                                                                                                                                                                                                      return false;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                                Open

                                                                                                                                                                                                                        return false;
                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                              return false;
                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                  Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                        return true;
                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                    Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                              return false;
                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                      Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                return false;
                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                        Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                              return true;
                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                          Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                    return false;
                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                            Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                              return true;
                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                              Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                  return true;
                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                  Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                            return true;
                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                    Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                      return false;
                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                      Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                return false;
                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                        Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                              return false;
                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                          Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                    return false;
                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                            Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                          return true;
                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                              Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                return true;
                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                  return true;
                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                  Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                        return true;
                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                    Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                          return false;
                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                      Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                        return true;
                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                        Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                          return false;
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                    return jsonOdm.Geo.Polygon.intersects(geometry, multiPolygon);
                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                            Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                      return true;
                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                              Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                        return false;
                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                          return jsonOdm.Geo.MultiLineString.intersects(geometry, multiPolygon);
                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                  Found in src/geo.js - About 30 mins to fix

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "MultiLineString") {
                                                                                                                                                                                                                                                                            for (j = 0; multiLineString.coordinates && j < multiLineString.coordinates.length; j++) {
                                                                                                                                                                                                                                                                                found = false;
                                                                                                                                                                                                                                                                                for (i = 0; geometry.coordinates && i < geometry.coordinates.length; i++) {
                                                                                                                                                                                                                                                                                    if (jsonOdm.Geo.lineStringWithinLineString(multiLineString.coordinates[j], geometry.coordinates[i])) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 267..281

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 155.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "MultiLineString") {
                                                                                                                                                                                                                                                                            for (k = 0; multiPoint.coordinates && k < multiPoint.coordinates.length; k++) {
                                                                                                                                                                                                                                                                                found = false;
                                                                                                                                                                                                                                                                                for (i = 0; geometry.coordinates && i < geometry.coordinates.length; i++) {
                                                                                                                                                                                                                                                                                    if (jsonOdm.Geo.pointWithinLineString(multiPoint.coordinates[k], geometry.coordinates[i])) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 598..612

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 155.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                (point[0] >= lineString[i][0] && point[0] <= lineString[i + 1][0] && lineString[i][0] <= lineString[i + 1][0]) ||
                                                                                                                                                                                                                                                                                (point[0] <= lineString[i][0] && point[0] >= lineString[i + 1][0] && lineString[i][0] >= lineString[i + 1][0])
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1253..1254

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 141.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                (point[1] >= lineString[i][1] && point[1] <= lineString[i + 1][1] && lineString[i][1] <= lineString[i + 1][1]) ||
                                                                                                                                                                                                                                                                                (point[1] <= lineString[i][1] && point[1] >= lineString[i + 1][1] && lineString[i][1] >= lineString[i + 1][1])
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1249..1250

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 141.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                    (lineString[i][0] === point[0] && lineString[i][1] === point[1]) ||
                                                                                                                                                                                                                                                                                    (lineString[i + 1][0] === point[0] && lineString[i + 1][1] === point[1]) ||
                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                    ((lineString[i][1] - lineString[i + 1][1]) != 0 && ((lineString[i][0] - lineString[i + 1][0]) * ((point[1] - lineString[i + 1][1]) / (lineString[i][1] - lineString[i + 1][1])) + lineString[i + 1][0] === point[0])) ||
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 4 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1259..1263

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 134.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            bounds1 = [Math.min(edge1[0][0], edge1[1][0]), Math.min(edge1[0][1], edge1[1][1]), Math.max(edge1[0][0], edge1[1][0]), Math.max(edge1[0][1], edge1[1][1])],
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1210..1210

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 110.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            bounds2 = [Math.min(edge2[0][0], edge2[1][0]), Math.min(edge2[0][1], edge2[1][1]), Math.max(edge2[0][0], edge2[1][0]), Math.max(edge2[0][1], edge2[1][1])]
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1208..1208

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 110.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 8 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "GeometryCollection" && jsonOdm.util.isArray(geometry.geometries)) {
                                                                                                                                                                                                                                                                            // maybe order it by complexity to get a better best case scenario
                                                                                                                                                                                                                                                                            for (i = 0; i < geometry.geometries.length; i++) {
                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.Point.within(point, geometry.geometries[i])) {
                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 7 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 307..315
                                                                                                                                                                                                                                                                    src/geo.js on lines 465..473
                                                                                                                                                                                                                                                                    src/geo.js on lines 538..546
                                                                                                                                                                                                                                                                    src/geo.js on lines 640..648
                                                                                                                                                                                                                                                                    src/geo.js on lines 714..722
                                                                                                                                                                                                                                                                    src/geo.js on lines 793..801
                                                                                                                                                                                                                                                                    src/geo.js on lines 853..861

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 106.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 8 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "GeometryCollection" && jsonOdm.util.isArray(geometry.geometries)) {
                                                                                                                                                                                                                                                                            // maybe order it by complexity to get a better best case scenario
                                                                                                                                                                                                                                                                            for (i = 0; i < geometry.geometries.length; i++) {
                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.LineString.intersects(lineString, geometry.geometries[i])) {
                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 7 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 188..196
                                                                                                                                                                                                                                                                    src/geo.js on lines 307..315
                                                                                                                                                                                                                                                                    src/geo.js on lines 465..473
                                                                                                                                                                                                                                                                    src/geo.js on lines 640..648
                                                                                                                                                                                                                                                                    src/geo.js on lines 714..722
                                                                                                                                                                                                                                                                    src/geo.js on lines 793..801
                                                                                                                                                                                                                                                                    src/geo.js on lines 853..861

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 106.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 8 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "GeometryCollection" && jsonOdm.util.isArray(geometry.geometries)) {
                                                                                                                                                                                                                                                                            // maybe order it by complexity to get a better best case scenario
                                                                                                                                                                                                                                                                            for (i = 0; i < geometry.geometries.length; i++) {
                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.MultiLineString.intersects(multiLineString, geometry.geometries[i])) {
                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 7 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 188..196
                                                                                                                                                                                                                                                                    src/geo.js on lines 307..315
                                                                                                                                                                                                                                                                    src/geo.js on lines 465..473
                                                                                                                                                                                                                                                                    src/geo.js on lines 538..546
                                                                                                                                                                                                                                                                    src/geo.js on lines 640..648
                                                                                                                                                                                                                                                                    src/geo.js on lines 793..801
                                                                                                                                                                                                                                                                    src/geo.js on lines 853..861

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 106.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            } else if (jsonOdm.util.isArray(geometry) && geometry.length >= 1 &&
                                                                                                                                                                                                                                                                                jsonOdm.util.isArray(geometry[0]) && geometry[0].length >= 1 &&
                                                                                                                                                                                                                                                                                jsonOdm.util.isArray(geometry[0][0]) && geometry[0][0].length === 2 && !jsonOdm.util.isArray(geometry[0][0][0])) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 41..44

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 106.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 8 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "GeometryCollection" && jsonOdm.util.isArray(geometry.geometries)) {
                                                                                                                                                                                                                                                                            // maybe order it by complexity to get a better best case scenario
                                                                                                                                                                                                                                                                            for (i = 0; i < geometry.geometries.length; i++) {
                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.LineString.within(lineString, geometry.geometries[i])) {
                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 7 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 188..196
                                                                                                                                                                                                                                                                    src/geo.js on lines 307..315
                                                                                                                                                                                                                                                                    src/geo.js on lines 538..546
                                                                                                                                                                                                                                                                    src/geo.js on lines 640..648
                                                                                                                                                                                                                                                                    src/geo.js on lines 714..722
                                                                                                                                                                                                                                                                    src/geo.js on lines 793..801
                                                                                                                                                                                                                                                                    src/geo.js on lines 853..861

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 106.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 8 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "GeometryCollection" && jsonOdm.util.isArray(geometry.geometries)) {
                                                                                                                                                                                                                                                                            // maybe order it by complexity to get a better best case scenario
                                                                                                                                                                                                                                                                            for (i = 0; i < geometry.geometries.length; i++) {
                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.Polygon.within(polygon, geometry.geometries[i])) {
                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 7 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 188..196
                                                                                                                                                                                                                                                                    src/geo.js on lines 307..315
                                                                                                                                                                                                                                                                    src/geo.js on lines 465..473
                                                                                                                                                                                                                                                                    src/geo.js on lines 538..546
                                                                                                                                                                                                                                                                    src/geo.js on lines 640..648
                                                                                                                                                                                                                                                                    src/geo.js on lines 714..722
                                                                                                                                                                                                                                                                    src/geo.js on lines 853..861

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 106.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 8 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "GeometryCollection" && jsonOdm.util.isArray(geometry.geometries)) {
                                                                                                                                                                                                                                                                            // maybe order it by complexity to get a better best case scenario
                                                                                                                                                                                                                                                                            for (i = 0; i < geometry.geometries.length; i++) {
                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.Polygon.intersects(polygon, geometry.geometries[i])) {
                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 7 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 188..196
                                                                                                                                                                                                                                                                    src/geo.js on lines 307..315
                                                                                                                                                                                                                                                                    src/geo.js on lines 465..473
                                                                                                                                                                                                                                                                    src/geo.js on lines 538..546
                                                                                                                                                                                                                                                                    src/geo.js on lines 640..648
                                                                                                                                                                                                                                                                    src/geo.js on lines 714..722
                                                                                                                                                                                                                                                                    src/geo.js on lines 793..801

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 106.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 8 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "GeometryCollection" && jsonOdm.util.isArray(geometry.geometries)) {
                                                                                                                                                                                                                                                                            // maybe order it by complexity to get a better best case scenario
                                                                                                                                                                                                                                                                            for (i = 0; i < geometry.geometries.length; i++) {
                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.MultiPoint.within(multiPoint, geometry.geometries[i])) {
                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 7 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 188..196
                                                                                                                                                                                                                                                                    src/geo.js on lines 465..473
                                                                                                                                                                                                                                                                    src/geo.js on lines 538..546
                                                                                                                                                                                                                                                                    src/geo.js on lines 640..648
                                                                                                                                                                                                                                                                    src/geo.js on lines 714..722
                                                                                                                                                                                                                                                                    src/geo.js on lines 793..801
                                                                                                                                                                                                                                                                    src/geo.js on lines 853..861

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 106.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            } else if (jsonOdm.util.isArray(geometry) && geometry.length >= 1 &&
                                                                                                                                                                                                                                                                                jsonOdm.util.isArray(geometry[0]) && geometry[0].length >= 1 &&
                                                                                                                                                                                                                                                                                jsonOdm.util.isArray(geometry[0][0]) && geometry[0][0].length >= 1 &&
                                                                                                                                                                                                                                                                                jsonOdm.util.isArray(geometry[0][0][0]) && geometry[0][0][0].length === 2 && !jsonOdm.util.isArray(geometry[0][0][0][0])) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 37..39

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 106.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 8 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "GeometryCollection" && jsonOdm.util.isArray(geometry.geometries)) {
                                                                                                                                                                                                                                                                            // maybe order it by complexity to get a better best case scenario
                                                                                                                                                                                                                                                                            for (i = 0; i < geometry.geometries.length; i++) {
                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.MultiLineString.within(multiLineString, geometry.geometries[i])) {
                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 7 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 188..196
                                                                                                                                                                                                                                                                    src/geo.js on lines 307..315
                                                                                                                                                                                                                                                                    src/geo.js on lines 465..473
                                                                                                                                                                                                                                                                    src/geo.js on lines 538..546
                                                                                                                                                                                                                                                                    src/geo.js on lines 714..722
                                                                                                                                                                                                                                                                    src/geo.js on lines 793..801
                                                                                                                                                                                                                                                                    src/geo.js on lines 853..861

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 106.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "GeometryCollection" && jsonOdm.util.isArray(geometry.geometries)) {
                                                                                                                                                                                                                                                                            for (i = 0; i < geometry.geometries.length; i++) {
                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.MultiPoint.intersects(multiPoint, geometry.geometries[i])) {
                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 2 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 942..949
                                                                                                                                                                                                                                                                    src/geo.js on lines 1000..1007

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 104.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "GeometryCollection" && jsonOdm.util.isArray(geometry.geometries)) {
                                                                                                                                                                                                                                                                            for (i = 0; i < geometry.geometries.length; i++) {
                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.MultiPolygon.intersects(multiPolygon, geometry.geometries[i])) {
                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 2 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 386..393
                                                                                                                                                                                                                                                                    src/geo.js on lines 942..949

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 104.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "GeometryCollection" && jsonOdm.util.isArray(geometry.geometries)) {
                                                                                                                                                                                                                                                                            for (i = 0; i < geometry.geometries.length; i++) {
                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.MultiPolygon.within(multiPolygon, geometry.geometries[i])) {
                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 2 other locations - About 3 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 386..393
                                                                                                                                                                                                                                                                    src/geo.js on lines 1000..1007

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 104.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            (x > bounds1[0] && x < bounds1[2] && y > bounds1[1] && y < bounds1[3] && x > bounds2[0] && x < bounds2[2] && y > bounds2[1] && y < bounds2[3]);
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1231..1231

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 93.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            (x >= bounds1[0] && x <= bounds1[2] && y >= bounds1[1] && y <= bounds1[3] && x >= bounds2[0] && x <= bounds2[2] && y >= bounds2[1] && y <= bounds2[3]) :
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1232..1232

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 93.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "LineString") {
                                                                                                                                                                                                                                                                            for (k = 0; multiPoint.coordinates && k < multiPoint.coordinates.length; k++) {
                                                                                                                                                                                                                                                                                if (!jsonOdm.Geo.pointWithinLineString(multiPoint.coordinates[k], geometry.coordinates)) {
                                                                                                                                                                                                                                                                                    return false;
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 590..597

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 92.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (!(polygon[0][0] === polygon[polygon.length - 1][0] && polygon[0][1] === polygon[polygon.length - 1][1])) {
                                                                                                                                                                                                                                                                            polygon = polygon.concat([polygon[0]]);
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1164..1166

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 92.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "LineString") {
                                                                                                                                                                                                                                                                            for (i = 0; multiLineString.coordinates && i < multiLineString.coordinates.length; i++) {
                                                                                                                                                                                                                                                                                if (!jsonOdm.Geo.lineStringWithinLineString(multiLineString.coordinates[i], geometry.coordinates)) {
                                                                                                                                                                                                                                                                                    return false;
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 259..266

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 92.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (!(polygon[0][0] === polygon[polygon.length - 1][0] && polygon[0][1] === polygon[polygon.length - 1][1])) {
                                                                                                                                                                                                                                                                            polygon = polygon.concat([polygon[0]]);
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1136..1138

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 92.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    jsonOdm.Geo.LineString = function (positions, boundaryBox) {
                                                                                                                                                                                                                                                                        this.type = "LineString";
                                                                                                                                                                                                                                                                        this.coordinates = positions;
                                                                                                                                                                                                                                                                        if (boundaryBox) {
                                                                                                                                                                                                                                                                            this.bbox = boundaryBox;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 6 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 135..141
                                                                                                                                                                                                                                                                    src/geo.js on lines 222..228
                                                                                                                                                                                                                                                                    src/geo.js on lines 567..573
                                                                                                                                                                                                                                                                    src/geo.js on lines 748..754
                                                                                                                                                                                                                                                                    src/geo.js on lines 888..894
                                                                                                                                                                                                                                                                    src/geo.js on lines 1031..1037

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 66.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    jsonOdm.Geo.Polygon = function (positions, boundaryBox) {
                                                                                                                                                                                                                                                                        this.type = "Polygon";
                                                                                                                                                                                                                                                                        this.coordinates = positions;
                                                                                                                                                                                                                                                                        if (boundaryBox) {
                                                                                                                                                                                                                                                                            this.bbox = boundaryBox;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 6 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 135..141
                                                                                                                                                                                                                                                                    src/geo.js on lines 222..228
                                                                                                                                                                                                                                                                    src/geo.js on lines 413..419
                                                                                                                                                                                                                                                                    src/geo.js on lines 567..573
                                                                                                                                                                                                                                                                    src/geo.js on lines 888..894
                                                                                                                                                                                                                                                                    src/geo.js on lines 1031..1037

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 66.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    jsonOdm.Geo.Point = function (position, boundaryBox) {
                                                                                                                                                                                                                                                                        this.type = "Point";
                                                                                                                                                                                                                                                                        this.coordinates = position;
                                                                                                                                                                                                                                                                        if (boundaryBox) {
                                                                                                                                                                                                                                                                            this.bbox = boundaryBox;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 6 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 222..228
                                                                                                                                                                                                                                                                    src/geo.js on lines 413..419
                                                                                                                                                                                                                                                                    src/geo.js on lines 567..573
                                                                                                                                                                                                                                                                    src/geo.js on lines 748..754
                                                                                                                                                                                                                                                                    src/geo.js on lines 888..894
                                                                                                                                                                                                                                                                    src/geo.js on lines 1031..1037

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 66.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    jsonOdm.Geo.MultiPolygon = function (positions, boundaryBox) {
                                                                                                                                                                                                                                                                        this.type = "MultiPolygon";
                                                                                                                                                                                                                                                                        this.coordinates = positions;
                                                                                                                                                                                                                                                                        if (boundaryBox) {
                                                                                                                                                                                                                                                                            this.bbox = boundaryBox;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 6 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 135..141
                                                                                                                                                                                                                                                                    src/geo.js on lines 222..228
                                                                                                                                                                                                                                                                    src/geo.js on lines 413..419
                                                                                                                                                                                                                                                                    src/geo.js on lines 567..573
                                                                                                                                                                                                                                                                    src/geo.js on lines 748..754
                                                                                                                                                                                                                                                                    src/geo.js on lines 1031..1037

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 66.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    jsonOdm.Geo.MultiPoint = function (positions, boundaryBox) {
                                                                                                                                                                                                                                                                        this.type = "MultiPoint";
                                                                                                                                                                                                                                                                        this.coordinates = positions;
                                                                                                                                                                                                                                                                        if (boundaryBox) {
                                                                                                                                                                                                                                                                            this.bbox = boundaryBox;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 6 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 135..141
                                                                                                                                                                                                                                                                    src/geo.js on lines 413..419
                                                                                                                                                                                                                                                                    src/geo.js on lines 567..573
                                                                                                                                                                                                                                                                    src/geo.js on lines 748..754
                                                                                                                                                                                                                                                                    src/geo.js on lines 888..894
                                                                                                                                                                                                                                                                    src/geo.js on lines 1031..1037

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 66.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    jsonOdm.Geo.MultiLineString = function (positions, boundaryBox) {
                                                                                                                                                                                                                                                                        this.type = "MultiLineString";
                                                                                                                                                                                                                                                                        this.coordinates = positions;
                                                                                                                                                                                                                                                                        if (boundaryBox) {
                                                                                                                                                                                                                                                                            this.bbox = boundaryBox;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 6 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 135..141
                                                                                                                                                                                                                                                                    src/geo.js on lines 222..228
                                                                                                                                                                                                                                                                    src/geo.js on lines 413..419
                                                                                                                                                                                                                                                                    src/geo.js on lines 748..754
                                                                                                                                                                                                                                                                    src/geo.js on lines 888..894
                                                                                                                                                                                                                                                                    src/geo.js on lines 1031..1037

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 66.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 7 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    jsonOdm.Geo.GeometryCollection = function (geometries, boundaryBox) {
                                                                                                                                                                                                                                                                        this.type = "GeometryCollection";
                                                                                                                                                                                                                                                                        this.geometries = geometries;
                                                                                                                                                                                                                                                                        if (boundaryBox) {
                                                                                                                                                                                                                                                                            this.bbox = boundaryBox;
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 6 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 135..141
                                                                                                                                                                                                                                                                    src/geo.js on lines 222..228
                                                                                                                                                                                                                                                                    src/geo.js on lines 413..419
                                                                                                                                                                                                                                                                    src/geo.js on lines 567..573
                                                                                                                                                                                                                                                                    src/geo.js on lines 748..754
                                                                                                                                                                                                                                                                    src/geo.js on lines 888..894

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 66.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (!(jsonOdm.util.isArray(edge) && edge.length === 2 && jsonOdm.util.isArray(polygon) && polygon.length >= 2)) {
                                                                                                                                                                                                                                                                            return false;
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1159..1161

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 66.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (!(jsonOdm.util.isArray(edge) && edge.length === 2 && jsonOdm.util.isArray(polygon) && polygon.length >= 2)) {
                                                                                                                                                                                                                                                                            return false;
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1131..1133

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 66.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        for (i = 0; i < multiPoint.coordinates.length; i++) {
                                                                                                                                                                                                                                                                            if (!jsonOdm.Geo.pointWithinBounds(multiPoint.coordinates[i], geometry)) {
                                                                                                                                                                                                                                                                                return false;
                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 475..479

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 64.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        for (i = 0; i < lineString.coordinates.length; i++) {
                                                                                                                                                                                                                                                                            if (!jsonOdm.Geo.pointWithinBounds(lineString.coordinates[i], geometry)) {
                                                                                                                                                                                                                                                                                return false;
                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 317..321

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 64.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                    if (geometry.coordinates[i][0] === multiPoint.coordinates[j][0] && geometry.coordinates[i][1] === multiPoint.coordinates[j][1]) {
                                                                                                                                                                                                                                                                                        return true;
                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 248..251

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 62.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                    if (geometry.coordinates[i][0] === multiPoint.coordinates[j][0] && geometry.coordinates[i][1] === multiPoint.coordinates[j][1]) {
                                                                                                                                                                                                                                                                                        found = true;
                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 342..344

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 62.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                    if (typeof jsonOdm === "undefined") {
                                                                                                                                                                                                                                                                        var jsonOdm;
                                                                                                                                                                                                                                                                        if(typeof module === "undefined"){
                                                                                                                                                                                                                                                                            jsonOdm = new JsonOdm();
                                                                                                                                                                                                                                                                        }else{
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/collection.js on lines 5..12
                                                                                                                                                                                                                                                                    src/util.js on lines 4..11

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 60.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                    if (jsonOdm.Geo.edgeIntersectsPolygon([polygon.coordinates[0][j], polygon.coordinates[0][j + 1]], geometry.coordinates[i][0])) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 782..782

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 57.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                        if (jsonOdm.Geo.edgeIntersectsPolygon([multiLineString.coordinates[j][k], multiLineString.coordinates[j][k + 1]], geometry.coordinates[i][0])) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 628..628

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 57.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                        if (jsonOdm.Geo.edgeWithinPolygon([multiLineString.coordinates[j][k], multiLineString.coordinates[j][k + 1]], geometry.coordinates[i][0]) && k + 1 === multiLineString.coordinates[j].length - 1) {
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 706..706

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 57.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                    var inside = jsonOdm.Geo.edgeWithinPolygon([polygon.coordinates[0][j], polygon.coordinates[0][j + 1]], geometry.coordinates[i][0]);
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 846..846

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 57.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "Point" || geometry.type === "MultiPoint" || geometry.type === "LineString" || geometry.type === "MultiLineString") {
                                                                                                                                                                                                                                                                            return false;
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 907..909

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 54.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (geometry.type === "Point" || geometry.type === "MultiPoint" || geometry.type === "LineString" || geometry.type === "MultiLineString") {
                                                                                                                                                                                                                                                                            return false;
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 767..769

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 54.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                    if (!jsonOdm.Geo.edgeWithinPolygon([multiLineString.coordinates[i][j], multiLineString.coordinates[i][j + 1]], geometry.coordinates[0])) {
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 695..695

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 53.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                if (!jsonOdm.Geo.edgeWithinPolygon([polygon.coordinates[0][i], polygon.coordinates[0][i + 1]], geometry.coordinates[0])) {
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 837..837

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 53.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                    if (jsonOdm.Geo.edgeIntersectsPolygon([multiLineString.coordinates[i][j], multiLineString.coordinates[i][j + 1]], geometry.coordinates[0])) {
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 616..616

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 53.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.edgeIntersectsPolygon([polygon.coordinates[0][i], polygon.coordinates[0][i + 1]], geometry.coordinates[0])) {
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 773..773

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 53.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (!jsonOdm.util.isArray(geometryCollection.geometries) || !geometryCollection.geometries.length || !geometry.type) {
                                                                                                                                                                                                                                                                            return false;
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1046..1048

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 52.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (!(jsonOdm.util.isArray(edge) && jsonOdm.util.isArray(bounds) && bounds.length === 4)) {
                                                                                                                                                                                                                                                                            return false;
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 3 other locations - About 50 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1088..1090
                                                                                                                                                                                                                                                                    src/geo.js on lines 1242..1244
                                                                                                                                                                                                                                                                    src/geo.js on lines 1279..1281

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 52.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (!(jsonOdm.util.isArray(point) && jsonOdm.util.isArray(bounds) && bounds.length === 4)) {
                                                                                                                                                                                                                                                                            return false;
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 3 other locations - About 50 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1088..1090
                                                                                                                                                                                                                                                                    src/geo.js on lines 1242..1244
                                                                                                                                                                                                                                                                    src/geo.js on lines 1292..1294

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 52.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (!jsonOdm.util.isArray(geometryCollection.geometries) || !geometryCollection.geometries.length || !geometry.type) {
                                                                                                                                                                                                                                                                            return false;
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1068..1070

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 52.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (!(jsonOdm.util.isArray(point) && jsonOdm.util.isArray(polygon) && polygon.length > 2)) {
                                                                                                                                                                                                                                                                            return false;
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 3 other locations - About 50 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1242..1244
                                                                                                                                                                                                                                                                    src/geo.js on lines 1279..1281
                                                                                                                                                                                                                                                                    src/geo.js on lines 1292..1294

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 52.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        if (!(jsonOdm.util.isArray(point) && jsonOdm.util.isArray(lineString) && lineString.length >= 2)) {
                                                                                                                                                                                                                                                                            return false;
                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in src/geo.js and 3 other locations - About 50 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1088..1090
                                                                                                                                                                                                                                                                    src/geo.js on lines 1279..1281
                                                                                                                                                                                                                                                                    src/geo.js on lines 1292..1294

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 52.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            if (jsonOdm.Geo[geometryCollection.geometries[i].type] && jsonOdm.Geo[geometryCollection.geometries[i].type].intersects) {
                                                                                                                                                                                                                                                                                if (jsonOdm.Geo[geometryCollection.geometries[i].type].intersects(geometryCollection.geometries[i], geometry)) {
                                                                                                                                                                                                                                                                                    return true;
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1050..1056

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 50.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            if (jsonOdm.Geo[geometryCollection.geometries[i].type] && jsonOdm.Geo[geometryCollection.geometries[i].type].within) {
                                                                                                                                                                                                                                                                                if (!jsonOdm.Geo[geometryCollection.geometries[i].type].within(geometryCollection.geometries[i], geometry)) {
                                                                                                                                                                                                                                                                                    return false;
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                            } else {
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1072..1076

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 50.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                    if (jsonOdm.Geo.edgeWithinPolygon([lineString.coordinates[j], lineString.coordinates[j + 1]], geometry.coordinates[i][0]) && j + 1 === lineString.coordinates.length - 1) {
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 531..531

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 49.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                    if (jsonOdm.Geo.pointWithinPolygon(multiPoint.coordinates[j], geometry.coordinates[i] ? geometry.coordinates[i][0] : null)) {
                                                                                                                                                                                                                                                                                        return true;
                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 296..299

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 49.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                    if (jsonOdm.Geo.edgeIntersectsPolygon([lineString.coordinates[j], lineString.coordinates[j + 1]], geometry.coordinates[i][0])) {
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 458..458

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 49.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                    if (jsonOdm.Geo.pointWithinPolygon(multiPoint.coordinates[j], geometry.coordinates[i] ? geometry.coordinates[i][0] : null)) {
                                                                                                                                                                                                                                                                                        found = true;
                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 379..381

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 49.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            if (jsonOdm.util.isArray(geometry) && geometry.length === 2 && !jsonOdm.util.isArray(geometry[0])) {
                                                                                                                                                                                                                                                                                geometry = new jsonOdm.Geo.Point(geometry);
                                                                                                                                                                                                                                                                            } else if (jsonOdm.util.isArray(geometry) && geometry.length === 4 && !jsonOdm.util.isArray(geometry[0])) {
                                                                                                                                                                                                                                                                                geometry = new jsonOdm.Geo.BoundaryBox(geometry);
                                                                                                                                                                                                                                                                            } else if (jsonOdm.util.isArray(geometry) && geometry.length >= 1 && jsonOdm.util.isArray(geometry[0]) && geometry[0].length === 2 && !jsonOdm.util.isArray(geometry[0][0])) {
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 33..48

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 48.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            directionVector2 = [edge2[1][0] - edge2[0][0], edge2[1][1] - edge2[0][1]],
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1207..1207

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 48.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            } else if (jsonOdm.util.isArray(geometry) && geometry.length === 4 && !jsonOdm.util.isArray(geometry[0])) {
                                                                                                                                                                                                                                                                                geometry = new jsonOdm.Geo.BoundaryBox(geometry);
                                                                                                                                                                                                                                                                            } else if (jsonOdm.util.isArray(geometry) && geometry.length >= 1 && jsonOdm.util.isArray(geometry[0]) && geometry[0].length === 2 && !jsonOdm.util.isArray(geometry[0][0])) {
                                                                                                                                                                                                                                                                                geometry = new jsonOdm.Geo.LineString(geometry);
                                                                                                                                                                                                                                                                            } else if (jsonOdm.util.isArray(geometry) && geometry.length >= 1 &&
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 31..48

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 48.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        var directionVector1 = [edge1[1][0] - edge1[0][0], edge1[1][1] - edge1[0][1]],
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1209..1209

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 48.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                if (jsonOdm.Geo.edgeIntersectsPolygon([lineString.coordinates[i], lineString.coordinates[i + 1]], geometry.coordinates[0])){
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 449..449

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 45.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                if (lineString[i][0] === inLineString[j][0] && lineString[i][1] === inLineString[j][1]) {
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 155..155

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 45.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                if (!jsonOdm.Geo.edgeWithinPolygon([lineString.coordinates[i], lineString.coordinates[i + 1]], geometry.coordinates[0])) {
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 522..522

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 45.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            return geometry.coordinates[0] === point.coordinates[0] && geometry.coordinates[1] === point.coordinates[1];
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in src/geo.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                    src/geo.js on lines 1313..1313

                                                                                                                                                                                                                                                                    Duplicated Code

                                                                                                                                                                                                                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                                                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                                                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                                                                                                    Tuning

                                                                                                                                                                                                                                                                    This issue has a mass of 45.

                                                                                                                                                                                                                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                                                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                                                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                                                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                                                                                                    Refactorings

                                                                                                                                                                                                                                                                    Further Reading

                                                                                                                                                                                                                                                                    There are no issues that match your filters.

                                                                                                                                                                                                                                                                    Category
                                                                                                                                                                                                                                                                    Status