code: public STRtree getSpatialIndex () {
          if (this.spatialIndex == null) {
              synchronized (this) {
                  if (this.spatialIndex == null) {
                      // build spatial index
                      STRtree stopIndex = new STRtree();
                      for(Stop stop : this.stops.values()) {
                          try {
                              if (Double.isNaN(stop.stop_lat) || Double.isNaN(stop.stop_lon)) {
                                  continue;
                              }
                              Coordinate stopCoord = new Coordinate(stop.stop_lat, stop.stop_lon);
                              stopIndex.insert(new Envelope(stopCoord), stop);
                          } catch (Exception e) {
                              e.printStackTrace();
                          }
  
                      }
                      try {
                          stopIndex.build();
                          this.spatialIndex = stopIndex;
                      } catch (Exception e) {
                          e.printStackTrace();
                      }
                  }
              }
          }
          return this.spatialIndex;
      }
docs: TODO rename getStopSpatialIndex to make it clear what the index contains.