public class ShapefileWriter
extends java.lang.Object
name.shp containing the geometry; name.shx
containing the file offsets for the components that make up the geometry; and
name.dbf containing the attributes. If a geoMap object contains more than one
object type (point, line or area), a triplet of files is written for each type.| Constructor and Description |
|---|
ShapefileWriter(GeoMap geoMap,
processing.core.PApplet parent)
Creates the object capable of writing the given geoMap object as a shapefile.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
write(java.lang.String fileName)
Writes out one or more shapefiles representing the geoMap object supplied to the constructor.
|
protected static boolean |
writeDoubleLittleEndian(double value,
java.io.OutputStream os)
Writes a little-endian 8-byte double to the given output stream.
|
protected static boolean |
writeIntLittleEndian(int value,
java.io.OutputStream os)
Writes a 32 bit unsigned little-endian ('Intel') word of data to the
given output stream.
|
public ShapefileWriter(GeoMap geoMap, processing.core.PApplet parent)
geoMap - geoMap object to write.parent - Parent sketch.public boolean write(java.lang.String fileName)
.shp, .shx
and .dbf. If the geoMap object contains more than one type, P, L or A will be
appended to the relevant file name.fileName - Name of core of the three files to create.protected static boolean writeIntLittleEndian(int value,
java.io.OutputStream os)
value - Value to write to output stream.os - Output stream to process.protected static boolean writeDoubleLittleEndian(double value,
java.io.OutputStream os)
value - Value to write to output stream.os - Output stream.