Class
ShumateVectorReaderIter
since: 1.2
Description [src]
final class Shumate.VectorReaderIter : GObject.Object
{
/* No available fields */
}
Reads the layers and features of a vector tile.
To create a new ShumateVectorReaderIter
, use shumate_vector_reader_iterate()
.
A vector tile consists of named layers, which contain features. Each feature has an ID, a geometry, and a set of key/value tags. The meanings of the IDs and tags depends on the data source that the tile came from. The OpenMapTiles schema is a common schema for vector tiles.
To read all layers in a tile, use shumate_vector_reader_iter_get_layer_count()
and
shumate_vector_reader_iter_read_layer()
. If you know the name of the layer you
want, you can also use shumate_vector_reader_iter_read_layer_by_name()
.
Once the iterator is reading a layer, you can call
shumate_vector_reader_iter_next_feature()
in a loop to read all the features in
the layer.
A ShumateVectorReaderIter
is not thread-safe, but iterators created
from the same ShumateVectorReader
can be used in different threads.
See the Mapbox Vector Tile specification for more information about the vector tile format.
Available since: 1.2
Instance methods
shumate_vector_reader_iter_feature_contains_point
Determines whether the current feature contains the given point.
since: 1.2
shumate_vector_reader_iter_get_feature_geometry_type
Gets the geometry type of the current feature.
since: 1.2
shumate_vector_reader_iter_get_feature_keys
Gets the keys of the tags of the current feature.
since: 1.2
shumate_vector_reader_iter_get_feature_point
Gets the coordinates of the current feature in tile space, if the feature is a single point.
since: 1.2
shumate_vector_reader_iter_get_layer_extent
Gets the extent for coordinates in the current layer.
since: 1.2
shumate_vector_reader_iter_get_layer_feature_count
Gets the number of features in the current layer.
since: 1.2
shumate_vector_reader_iter_get_reader
Gets the reader that the iterator is iterating over.
since: 1.2
shumate_vector_reader_iter_next_feature
Advances the iterator to the next feature in the current layer.
since: 1.2
shumate_vector_reader_iter_read_feature
Moves the iterator to the feature at the given index in the current layer.
since: 1.2
shumate_vector_reader_iter_read_layer
Sets the current layer of the reader to the layer at the given index.
since: 1.2
shumate_vector_reader_iter_read_layer_by_name
Moves the iterator to the layer with the given name, if present.
since: 1.2
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.