org.geotools.shapefile
Class PointHandler

java.lang.Object
  extended by org.geotools.shapefile.PointHandler
All Implemented Interfaces:
ShapeHandler

public class PointHandler
extends java.lang.Object
implements ShapeHandler

Wrapper for a Shapefile Point.


Constructor Summary
PointHandler()
           
PointHandler(int type)
           
 
Method Summary
 com.vividsolutions.jts.geom.Geometry getEmptyGeometry(com.vividsolutions.jts.geom.GeometryFactory factory)
          Return a empty geometry.
 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
 

Constructor Detail

PointHandler

public PointHandler(int type)
             throws InvalidShapefileException
Throws:
InvalidShapefileException

PointHandler

public PointHandler()
Method Detail

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:
the length of the record that this point will take up in a shapefile (in WORDS)

getEmptyGeometry

public com.vividsolutions.jts.geom.Geometry getEmptyGeometry(com.vividsolutions.jts.geom.GeometryFactory factory)
Return a empty geometry.

Specified by:
getEmptyGeometry in interface ShapeHandler