NLeSC/ahn-pointcloud-viewer

View on GitHub

Showing 154 of 154 total issues

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

      this.render = function() {
        initEDL();

        resize();

Severity: Major
Found in app/scripts/pointcloud/pointcloud.service.js - About 2 hrs to fix

    Function PointcloudService has 17 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      function PointcloudService(THREE, Potree, $window, $rootScope, $location,
        DrivemapService,
        CameraService, SceneService,
        PathControls, MeasuringService, EarthcontrolsService,
        RailService, ExtractionDrawingService, PointcloudExtractionSelectionService,
    Severity: Major
    Found in app/scripts/pointcloud/pointcloud.service.js - About 2 hrs to fix

      Function SearchPanelController has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function SearchPanelController(BingGeoCoderService, SceneService, PathControls, Messagebus, $window, toastr, THREE, proj4) {
          this.query = '';
          this.hasGeoLocation = 'geolocation' in $window.navigator;
      
          this.clear = function() {
      Severity: Major
      Found in app/scripts/searchbox/searchbox.controller.js - About 2 hrs to fix

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

          function EarthcontrolsService($rootScope, $location, Messagebus, THREE, PathControls, RailService) { // jshint ignore:line
            this.enabled = true;
        
            this.earthControls = null;
            this.pathcontrols = PathControls;
        Severity: Minor
        Found in app/scripts/earthcontrols/earthcontrols.service.js - About 2 hrs to fix

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

              context.fillStyle   = 'rgba(' + this.backgroundColor.r + ',' + this.backgroundColor.g + ',' + this.backgroundColor.b + ',' + this.backgroundColor.a + ')';
          Severity: Major
          Found in app/scripts/utils/TextSprite.js and 2 other locations - About 1 hr to fix
          app/scripts/utils/TextSprite.js on lines 81..81
          app/scripts/utils/TextSprite.js on lines 91..91

          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 74.

          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

              context.strokeStyle = 'rgba(' + this.borderColor.r + ',' + this.borderColor.g + ',' + this.borderColor.b + ',' + this.borderColor.a + ')';
          Severity: Major
          Found in app/scripts/utils/TextSprite.js and 2 other locations - About 1 hr to fix
          app/scripts/utils/TextSprite.js on lines 79..79
          app/scripts/utils/TextSprite.js on lines 91..91

          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 74.

          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

              context.fillStyle = 'rgba(' + this.textColor.r + ',' + this.textColor.g + ',' + this.textColor.b + ',' + this.textColor.a + ')';
          Severity: Major
          Found in app/scripts/utils/TextSprite.js and 2 other locations - About 1 hr to fix
          app/scripts/utils/TextSprite.js on lines 79..79
          app/scripts/utils/TextSprite.js on lines 81..81

          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 74.

          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

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

            function CamFrustumService(ol, THREE) {
              this.camFrustum = new ol.geom.LineString([[0, 0], [1, 0], [0, 1]]);
              var featureVector = new ol.source.Vector({
                features: [new ol.Feature(this.camFrustum)]
              });
          Severity: Minor
          Found in app/scripts/minimap/cam-frustum.service.js - About 1 hr to fix

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

              function ExtractionController(ExtractionSelectionService, pattyConf, Messagebus, $http, toastr) {
                this.selection = ExtractionSelectionService;
                this.email = '';
                this.size = {
                  coverage: 1,
            Severity: Minor
            Found in app/scripts/extract/extraction.controller.js - About 1 hr to fix

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

                    if (intersection) {
                      viewport[2] = intersection;
              
                      ray = ray.set(this.camera.position, rightTopCorner);
                      intersection = ray.intersectPlane(this.floor);
              Severity: Major
              Found in app/scripts/pointcloud/camera.service.js and 1 other location - About 1 hr to fix
              app/scripts/pointcloud/camera.service.js on lines 70..76

              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 72.

              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 (intersection) {
                      viewport[0] = intersection;
              
                      ray = ray.set(this.camera.position, leftBottomCorner);
                      intersection = ray.intersectPlane(this.floor);
              Severity: Major
              Found in app/scripts/pointcloud/camera.service.js and 1 other location - About 1 hr to fix
              app/scripts/pointcloud/camera.service.js on lines 80..86

              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 72.

              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

              Function addMarker has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  this.addMarker = function(point){
                      this.points.push(point);
              
                      // sphere
                      var sphere = new THREE.Mesh(sphereGeometry, createSphereMaterial());
              Severity: Minor
              Found in app/scripts/utils/MeasuringTool.js - About 1 hr to fix

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

                Object.defineProperty(Potree.Measure.prototype, 'showDistances', {
                    get: function(){
                        return this._showDistances;
                    },
                    set: function(value){
                Severity: Major
                Found in app/scripts/utils/MeasuringTool.js and 2 other locations - About 1 hr to fix
                app/scripts/utils/MeasuringTool.js on lines 296..304
                app/scripts/utils/MeasuringTool.js on lines 306..314

                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 71.

                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

                Object.defineProperty(Potree.Measure.prototype, 'showArea', {
                    get: function(){
                        return this._showArea;
                    },
                    set: function(value){
                Severity: Major
                Found in app/scripts/utils/MeasuringTool.js and 2 other locations - About 1 hr to fix
                app/scripts/utils/MeasuringTool.js on lines 306..314
                app/scripts/utils/MeasuringTool.js on lines 316..324

                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 71.

                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

                Object.defineProperty(Potree.Measure.prototype, 'closed', {
                    get: function(){
                        return this._closed;
                    },
                    set: function(value){
                Severity: Major
                Found in app/scripts/utils/MeasuringTool.js and 2 other locations - About 1 hr to fix
                app/scripts/utils/MeasuringTool.js on lines 296..304
                app/scripts/utils/MeasuringTool.js on lines 316..324

                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 71.

                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

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

                    this.loadPointcloud = function() {
                      // load pointcloud
                      var pointcloudPath = DrivemapService.getPointcloudUrl();
                      me.stats.lasCoordinates.crs = DrivemapService.getCrs();
                
                
                Severity: Minor
                Found in app/scripts/pointcloud/pointcloud.service.js - About 1 hr to fix

                  Function initHQSPlats has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        var initHQSPlats = function() {
                          if (depthMaterial !== null) {
                            return;
                          }
                  
                  
                  Severity: Minor
                  Found in app/scripts/pointcloud/pointcloud.service.js - About 1 hr to fix

                    Function update has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        this.update = function() {
                          Potree.pointLoadLimit =  me.settings.pointCountTarget * 2 * 1000 * 1000;
                    
                          if (me.settings.useEDL) {
                            directionalLight.position.copy(camera.position);
                    Severity: Minor
                    Found in app/scripts/pointcloud/pointcloud.service.js - About 1 hr to fix

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

                          $scope.$watch('blc.legendMin', function(newValue, oldValue) {
                            if (newValue === oldValue) {
                              //Initialization, so we ignore this event.
                            } else {
                              this.setLegendText();
                      Severity: Major
                      Found in app/scripts/biglegend/biglegend.controller.js and 1 other location - About 1 hr to fix
                      app/scripts/biglegend/biglegend.controller.js on lines 34..41

                      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 68.

                      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

                          $scope.$watch('blc.legendMax', function(newValue, oldValue) {
                            if (newValue === oldValue) {
                              //Initialization, so we ignore this event.
                            } else {
                              this.setLegendText();
                      Severity: Major
                      Found in app/scripts/biglegend/biglegend.controller.js and 1 other location - About 1 hr to fix
                      app/scripts/biglegend/biglegend.controller.js on lines 21..28

                      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 68.

                      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

                      Severity
                      Category
                      Status
                      Source
                      Language