Enum ShpFileType

    • Enum Constant Detail

      • 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 Detail

      • extension

        public final String extension
      • extensionWithPeriod

        public final String extensionWithPeriod
      • gzExtensionWithPeriod

        public final String gzExtensionWithPeriod
    • Method Detail

      • values

        public static ShpFileType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ShpFileType c : ShpFileType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ShpFileType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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.