spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/ShapefileRDD.java [224:248]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public BoundBox getBoundBox(JavaSparkContext sc, String inputPath) {
    // read bound boxes into memory
    JavaPairRDD<Long, BoundBox> bounds =
        sc.newAPIHadoopFile(
            inputPath,
            BoundaryInputFormat.class,
            Long.class,
            BoundBox.class,
            sc.hadoopConfiguration());
    // merge all into one
    bounds =
        bounds.reduceByKey(
            new Function2<BoundBox, BoundBox, BoundBox>() {
              @Override
              public BoundBox call(BoundBox box1, BoundBox box2) throws Exception {
                return BoundBox.mergeBoundBox(box1, box2);
              }
            });
    // if there is a result assign it to variable : boundBox
    if (bounds.count() > 0) {
      return new BoundBox(bounds.collect().get(0)._2());
    } else {
      return null;
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/ShapefileReader.java [117:141]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public static BoundBox readBoundBox(JavaSparkContext sc, String inputPath) {
    // read bound boxes into memory
    JavaPairRDD<Long, BoundBox> bounds =
        sc.newAPIHadoopFile(
            inputPath,
            BoundaryInputFormat.class,
            Long.class,
            BoundBox.class,
            sc.hadoopConfiguration());
    // merge all into one
    bounds =
        bounds.reduceByKey(
            new Function2<BoundBox, BoundBox, BoundBox>() {
              @Override
              public BoundBox call(BoundBox box1, BoundBox box2) throws Exception {
                return BoundBox.mergeBoundBox(box1, box2);
              }
            });
    // if there is a result assign it to variable : boundBox
    if (bounds.count() > 0) {
      return new BoundBox(bounds.collect().get(0)._2());
    } else {
      return null;
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



