new CartoSql()
Class to create features from Carto SQL API data. This format requires the presence of a WTK geometry in the source data with the column name wkt_geom.
Extends
- ol.format.Feature
Methods
-
<static> createSql(options)
-
Create a Carto SQL API query. If a select clause is provided it must include a wkt_geom column.
Parameters:
Name Type Description optionsmodule:nyc/ol/format/CartoSql~CartoSql.Options Options
- Source:
Returns:
SQL statement
- Type
- string
-
getType()
-
Return format type
- Source:
Returns:
The format type
- Type
- ol.format.FormatType
-
readFeature(source)
-
Read a single feature from a source
Parameters:
Name Type Description sourceObject A row from a Carto SQL data source
- Source:
Returns:
Feature
- Type
- ol.Feature
-
readFeatures(source)
-
Read all features from a source
Parameters:
Name Type Description sourcestring Response from a Carto SQL data source
- 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
Type Definitions
-
Options
-
Options for module:nyc/ol/format/CartoSql~CartoSql#createSql
Type:
- Object
- Source:
Properties:
Name Type Argument Description selectstring <optional>
The SQL select clause
fromstring The SQL from clause
wherestring <optional>
The SQL where clause