Class: CartoSql

nyc/ol/format/CartoSql~ CartoSql


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.

Source:
See:

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
options module: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
source Object

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
source string

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
source Document | 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
Properties:
Name Type Argument Description
select string <optional>

The SQL select clause

from string

The SQL from clause

where string <optional>

The SQL where clause

Source: