|
NVS Shapefile library Version 3.2 NVision Solutions, Inc. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.nvs.shapefile.ShapeObject
A ShapeObject represents a shape record within a Shapefile.
| Field Summary | |
static int |
MULTIPOINT
Shape type value of a MultiPoint shapefile type descriptor (8) |
static int |
POINT
Shape type value of a Point shapefile type descriptor (1) |
static int |
POLYGON
Shape type value of a Polygon shapefile type descriptor (5) |
static int |
POLYLINE
Shape type value of a PolyLine shapefile type descriptor (3) |
static int |
UNDEFINED
User didn't specify what sort of shape this is supposed to be |
| Constructor Summary | |
ShapeObject()
Creates a new ShapeObject with an UNDEFINED type |
|
ShapeObject(int type)
Creates a new ShapeObject with the specified type |
|
| Method Summary | |
void |
addPart(int part)
Adds the specified part |
void |
addPoint(com.nvs.shapefile.Point point)
Adds the specified point to this ShapeObject |
void |
computeExtents()
Computes the minimum extents for this ShapeObject and sets its BoundingBox to them |
com.nvs.shapefile.BoundingBox |
getBoundingBox()
Returns this ShapeObject's BoundingBox |
int |
getPart(int index)
Returns the part at the specified index |
int |
getPartCount()
Returns the number of parts in this ShapeObject |
java.util.ArrayList |
getParts()
Returns this ShapeObject's parts as an ArrayList |
com.nvs.shapefile.Point |
getPoint(int index)
Returns the point at the specified index |
int |
getPointCount()
Returns the number of points in this ShapeObject |
java.util.ArrayList |
getPoints()
Returns this ShapeObject's Points as an ArrayList |
com.nvs.shapefile.Record |
getRecord()
Returns this ShapeObject's Record |
int |
getType()
Returns this ShapeObject's type |
void |
removePart(int index)
Removes the part at the specified index |
void |
removePoint(int index)
Removes the point at the specified index |
void |
setBoundingBox(com.nvs.shapefile.BoundingBox box)
Sets this ShapeObject's BoundingBox |
void |
setParts(java.util.Collection parts)
Sets the parts of this ShapeObject to those in the specified Collection |
void |
setPoints(java.util.Collection points)
Sets this ShapeObject's Points to those in the specified Collection |
void |
setRecord(com.nvs.shapefile.Record record)
Sets this ShapeObject's Record |
void |
setType(int type)
Sets the type of this ShapeObject |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int UNDEFINED
public static final int POINT
public static final int MULTIPOINT
public static final int POLYLINE
public static final int POLYGON
| Constructor Detail |
public ShapeObject()
public ShapeObject(int type)
type - the desired type of the ShapeObject | Method Detail |
public void addPoint(com.nvs.shapefile.Point point)
point - Point to be added
public void removePoint(int index)
throws java.lang.IndexOutOfBoundsException
index - Index of point to be removed
java.lang.IndexOutOfBoundsException - when the index is out of bounds
public com.nvs.shapefile.Point getPoint(int index)
throws java.lang.IndexOutOfBoundsException
index - Desired index as an int
java.lang.IndexOutOfBoundsException - when the index is out of boundspublic java.util.ArrayList getPoints()
public void setPoints(java.util.Collection points)
points - New Points as a Collection of Point objectspublic void addPart(int part)
part - Part to be added as an int
public void removePart(int index)
throws java.lang.IndexOutOfBoundsException
index - Index of part to be removed
java.lang.IndexOutOfBoundsException - when the index is out of bounds
public int getPart(int index)
throws java.lang.IndexOutOfBoundsException
index - Index of desired part as an int
java.lang.IndexOutOfBoundsException - when index is out of boundspublic void setParts(java.util.Collection parts)
parts - New parts as a Collection of intspublic java.util.ArrayList getParts()
public int getType()
public void setType(int type)
type - New type as an int
legal type values are: public com.nvs.shapefile.Record getRecord()
public void setRecord(com.nvs.shapefile.Record record)
record - New Recordpublic void setBoundingBox(com.nvs.shapefile.BoundingBox box)
box - New BoundingBoxpublic com.nvs.shapefile.BoundingBox getBoundingBox()
public int getPointCount()
public int getPartCount()
public void computeExtents()
|
NVS Shapefile library Version 3.2 NVision Solutions, Inc. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||