class CsvWriter extends java.lang.Object
Write a geoscript.layer.Layer to a CSV String.
def layer = new Shapefile("states.shp") CsvWriter writer = new CsvWriter() String csv = writer.write(layer)
Modifiers | Name | Description |
---|---|---|
static enum |
CsvWriter.Type |
How to encode the geometry |
Constructor and description |
---|
CsvWriter
(Map options) Create a CsvWriter that encodes geometry in a single column as WKT |
CsvWriter
(Map options, GpxReader.Type type) Create a CsvWriter that encodes geometry in single column |
CsvWriter
(Map options, java.lang.String xColumn, java.lang.String yColumn) Create a CsvWriter that encodes geometry in separator x and y values |
CsvWriter
(Map options, java.lang.String xColumn, java.lang.String yColumn, GpxReader.Type type) Create a CsvWriter that encodes geometry in separator x and y values |
CsvWriter
() |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
write(Layer layer, OutputStream out) Write the Layer to the OutputStream
|
|
void |
write(Layer layer, File file) Write the Layer to the File
|
|
java.lang.String |
write(Layer layer) Write the Layer to a String
|
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Create a CsvWriter that encodes geometry in a single column as WKT
options
- The CSV writer options (separator and quote)Create a CsvWriter that encodes geometry in single column
type
- The Typeoptions
- The CSV writer options (separator and quote)Create a CsvWriter that encodes geometry in separator x and y values
xColumn
- The x column nameyColumn
- The y column nameoptions
- The CSV writer options (separator and quote)Create a CsvWriter that encodes geometry in separator x and y values
xColumn
- The x column nameyColumn
- The y column nametype
- The Typeoptions
- The CSV writer options (separator and quote)Write the Layer to the OutputStream
layer
- The Layerout
- The OutputStreamWrite the Layer to the File
layer
- The Layerfile
- The FileWrite the Layer to a String
layer
- The Layer