new CsvPoint(options)
Class to create point features from CSV data
Parameters:
| Name | Type | Description |
|---|---|---|
options |
module:nyc/ol/format/CsvPoint~CsvPoint.Options | Constructor options |
Extends
- ol.format.Feature
Methods
-
detectCsvFormat(source)
-
Detect CSV columns and projection based on standard format
Parameters:
Name Type Description sourceObject.<string, Object> Parsed CSV data
- Source:
-
getType()
-
Return format type
- Source:
Returns:
The format type
- Type
- ol.format.FormatType
-
readFeature(source [, options])
-
Read a single feature from a source
Parameters:
Name Type Argument Description sourceObject A row from a CSV data source
optionsolx.format.ReadOptions <optional>
Read options
- Source:
Returns:
Feature
- Type
- ol.Feature
-
readFeatures(source [, options])
-
Read all features from a source
Parameters:
Name Type Argument Description sourceObject Rows from a CSV data source
optionsolx.format.ReadOptions <optional>
Read options
- Source:
Returns:
Features
- Type
- Array.<ol.Feature>
-
readProjection(source)
-
Read the projection from a source
Parameters:
Name Type Description sourceDocument | Node | Object | string Source
- Source:
Returns:
The projection
- Type
- ol.proj.Projection
-
setGeometry(feature, source [, options])
-
Set the feature geometry
Parameters:
Name Type Argument Description featureol.Feature The feature
sourceObject.<string, string> A row from a CSV data source
optionsolx.format.ReadOptions <optional>
Read options
- Source:
Type Definitions
-
Options
-
Constructor options for module:nyc/ol/format/CsvPoint~CsvPoint
Type:
- Object
- Source:
Properties:
Name Type Argument Default Description autoDetectboolean <optional>
false Attempt to determine standard column names and projection
xstring <optional>
The name of the field containing the x ordinate of the point
ystring <optional>
The name of the field containing the y ordinate of the point
idstring <optional>
The name of the field containing the unique id of the point
dataProjectionol.ProjectionLike <optional>
EPSG:4326 The projection of the source data
featureProjectionol.ProjectionLike <optional>
EPSG:3857 The projection of the resulting features