Record Class ShapefileHeader
java.lang.Object
java.lang.Record
ch.so.agi.gretl.internal.shapefile.core.ShapefileHeader
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionShapefileHeader(int fileCode, int fileLengthWords, int version, ShapeType shapeType, double xmin, double ymin, double xmax, double ymax, double zmin, double zmax, double mmin, double mmax) Creates an instance of aShapefileHeaderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intfileCode()Returns the value of thefileCoderecord component.intReturns the value of thefileLengthWordsrecord component.final inthashCode()Returns a hash code value for this object.doublemmax()Returns the value of themmaxrecord component.doublemmin()Returns the value of themminrecord component.static ShapefileHeaderread(FileChannel channel) Returns the value of theshapeTyperecord component.final StringtoString()Returns a string representation of this record class.voidvoidintversion()Returns the value of theversionrecord component.voidwrite(FileChannel channel) doublexmax()Returns the value of thexmaxrecord component.doublexmin()Returns the value of thexminrecord component.doubleymax()Returns the value of theymaxrecord component.doubleymin()Returns the value of theyminrecord component.doublezmax()Returns the value of thezmaxrecord component.doublezmin()Returns the value of thezminrecord component.
-
Field Details
-
HEADER_SIZE
public static final int HEADER_SIZE- See Also:
-
-
Constructor Details
-
ShapefileHeader
public ShapefileHeader(int fileCode, int fileLengthWords, int version, ShapeType shapeType, double xmin, double ymin, double xmax, double ymax, double zmin, double zmax, double mmin, double mmax) Creates an instance of aShapefileHeaderrecord class.- Parameters:
fileCode- the value for thefileCoderecord componentfileLengthWords- the value for thefileLengthWordsrecord componentversion- the value for theversionrecord componentshapeType- the value for theshapeTyperecord componentxmin- the value for thexminrecord componentymin- the value for theyminrecord componentxmax- the value for thexmaxrecord componentymax- the value for theymaxrecord componentzmin- the value for thezminrecord componentzmax- the value for thezmaxrecord componentmmin- the value for themminrecord componentmmax- the value for themmaxrecord component
-
-
Method Details
-
read
public static ShapefileHeader read(FileChannel channel) throws IOException, ShapefileMappingException - Throws:
IOExceptionShapefileMappingException
-
write
- Throws:
IOExceptionShapefileMappingException
-
validateMainFileHeader
- Throws:
ShapefileMappingException
-
validateIndexFileHeader
- Throws:
ShapefileMappingException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
fileCode
public int fileCode()Returns the value of thefileCoderecord component.- Returns:
- the value of the
fileCoderecord component
-
fileLengthWords
public int fileLengthWords()Returns the value of thefileLengthWordsrecord component.- Returns:
- the value of the
fileLengthWordsrecord component
-
version
public int version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
shapeType
Returns the value of theshapeTyperecord component.- Returns:
- the value of the
shapeTyperecord component
-
xmin
public double xmin()Returns the value of thexminrecord component.- Returns:
- the value of the
xminrecord component
-
ymin
public double ymin()Returns the value of theyminrecord component.- Returns:
- the value of the
yminrecord component
-
xmax
public double xmax()Returns the value of thexmaxrecord component.- Returns:
- the value of the
xmaxrecord component
-
ymax
public double ymax()Returns the value of theymaxrecord component.- Returns:
- the value of the
ymaxrecord component
-
zmin
public double zmin()Returns the value of thezminrecord component.- Returns:
- the value of the
zminrecord component
-
zmax
public double zmax()Returns the value of thezmaxrecord component.- Returns:
- the value of the
zmaxrecord component
-
mmin
public double mmin()Returns the value of themminrecord component.- Returns:
- the value of the
mminrecord component
-
mmax
public double mmax()Returns the value of themmaxrecord component.- Returns:
- the value of the
mmaxrecord component
-