|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bbn.openmap.dataAccess.shape.ShapeUtils
com.bbn.openmap.layer.shape.ESRIRecord
com.bbn.openmap.layer.shape.ESRIPolygonRecord
public class ESRIPolygonRecord
The Polygon record type. This class implements the ESRI Shapefile polygon AND arc/polyline record types.
Field Summary | |
---|---|
ESRIBoundingBox |
bounds
The bounding box. |
ESRIPoly[] |
polygons
An array of polygons. |
protected int |
shapeType
Polygon or arc/polyline?. |
Fields inherited from class com.bbn.openmap.layer.shape.ESRIRecord |
---|
contentLength, recordNumber |
Constructor Summary | |
---|---|
ESRIPolygonRecord()
|
|
ESRIPolygonRecord(byte[] b,
int off)
Initialize a polygon record from the given buffer. |
Method Summary | |
---|---|
void |
add(double[] radians)
Add a poly to the record. |
OMGeometry |
addOMGeometry(OMGeometryList list)
Generates OMGeometry and adds them to the given list. |
void |
addOMGraphics(OMGraphicList list,
DrawingAttributes drawingAttributes)
Generates 2D OMGraphics and adds them to the given list. |
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. |
boolean |
isPolygon()
Is this a polygon or a arc/polyline? |
void |
setPolygon(boolean isPolygon)
Set the poly type (polygon or arc/polyline). |
int |
write(byte[] b,
int off)
Writes this polygon to the given buffer at the given offset. |
Methods inherited from class com.bbn.openmap.layer.shape.ESRIRecord |
---|
getBinaryStoreSize, getContentLength, getRecordNumber |
Methods inherited from class com.bbn.openmap.dataAccess.shape.ShapeUtils |
---|
getStringForType, 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 |
---|
protected int shapeType
public ESRIBoundingBox bounds
public ESRIPoly[] polygons
Constructor Detail |
---|
public ESRIPolygonRecord()
public ESRIPolygonRecord(byte[] b, int off) throws java.io.IOException
b
- the bufferoff
- the offset into the buffer where the data starts
java.io.IOException
Method Detail |
---|
public boolean isPolygon()
public void setPolygon(boolean isPolygon)
public void add(double[] radians)
radians
- coordinates: y,x,y,x,... (lat,lon) order in RADIANS!public void addOMGraphics(OMGraphicList list, DrawingAttributes drawingAttributes)
addOMGraphics
in class ESRIRecord
list
- the graphics listdrawingAttributes
- the drawingAttributes to paint the poly.public OMGeometry addOMGeometry(OMGeometryList list)
addOMGeometry
in class ESRIRecord
list
- the geometry listpublic ESRIBoundingBox getBoundingBox()
getBoundingBox
in class ESRIRecord
public int getShapeType()
getShapeType
in class ESRIRecord
public int getRecordLength()
(44 + (numParts * 4) + (numPoints * 16))
3 Integers + 4 doubles == 3 * 4bytes + 4 * 8bytes == 12 + 32 == 44.
getRecordLength
in class ESRIRecord
public int write(byte[] b, int off)
write
in class ESRIRecord
b
- the bufferoff
- the offset
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |