class CsvReader extends java.lang.Object implements Reader
Read a CSV String, File, or InputStream and create a Layer.
String csv = """"geom","name","price" "POINT (111 -47)","House","12.5" "POINT (121 -45)","School","22.7" """ CsvReader reader = new CsvReader() Layer layer = reader.read(csv)
Modifiers | Name | Description |
---|---|---|
static enum |
CsvReader.Type |
The geometry encoding type. |
Constructor and description |
---|
CsvReader(Map options) Read a CSV dataset with the geometry encoded as WKT. |
CsvReader(Map options, java.lang.String xColumn, java.lang.String yColumn, GpxReader.Type type) Read a CSV dataset with the geometry encoded in separate x and y columns. |
CsvReader(Map options, java.lang.String column) Read a CSV dataset with the geometry encoded as WKT. |
CsvReader(Map options, java.lang.String column, GpxReader.Type type) Read a CSV dataset with the geometry encoded as WKT. |
Type Params | Return Type | Name and description |
---|---|---|
|
Layer |
read(Map options, java.io.InputStream input) Read a GeoScript Layer from an InputStream |
|
Layer |
read(Map options, java.io.File file) Read a GeoScript Layer from a File |
|
Layer |
read(Map options, java.lang.String str) Read a GeoScript Layer from a String |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Read a CSV dataset with the geometry encoded as WKT. The CSV data is inspected in order to discover the name of the geometry column.
options
- The CSV reader options (separator and quote)Read a CSV dataset with the geometry encoded in separate x and y columns.
options
- The CSV reader options (separator and quote)xColumn
- The x column nameyColumn
- The y column nameRead a CSV dataset with the geometry encoded as WKT.
options
- The CSV reader options (separator and quote)column
- The name of the geometry columnRead a CSV dataset with the geometry encoded as WKT.
options
- The CSV reader options (separator and quote)column
- The name of the geometry columnRead a GeoScript Layer from an InputStream
options
- The optional named parameters:
input
- An InputStreamRead a GeoScript Layer from a File
options
- The optional named parameters:
file
- A FileRead a GeoScript Layer from a String
options
- The optional named parameters:
str
- A String