Class SHPFileWrite

java.lang.Object
org.gvsig.fmap.dal.store.shp.utils.SHPFileWrite

public class SHPFileWrite extends Object
  • Constructor Details

  • Method Details

    • close

      public void close() throws org.gvsig.fmap.dal.exception.WriteException
      Close the underlying Channels.
      Throws:
      org.gvsig.fmap.dal.exception.WriteException
    • writeHeaders

      public void writeHeaders(org.gvsig.fmap.geom.primitive.Envelope bounds, int type, int numberOfGeometries, int fileLength) throws org.gvsig.fmap.dal.exception.WriteException
      Writes shape header (100 bytes)
      Throws:
      org.gvsig.fmap.dal.exception.WriteException
    • writeIGeometry

      public int writeIGeometry(org.gvsig.fmap.geom.Geometry g) throws org.gvsig.fmap.dal.exception.WriteException
      Throws:
      org.gvsig.fmap.dal.exception.WriteException
    • writeGeometry

      public int writeGeometry(org.gvsig.fmap.geom.Geometry g) throws org.gvsig.fmap.dal.exception.WriteException
      Writes a single Geometry.
      Parameters:
      g -
      Returns:
      the position of buffer (after the last geometry, it will allow you to write the file size in the header.
      Throws:
      org.gvsig.fmap.dal.exception.WriteException
    • getShapeType

      public int getShapeType(int geometryType, int geometrySubType)
      Returns a shapeType compatible with shapeFile constants from a gvSIG's IGeometry type
      Parameters:
      geometryType -
      Returns:
      a shapeType compatible with shapeFile constants from a gvSIG's IGeometry type
    • size

      public int size() throws IOException
      Throws:
      IOException