test_class.declarator: fs
test_class.modifier: public static
test_class.original_string: public static FileSystem fs;
test_class.type: FileSystem
test_class.var_name: fs
test_class.declarator: hdfsCluster
test_class.modifier: public static
test_class.original_string: public static MiniDFSCluster hdfsCluster;
test_class.type: MiniDFSCluster
test_class.var_name: hdfsCluster
test_class.declarator: hdfsURI
test_class.modifier: public static
test_class.original_string: public static String hdfsURI;
test_class.type: String
test_class.var_name: hdfsURI
test_class.file: core/src/test/java/org/datasyslab/geospark/formatMapper/shapefileParser/shapes/ShapefileReaderTest.java
test_class.identifier: ShapefileReaderTest
test_class.superclass: extends GeoSparkTestBase
test_case.body: @Test
      public void testReadToPolygonRDD()
              throws Exception
      {
          String inputLocation = getShapeFilePath("polygon");
          // load shape with geotool.shapefile
          FeatureCollection<SimpleFeatureType, SimpleFeature> collection = loadFeatures(inputLocation);
          FeatureIterator<SimpleFeature> features = collection.features();
          ArrayList<String> featureTexts = new ArrayList<String>();
          while (features.hasNext()) {
              SimpleFeature feature = features.next();
              Object geometry = feature.getDefaultGeometry();
              if (geometry instanceof MultiPolygon) {
                  MultiPolygon multiPolygon = (MultiPolygon) geometry;
                  if (multiPolygon.getNumGeometries() == 1) {
                      geometry = multiPolygon.getGeometryN(0);
                  }
              }
              featureTexts.add(String.valueOf(geometry));
          }
          features.close();
          final Iterator<String> featureIterator = featureTexts.iterator();
  
          PolygonRDD spatialRDD = ShapefileReader.readToPolygonRDD(sc, inputLocation);
          SpatialRDD<Geometry> geomeryRDD = ShapefileReader.readToGeometryRDD(sc, inputLocation);
  
          long count = RangeQuery.SpatialRangeQuery(spatialRDD, new Envelope(-180, 180, -90, 90), false, false).count();
          assertEquals(spatialRDD.rawSpatialRDD.count(), count);
  
          for (Geometry geometry : geomeryRDD.rawSpatialRDD.collect()) {
              assertEquals(featureIterator.next(), geometry.toText());
          }
      }
test_case.class_method_signature: ShapefileReaderTest.testReadToPolygonRDD()
test_case.full_signature: @Test public void testReadToPolygonRDD()
test_case.identifier: testReadToPolygonRDD
test_case.invocations: getShapeFilePath loadFeatures features hasNext next getDefaultGeometry getNumGeometries getGeometryN add valueOf close iterator readToPolygonRDD readToGeometryRDD count SpatialRangeQuery assertEquals count collect assertEquals next toText
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReadToPolygonRDD()
focal_class.declarator: recordKey = null
focal_class.modifier: private
focal_class.original_string: private ShapeKey recordKey = null;
focal_class.type: ShapeKey
focal_class.var_name: recordKey
focal_class.declarator: recordContent = null
focal_class.modifier: private
focal_class.original_string: private ShpRecord recordContent = null;
focal_class.type: ShpRecord
focal_class.var_name: recordContent
focal_class.declarator: shpInputStream = null
focal_class.modifier: private
focal_class.original_string: private FSDataInputStream shpInputStream = null;
focal_class.type: FSDataInputStream
focal_class.var_name: shpInputStream
focal_class.declarator: parser = null
focal_class.original_string: ShpFileParser parser = null;
focal_class.type: ShpFileParser
focal_class.var_name: parser
focal_class.declarator: indexes
focal_class.modifier: private
focal_class.original_string: private int[] indexes;
focal_class.type: int[]
focal_class.var_name: indexes
focal_class.declarator: useIndex = false
focal_class.modifier: private
focal_class.original_string: private boolean useIndex = false;
focal_class.type: boolean
focal_class.var_name: useIndex
focal_class.declarator: indexId = 0
focal_class.modifier: private
focal_class.original_string: private int indexId = 0;
focal_class.type: int
focal_class.var_name: indexId
focal_class.file: core/src/main/java/org/datasyslab/geospark/formatMapper/shapefileParser/shapes/ShapeFileReader.java
focal_class.identifier: ShapeFileReader
focal_class.class_method_signature: ShapeFileReader.ShapeFileReader()
focal_class.full_signature: public  ShapeFileReader()
focal_class.identifier: ShapeFileReader
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ShapeFileReader()
focal_class.class_method_signature: ShapeFileReader.ShapeFileReader(int[] indexes)
focal_class.full_signature: public  ShapeFileReader(int[] indexes)
focal_class.identifier: ShapeFileReader
focal_class.modifiers: public
focal_class.parameters: (int[] indexes)
focal_class.signature:  ShapeFileReader(int[] indexes)
focal_class.class_method_signature: ShapeFileReader.initialize(InputSplit split, TaskAttemptContext context)
focal_class.full_signature: public void initialize(InputSplit split, TaskAttemptContext context)
focal_class.identifier: initialize
focal_class.modifiers: public
focal_class.parameters: (InputSplit split, TaskAttemptContext context)
focal_class.return: void
focal_class.signature: void initialize(InputSplit split, TaskAttemptContext context)
focal_class.class_method_signature: ShapeFileReader.nextKeyValue()
focal_class.full_signature: public boolean nextKeyValue()
focal_class.identifier: nextKeyValue
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean nextKeyValue()
focal_class.class_method_signature: ShapeFileReader.getCurrentKey()
focal_class.full_signature: public ShapeKey getCurrentKey()
focal_class.identifier: getCurrentKey
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ShapeKey
focal_class.signature: ShapeKey getCurrentKey()
focal_class.class_method_signature: ShapeFileReader.getCurrentValue()
focal_class.full_signature: public ShpRecord getCurrentValue()
focal_class.identifier: getCurrentValue
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ShpRecord
focal_class.signature: ShpRecord getCurrentValue()
focal_class.class_method_signature: ShapeFileReader.getProgress()
focal_class.full_signature: public float getProgress()
focal_class.identifier: getProgress
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: float
focal_class.signature: float getProgress()
focal_class.class_method_signature: ShapeFileReader.close()
focal_class.full_signature: public void close()
focal_class.identifier: close
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.superclass: extends RecordReader<ShapeKey, ShpRecord>
focal_method.body: public void close()
              throws IOException
      {
          shpInputStream.close();
      }
focal_method.class_method_signature: ShapeFileReader.close()
focal_method.full_signature: public void close()
focal_method.identifier: close
focal_method.invocations: close
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void close()