deegree 2.2 (2008/12/22 11:33 build-3038-official)

org.deegree.io.shpapi
Class IndexFile

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

public class IndexFile
extends 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(String url)
          Construct a IndexFile from a file name.
IndexFile(String url, 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(String url)
          throws IOException
Construct a IndexFile from a file name.

Throws:
IOException

IndexFile

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

Throws:
IOException
Method Detail

close

public void close()

writeHeader

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

Throws:
IOException

getFileMBR

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


getIndexArray

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


getRecordNum

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


getRecordOffset

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


getRecordLength

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


getIndexRecord

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


appendRecord

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

Throws:
IOException

deegree 2.2 (2008/12/22 11:33 build-3038-official)

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