Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.io.shpapi
Class MainFile

    java.lang.Object
      org.deegree.io.shpapi.MainFile

    public class MainFile

extends Object

Class representing an ESRI Shape File.

Uses class ByteUtils 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

Field Summary
`protected byte[]` | `recHdr`

Constructor Summary
`MainFile(String url)` Construct a MainFile from a file name.
`MainFile(String url, String rwflag)` Construct a MainFile from a file name.

Method Summary
`void` | `close()`
`SHPGeometry` | `getByRecNo(int RecNo)` method: getByRecNo (int RecNo) retruns a ShapeRecord-Geometry by RecorcNumber
`SHPEnvelope` | `getFileMBR()` method: getFileMBR() returns the minimum bounding rectangle of geometries within the shape-file
`SHPEnvelope` | `getRecordMBR(int RecNo)` method: getRecordMBR(int RecNo) returns the minimum bound rectangle of RecNo's Geometrie of the shape-file
`int` | `getRecordNum()` method: getRecordNum() returns the number of record with in a shape-file
`int` | `getShapeTypeByRecNo(int RecNo)` method: getShapeType(int RecNo) returns the minimum bound rectangle of RecNo's Geometrie of the shape-file
`void` | `write(byte[] bytearray, IndexRecord record, SHPEnvelope mbr)` method: public void write(byte[] bytearray) appends a bytearray to the shape file
`void` | `writeHeader(int filelength, byte shptype, SHPEnvelope mbr)` method: public void writeHeader(int filelength, byte shptype, SHPEnvelope mbr) writes a header to the shape and index file

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### recHdr

    protected byte[] recHdr

Constructor Detail

### MainFile

    public MainFile(String url)
             throws IOException

  Construct a MainFile from a file name.

  Parameters:
    `url` -
  Throws:
    `IOException`

### MainFile

    public MainFile(String url,
                    String rwflag)
             throws IOException

  Construct a MainFile from a file name.

  Parameters:
    `url` -
    `rwflag` -
  Throws:
    `IOException`

Method Detail

### close

    public void close()

### getFileMBR

    public SHPEnvelope getFileMBR()

  method: getFileMBR()
  returns the minimum bounding rectangle of geometries
  within the shape-file

  Returns:
    the minimum bounding rectangle of geometries

### getRecordNum

    public int getRecordNum()

  method: getRecordNum()
  returns the number of record with in a shape-file

  Returns:
    the number of record with in a shape-file

### getRecordMBR

    public SHPEnvelope getRecordMBR(int RecNo)
                             throws IOException

  method: getRecordMBR(int RecNo)
  returns the minimum bound rectangle of RecNo's Geometrie of the shape-file

  Parameters:
    `RecNo` -
  Returns:
    the minimum bound rectangle of RecNo's Geometrie of the shape-file
  Throws:
    `IOException`

### getByRecNo

    public SHPGeometry getByRecNo(int RecNo)
                           throws IOException

  method: getByRecNo (int RecNo)
  retruns a ShapeRecord-Geometry by RecorcNumber

  Parameters:
    `RecNo` -
  Returns:
    a ShapeRecord-Geometry by RecorcNumber
  Throws:
    `IOException`

### getShapeTypeByRecNo

    public int getShapeTypeByRecNo(int RecNo)
                            throws IOException

  method: getShapeType(int RecNo)
  returns the minimum bound rectangle of RecNo's Geometrie of the shape-file

  Parameters:
    `RecNo` -
  Returns:
    the minimum bound rectangle of RecNo's Geometrie of the shape-file
  Throws:
    `IOException`

### write

    public void write(byte[] bytearray,
                      IndexRecord record,
                      SHPEnvelope mbr)
               throws IOException

  method: public void write(byte[] bytearray)
  appends a bytearray to the shape file

  Parameters:
    `bytearray` -
    `record` -
    `mbr` -
  Throws:
    `IOException`

### writeHeader

    public void writeHeader(int filelength,
                            byte shptype,
                            SHPEnvelope mbr)
                     throws IOException

  method: public void writeHeader(int filelength, byte shptype, SHPEnvelope mbr)
  writes a header to the shape and index file

  Parameters:
    `filelength` -
    `shptype` -
    `mbr` -
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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