de.fhg.igd.earth.model.input.shapefile
Class ESRIPointRecord

java.lang.Object
  extended byde.fhg.igd.earth.model.input.shapefile.ShapeUtils
      extended byde.fhg.igd.earth.model.input.shapefile.ESRIRecord
          extended byde.fhg.igd.earth.model.input.shapefile.ESRIPointRecord

public class ESRIPointRecord
extends ESRIRecord

Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG

Version:
: 1.0
Author:
: Werner Beutel

Field Summary
protected  ImageIcon ii
          A BufferedImage to use at the point.
protected  double x
          The x coordinate.
protected  double y
          The y coordinate.
 
Fields inherited from class de.fhg.igd.earth.model.input.shapefile.ESRIRecord
contentLength, recordNumber
 
Fields inherited from class de.fhg.igd.earth.model.input.shapefile.ShapeUtils
SHAPE_FILE_HEADER_LENGTH, SHAPE_FILE_HEADER_LENGTH_DB, SHAPE_FILE_RECORD_HEADER_LENGTH, SHAPE_TYPE_ARC, SHAPE_TYPE_MULTIPOINT, SHAPE_TYPE_NULL, SHAPE_TYPE_POINT, SHAPE_TYPE_POLYGON, SHAPE_TYPE_POLYLINE
 
Constructor Summary
ESRIPointRecord(byte[] b, int off)
          Initialize a point record from the given buffer.
ESRIPointRecord(byte[] b, int off, ImageIcon imageIcon)
          Initialize a point record from the given buffer.
ESRIPointRecord(double x, double y)
          Initializes this point from the given point.
 
Method Summary
 ESRIBoundingBox getBoundingBox()
          Gets this record's bounding box.
 int getRecordLength()
          Yields the length of this record's data portion.
 int getShapeType()
          Gets this record's shape type as an int.
 int write(byte[] b, int off)
          Writes this point to the given buffer at the given offset.
 
Methods inherited from class de.fhg.igd.earth.model.input.shapefile.ESRIRecord
getBinaryStoreSize, getContentLength, getRecordNumber
 
Methods inherited from class de.fhg.igd.earth.model.input.shapefile.ShapeUtils
readBEInt, readBox, readLEDouble, readLEInt, readLEInt, readLELong, readPoint, writeBEInt, writeBox, writeLEDouble, writeLEInt, writeLELong, writePoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

protected double x
The x coordinate.


y

protected double y
The y coordinate.


ii

protected ImageIcon ii
A BufferedImage to use at the point.

Constructor Detail

ESRIPointRecord

public ESRIPointRecord(double x,
                       double y)
Initializes this point from the given point.

Parameters:
x - the x coordinate
y - the y coordinate

ESRIPointRecord

public ESRIPointRecord(byte[] b,
                       int off)
                throws IOException
Initialize a point record from the given buffer.

Parameters:
b - the buffer
off - the offset into the buffer where the data starts

ESRIPointRecord

public ESRIPointRecord(byte[] b,
                       int off,
                       ImageIcon imageIcon)
                throws IOException
Initialize a point record from the given buffer.

Parameters:
b - the buffer
off - the offset into the buffer where the data starts
Method Detail

getBoundingBox

public ESRIBoundingBox getBoundingBox()
Gets this record's bounding box.

Specified by:
getBoundingBox in class ESRIRecord
Returns:
a bounding box

getRecordLength

public int getRecordLength()
Yields the length of this record's data portion. Always 20.

Specified by:
getRecordLength in class ESRIRecord
Returns:
number of bytes equal to the size of this record's data

write

public int write(byte[] b,
                 int off)
Writes this point to the given buffer at the given offset.

Overrides:
write in class ESRIRecord
Parameters:
b - the buffer
off - the offset
Returns:
the number of bytes written

getShapeType

public int getShapeType()
Gets this record's shape type as an int. Shape types are enumerated on the ShapeUtils class.

Specified by:
getShapeType in class ESRIRecord
Returns:
the shape type as an int


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.