Class SHPFileWrite
java.lang.Object
org.gvsig.fmap.dal.store.shp.utils.SHPFileWrite
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the underlying Channels.intgetShapeType(int geometryType, int geometrySubType) Returns a shapeType compatible with shapeFile constants from a gvSIG's IGeometry typeintsize()intwriteGeometry(org.gvsig.fmap.geom.Geometry g) Writes a single Geometry.voidwriteHeaders(org.gvsig.fmap.geom.primitive.Envelope bounds, int type, int numberOfGeometries, int fileLength) Writes shape header (100 bytes)intwriteIGeometry(org.gvsig.fmap.geom.Geometry g)
-
Constructor Details
-
SHPFileWrite
-
-
Method Details
-
close
public void close() throws org.gvsig.fmap.dal.exception.WriteExceptionClose 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
- Throws:
IOException
-