org.geotools.shapefile
Class PointHandler
java.lang.Object
org.geotools.shapefile.PointHandler
- All Implemented Interfaces:
- ShapeHandler
public class PointHandler
- extends java.lang.Object
- implements ShapeHandler
Wrapper for a Shapefile point.
getLength() modified by Michaël MICHAUD on 3 nov. 2004 to handle properly
Point, PointM and PointZ length
|
Method Summary |
int |
getLength(com.vividsolutions.jts.geom.Geometry geometry)
Calcuates the record length of this object. |
int |
getShapeType()
Returns the shapefile shape type value for a point |
com.vividsolutions.jts.geom.Geometry |
read(EndianDataInputStream file,
com.vividsolutions.jts.geom.GeometryFactory geometryFactory,
int contentLength)
|
void |
write(com.vividsolutions.jts.geom.Geometry geometry,
EndianDataOutputStream file)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PointHandler
public PointHandler(int type)
throws InvalidShapefileException
- Throws:
InvalidShapefileException
PointHandler
public PointHandler()
read
public com.vividsolutions.jts.geom.Geometry read(EndianDataInputStream file,
com.vividsolutions.jts.geom.GeometryFactory geometryFactory,
int contentLength)
throws java.io.IOException,
InvalidShapefileException
- Specified by:
read in interface ShapeHandler
- Throws:
java.io.IOException
InvalidShapefileException
write
public void write(com.vividsolutions.jts.geom.Geometry geometry,
EndianDataOutputStream file)
throws java.io.IOException
- Specified by:
write in interface ShapeHandler
- Throws:
java.io.IOException
getShapeType
public int getShapeType()
- Returns the shapefile shape type value for a point
- Specified by:
getShapeType in interface ShapeHandler
- Returns:
- int Shapefile.POINT
getLength
public int getLength(com.vividsolutions.jts.geom.Geometry geometry)
- Calcuates the record length of this object.
- Specified by:
getLength in interface ShapeHandler
- Returns:
- int The length of the record that this shapepoint will take up in a shapefile