deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.io.shpapi
Class FileHeader

java.lang.Object
  extended by org.deegree.io.shpapi.FileHeader

public class FileHeader
extends java.lang.Object

Class representing an ESRI Index File Header.

Uses class ByteUtils ShapeUtils modified from the original package com.bbn.openmap.layer.shape
Copyright (C) 1998 BBN Corporation 10 Moulton St. Cambridge, MA 02138

Version:
16.08.2000
Author:
Andreas Poth

Constructor Summary
FileHeader(java.io.RandomAccessFile rafShp_)
          Construct a IndexFileHeader from a file name.
FileHeader(java.io.RandomAccessFile rafShp_, boolean newHeader)
          Construct a IndexFileHeader from a file name.
 
Method Summary
 long getFileLength()
          method: getFileLength()
returns the length of the shape file in bytes
 SHPEnvelope getFileMBR()
          method: getFileMBR();
Returns the bounding box of this shape file.
 int getFileShapeType()
          method: getFileShapeType()
returns the code for the shape type of the file
 int getFileVersion()
          method: getFileVersion()
returns the version of the shape file
 void writeHeader()
          method: writeHeader()
Writes a blank header into the shape file.
 void writeHeader(int filelength, int shptype, SHPEnvelope mbr)
          method: writeHeader(int filelength, byte shptype,SHPEnvelope mbr)
Writes a header into the shape file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileHeader

public FileHeader(java.io.RandomAccessFile rafShp_)
           throws java.io.IOException
Construct a IndexFileHeader from a file name.

Parameters:
rafShp_ -
Throws:
java.io.IOException

FileHeader

public FileHeader(java.io.RandomAccessFile rafShp_,
                  boolean newHeader)
           throws java.io.IOException
Construct a IndexFileHeader from a file name.

Parameters:
rafShp_ -
newHeader -
Throws:
java.io.IOException
Method Detail

getFileMBR

public SHPEnvelope getFileMBR()
method: getFileMBR();
Returns the bounding box of this shape file. The bounding box
is the smallest rectangle that encloses all the shapes in the
file.

Returns:
the bounding box of this shape file. The bounding box
is the smallest rectangle that encloses all the shapes in the
file.

getFileLength

public long getFileLength()
method: getFileLength()
returns the length of the shape file in bytes

Returns:
the length of the shape file in bytes

getFileVersion

public int getFileVersion()
method: getFileVersion()
returns the version of the shape file

Returns:
the version of the shape file

getFileShapeType

public int getFileShapeType()
method: getFileShapeType()
returns the code for the shape type of the file

Returns:
the code for the shape type of the file

writeHeader

public void writeHeader()
                 throws java.io.IOException
method: writeHeader()
Writes a blank header into the shape file.

Throws:
java.io.IOException

writeHeader

public void writeHeader(int filelength,
                        int shptype,
                        SHPEnvelope mbr)
                 throws java.io.IOException
method: writeHeader(int filelength, byte shptype,SHPEnvelope mbr)
Writes a header into the shape file.

Parameters:
filelength -
shptype -
mbr -
Throws:
java.io.IOException

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org