Enum ShpFileType
- Object
-
- Enum<ShpFileType>
-
- ShpFileType
-
- All Implemented Interfaces:
Serializable
,Comparable<ShpFileType>
public enum ShpFileType extends Enum<ShpFileType>
Enumerates the known types of files associated with a shapefile.- Author:
- jesse
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CPG
the .cpg file is used to specify the code pageDBF
the .dbf file, it contains the attribute information of the shapefileFIX
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 addsPRJ
the .prj file, it contains the projection information of the shapefileQIX
the .qix file, A quad tree spatial index of the shapefile.SHP
The .shp file.SHP_XML
the .shp.xml file, it contains the metadata about the shapefileSHX
the .shx file, it contains index information of the existing features
-
Field Summary
Fields Modifier and Type Field Description String
extension
String
extensionWithPeriod
String
gzExtensionWithPeriod
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.)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.)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.)static ShpFileType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ShpFileType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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
-
-
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 nameNullPointerException
- 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.
-
-