Package io.shp

Class FeatureReader

java.lang.Object
io.shp.FeatureReader

public class FeatureReader
extends java.lang.Object
Reader for (geometry) features
  • Constructor Summary

    Constructors 
    Constructor Description
    FeatureReader()  
  • Method Summary

    Modifier and Type Method Description
    static java.util.List<Feature> readFeaturesFromShapefile​(java.io.File shapefile)
    Reads an ESRI Shapefile and returns a list of GeometryFeatures containing the geometry as well as all the attributes.
    static java.util.List<org.locationtech.jts.geom.Geometry> readRawGeometryFromShapefile​(java.io.File shapefile)
    Reads an ESRI Shapefile and returns a list of raw JTS-geometries without the features' attributes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • readRawGeometryFromShapefile

      public static java.util.List<org.locationtech.jts.geom.Geometry> readRawGeometryFromShapefile​(java.io.File shapefile) throws java.io.IOException
      Reads an ESRI Shapefile and returns a list of raw JTS-geometries without the features' attributes.
      Parameters:
      shapefile - location of the shapefile (.shp) to read
      Returns:
      LinkedList of the geometries
      Throws:
      java.io.IOException - IO exception to throw
    • readFeaturesFromShapefile

      public static java.util.List<Feature> readFeaturesFromShapefile​(java.io.File shapefile) throws java.io.IOException
      Reads an ESRI Shapefile and returns a list of GeometryFeatures containing the geometry as well as all the attributes.
      Parameters:
      shapefile - location of the shapefile (.shp) to read
      Returns:
      LinkedList of the features
      Throws:
      java.io.IOException - IO exception to throw