org.opengts.extra.shapefile
Class ShapefileSet

java.lang.Object
  extended by org.opengts.extra.shapefile.ShapefileSet

public class ShapefileSet
extends java.lang.Object


Nested Class Summary
static class ShapefileSet.ZipOutput
           
 
Field Summary
static java.lang.String[] ARG_ENTRY_NAME
           
static java.lang.String[] ARG_FILE
           
static java.lang.String[] ARG_SAVEAS
           
static java.lang.String MIME_TYPE_ZIP
           
 
Constructor Summary
ShapefileSet()
          Create new shapefile
ShapefileSet(java.lang.String filePfx)
          Load existing shapefile
 
Method Summary
 void addField(Field fld)
           
 void addPoint(GeoPoint gp, java.lang.String... fieldValues)
           
 void addPolygon(GeoPolygon gp, java.lang.String... fieldValues)
           
 void addStringField(java.lang.String name, int len)
           
 byte[] createZipByteArray(java.lang.String entryDirName, java.lang.String entryFileName)
           
 int getShapeCount()
           
 boolean isEmpty()
           
static void main(java.lang.String[] argv)
           
 boolean saveAs(java.io.File zipFile)
          Save as specified zip file
 java.lang.String toString()
          Gets a String representation of this instance
 void writeToZipOutput(ShapefileSet.ZipOutput zo, java.lang.String entryDirName, java.lang.String entryFileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MIME_TYPE_ZIP

public static final java.lang.String MIME_TYPE_ZIP
See Also:
Constant Field Values

ARG_FILE

public static final java.lang.String[] ARG_FILE

ARG_ENTRY_NAME

public static final java.lang.String[] ARG_ENTRY_NAME

ARG_SAVEAS

public static final java.lang.String[] ARG_SAVEAS
Constructor Detail

ShapefileSet

public ShapefileSet()
Create new shapefile


ShapefileSet

public ShapefileSet(java.lang.String filePfx)
             throws java.io.IOException
Load existing shapefile

Throws:
java.io.IOException
Method Detail

addField

public void addField(Field fld)

addStringField

public void addStringField(java.lang.String name,
                           int len)

addPoint

public void addPoint(GeoPoint gp,
                     java.lang.String... fieldValues)

addPolygon

public void addPolygon(GeoPolygon gp,
                       java.lang.String... fieldValues)

getShapeCount

public int getShapeCount()

isEmpty

public boolean isEmpty()

writeToZipOutput

public void writeToZipOutput(ShapefileSet.ZipOutput zo,
                             java.lang.String entryDirName,
                             java.lang.String entryFileName)
                      throws java.io.IOException
Throws:
java.io.IOException

createZipByteArray

public byte[] createZipByteArray(java.lang.String entryDirName,
                                 java.lang.String entryFileName)

saveAs

public boolean saveAs(java.io.File zipFile)
Save as specified zip file


toString

public java.lang.String toString()
Gets a String representation of this instance

Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] argv)