com.partnersoft.io.formats.shapefile
Class ShapefileBuilder

java.lang.Object
  extended by com.partnersoft.io.formats.shapefile.ShapefileBuilder
All Implemented Interfaces:
ShapefileConstants

public class ShapefileBuilder
extends java.lang.Object
implements ShapefileConstants

Incrementally builds a shapefile.

Author:
Paul Reavis Copyright 2003-2004 Partner Software, Inc.

Field Summary
 
Fields inherited from interface com.partnersoft.io.formats.shapefile.ShapefileConstants
ARCINFO_ARC, ARCINFO_ARCMAYBE, MULTIPATCH, MULTIPOINT, MULTIPOINTM, MULTIPOINTZ, NULLSHAPE, POINT, POINTM, POINTZ, POLYGON, POLYGONM, POLYGONZ, POLYLINE, POLYLINEM, POLYLINEZ, shapeNames, WHATZIT4, WHATZIT9
 
Constructor Summary
ShapefileBuilder()
           
ShapefileBuilder(java.lang.String path, int type)
           
ShapefileBuilder(java.lang.String path, int type, java.util.ArrayList fields)
           
 
Method Summary
 void addField(DBFFieldDescriptor field)
           
 void addField(java.lang.String name)
           
 void addField(java.lang.String name, int length)
           
 void close()
           
 java.util.ArrayList getFields()
           
 java.lang.String getPath()
           
 int getType()
           
 void setFields(java.util.ArrayList newDefs)
           
 void setPath(java.lang.String newPath)
           
 void setType(int newType)
           
 void writePoint(double x, double y, java.util.Map data)
           
 void writePoint(Point point, java.util.Map data)
           
 void writePolyline(Polyline polyline, java.util.Map data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapefileBuilder

public ShapefileBuilder(java.lang.String path,
                        int type,
                        java.util.ArrayList fields)

ShapefileBuilder

public ShapefileBuilder()

ShapefileBuilder

public ShapefileBuilder(java.lang.String path,
                        int type)
Method Detail

getPath

public java.lang.String getPath()

setPath

public void setPath(java.lang.String newPath)

getType

public int getType()

setType

public void setType(int newType)

getFields

public java.util.ArrayList getFields()

setFields

public void setFields(java.util.ArrayList newDefs)

addField

public void addField(DBFFieldDescriptor field)

addField

public void addField(java.lang.String name,
                     int length)

addField

public void addField(java.lang.String name)

writePoint

public void writePoint(double x,
                       double y,
                       java.util.Map data)
                throws java.io.IOException
Throws:
java.io.IOException

writePoint

public void writePoint(Point point,
                       java.util.Map data)
                throws java.io.IOException
Throws:
java.io.IOException

writePolyline

public void writePolyline(Polyline polyline,
                          java.util.Map data)
                   throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException