A representation of a layer of simple vector features, with access methods.
Table of Contents
Flush pending changes to disk.
Fetch the extent of this layer.
This method returns the current spatial filter for this layer.
Sets the attribute query string to be used when fetching features via the
layer.features.next() method. Only features for which the query evaluates as
true will be returned.
The query string should be in the format of an SQL WHERE clause. For instance
"population > 1000000 and population < 5000000" where
population is an
attribute in the layer. The query format is normally a restricted form of
SQL WHERE clause as described in the "WHERE" section of the OGR SQL
tutorial. In some cases (RDBMS backed
drivers) the native capabilities of the database may be used to interprete
the WHERE clause in which case the capabilities will be broader than those
of OGR SQL.
layer.setAttributeFilter('population > 1000000 and population < 5000000');
This method sets the geometry to be used as a spatial filter when fetching
features via the
layer.features.next() method. Only features that geometrically
intersect the filter geometry will be returned.
Alernatively you can pass it envelope bounds as individual arguments.
layer.setSpatialFilter(geometry); layer.setSpatialFilter(minX, minY, maxX, maxY);
Determines if the dataset supports the indicated operation.
(see capability list)