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

org.deegree.io.shpapi
Class IndexFile

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

public class IndexFile
extends java.lang.Object

Class representing an ESRI Shape File.

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

Version:
31.07.2000
Author:
Andreas Poth

Constructor Summary
IndexFile(java.lang.String url)
          Construct a IndexFile from a file name.
IndexFile(java.lang.String url, java.lang.String rwflag)
          Construct a IndexFile from a file name.
 
Method Summary
 void appendRecord(IndexRecord record, SHPEnvelope mbr)
          appends an index record to the indexfile
 void close()
           
 SHPEnvelope getFileMBR()
          method: getFileMBR()
returns the minimum bounding rectangle of the shape-file
 IndexRecord[] getIndexArray()
          method: getIndexArray()
clones local field indexArray
 IndexRecord getIndexRecord(int RecNo)
          method: getIndexRecord (int RecNo)
function to get Index Record by Record number
 int getRecordLength(int RecNo)
          method: getRecordLength (int RecNo)
function to get Record Length by Record number
 int getRecordNum()
          method: getRecordNum()
function to get number of Records
 int getRecordOffset(int RecNo)
          methode: getRecordOffset (int RecNo)
function to get Record offset by Record number
 void writeHeader(int shptype, SHPEnvelope mbr)
          method: writeHeader(int filelength, byte shptype,SHPEnvelope mbr)
Writes a header into the index file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexFile

public IndexFile(java.lang.String url)
          throws java.io.IOException
Construct a IndexFile from a file name.

Parameters:
url -
Throws:
java.io.IOException

IndexFile

public IndexFile(java.lang.String url,
                 java.lang.String rwflag)
          throws java.io.IOException
Construct a IndexFile from a file name.

Parameters:
url -
rwflag -
Throws:
java.io.IOException
Method Detail

close

public void close()

writeHeader

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

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

getFileMBR

public SHPEnvelope getFileMBR()
method: getFileMBR()
returns the minimum bounding rectangle of the shape-file

Returns:
the minimum bounding rectangle of the shape-file

getIndexArray

public IndexRecord[] getIndexArray()
method: getIndexArray()
clones local field indexArray

Returns:
the index record

getRecordNum

public int getRecordNum()
method: getRecordNum()
function to get number of Records

Returns:
number of Records

getRecordOffset

public int getRecordOffset(int RecNo)
methode: getRecordOffset (int RecNo)
function to get Record offset by Record number

Parameters:
RecNo -
Returns:
offset by Record number

getRecordLength

public int getRecordLength(int RecNo)
method: getRecordLength (int RecNo)
function to get Record Length by Record number

Parameters:
RecNo -
Returns:
Record Length by Record number

getIndexRecord

public IndexRecord getIndexRecord(int RecNo)
method: getIndexRecord (int RecNo)
function to get Index Record by Record number

Parameters:
RecNo -
Returns:
Index Record by Record number

appendRecord

public void appendRecord(IndexRecord record,
                         SHPEnvelope mbr)
                  throws java.io.IOException
appends an index record to the indexfile

Parameters:
record -
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