|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.io.shpapi.IndexFile
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
Last changes:
17.12.1999 ap: import clauses added
31.07.2000 ap: method writeIndexFileHeader(SHPEnvelope mbr) added
31.07.2000 ap: method appendRecord(IndexRecord record, SHPEnvelope mbr) added
-------------------------------------------------------------------------
Field Summary | |
private java.lang.String |
_shx
|
private int |
filelength
length of the indexfile |
private SHPEnvelope |
fileMBR
minimum bounding rectangle of the shape-file |
private FileHeader |
ifh
IndexFileHeader is equal to ShapeFileHeader |
private static int |
INDEX_RECORD_LENGTH
The length of an index record. (8 byte) |
private IndexRecord[] |
indexArray
array which holds the content of .shx-file: |
private long |
offset
file position offset |
private java.io.RandomAccessFile |
rafShx
|
private int |
RecordNum
number of Records in .shp, .shx., .dbf has to be identical |
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 |
private void |
setIndexArray()
method: setIndexArray() local constructor for local field indexArray |
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 |
Field Detail |
private final java.lang.String _shx
private java.io.RandomAccessFile rafShx
private static final int INDEX_RECORD_LENGTH
private IndexRecord[] indexArray
private FileHeader ifh
private SHPEnvelope fileMBR
private int RecordNum
private long offset
private int filelength
Constructor Detail |
public IndexFile(java.lang.String url) throws java.io.IOException
public IndexFile(java.lang.String url, java.lang.String rwflag) throws java.io.IOException
Method Detail |
public void close()
public void writeHeader(int shptype, SHPEnvelope mbr) throws java.io.IOException
java.io.IOException
public SHPEnvelope getFileMBR()
private void setIndexArray() throws java.io.IOException
java.io.IOException
public IndexRecord[] getIndexArray()
public int getRecordNum()
public int getRecordOffset(int RecNo)
public int getRecordLength(int RecNo)
public IndexRecord getIndexRecord(int RecNo)
public void appendRecord(IndexRecord record, SHPEnvelope mbr) throws java.io.IOException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |