Enum Class ShpFileType

Object
Enum<ShpFileType>
ShpFileType
All Implemented Interfaces:
Serializable, Comparable<ShpFileType>, Constable

public enum ShpFileType extends Enum<ShpFileType>
Enumerates the known types of files associated with a shapefile.
Author:
jesse
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    the .cpg file is used to specify the code page
    the .dbf file, it contains the attribute information of the shapefile
    the .fix file, it contains all the Feature IDs for constant time lookup by fid also so that the fids stay consistent across deletes and adds
    the .prj file, it contains the projection information of the shapefile
    the .qix file, A quad tree spatial index of the shapefile.
    The .shp file.
    the .shp.xml file, it contains the metadata about the shapefile
    the .shx file, it contains index information of the existing features
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final String
     
    final String
     
    final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    toBase(File file)
    Returns the base of the file or null if the file passed in is not of the correct type (has the correct extension.)
    toBase(String path)
    Returns the base of the file or null if the file passed in is not of the correct type (has the correct extension.)
    toBase(URL url)
    Returns the base of the file or null if the file passed in is not of the correct type (has the correct extension.)
    Returns the enum constant of this class with the specified name.
    static ShpFileType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • SHP

      public static final ShpFileType SHP
      The .shp file. It contains the geometries of the shapefile
    • DBF

      public static final ShpFileType DBF
      the .dbf file, it contains the attribute information of the shapefile
    • SHX

      public static final ShpFileType SHX
      the .shx file, it contains index information of the existing features
    • PRJ

      public static final ShpFileType PRJ
      the .prj file, it contains the projection information of the shapefile
    • QIX

      public static final ShpFileType QIX
      the .qix file, A quad tree spatial index of the shapefile. It is the same format the mapservers shptree tool generates
    • FIX

      public static final ShpFileType FIX
      the .fix file, it contains all the Feature IDs for constant time lookup by fid also so that the fids stay consistent across deletes and adds
    • SHP_XML

      public static final ShpFileType SHP_XML
      the .shp.xml file, it contains the metadata about the shapefile
    • CPG

      public static final ShpFileType CPG
      the .cpg file is used to specify the code page
  • Field Details

    • extension

      public final String extension
    • extensionWithPeriod

      public final String extensionWithPeriod
    • gzExtensionWithPeriod

      public final String gzExtensionWithPeriod
  • Method Details

    • values

      public static ShpFileType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ShpFileType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toBase

      public String toBase(File file)
      Returns the base of the file or null if the file passed in is not of the correct type (has the correct extension.)

      For example if the file is c:\shapefiles\file1.dbf. The DBF type will return c:\shapefiles\file1 but all other will return null.

    • toBase

      public String toBase(String path)
      Returns the base of the file or null if the file passed in is not of the correct type (has the correct extension.)

      For example if the file is c:\shapefiles\file1.dbf. The DBF type will return c:\shapefiles\file1 but all other will return null.

    • toBase

      public String toBase(URL url)
      Returns the base of the file or null if the file passed in is not of the correct type (has the correct extension.)

      For example if the file is c:\shapefiles\file1.dbf. The DBF type will return c:\shapefiles\file1 but all other will return null.