org.geotools.shapefile
Class NullShapeHandler

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

public class NullShapeHandler
extends java.lang.Object
implements ShapeHandler

Null Shape handler for files containing only null shapes.


Constructor Summary
NullShapeHandler()
           
NullShapeHandler(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

NullShapeHandler

public NullShapeHandler(int type)
                 throws InvalidShapefileException
Throws:
InvalidShapefileException

NullShapeHandler

public NullShapeHandler()
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 a null shape (in 16 bits 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