Graphics Reference
In-Depth Information
• A geometry type that is stored in the data source
• A list of fields that provide information about the attributes stored for each fea-
ture
• The ability to search through the features within the data source, using the
getFeatures() method and the QgsFeatureRequest class
You can access the various vector (and also raster) data providers by using the
qgis.core.QgsProviderRegistry class.
The vector layer itself is represented by a qgis.core.QgsVectorLayer object.
Each vector layer includes:
Data provider : This is the connection to the underlying file or database that
holds the geospatial information to be displayed
Coordinate reference system : This indicates which CRS the geospatial data uses
Renderer : This chooses how the features are to be displayed
Let's take a closer look at the concept of a renderer and how features are displayed within
a vector map layer.
Displaying vector data
The features within a vector map layer are displayed using a combination of renderer and
symbol objects. The renderer chooses the symbol that has to be used for a given feature,
and the symbol that does the actual drawing.
There are three basic types of symbols defined by QGIS:
Marker symbol : This displays a point as a filled circle
Line symbol : This draws a line using a given line width and color
Fill symbol : This draws the interior of a polygon with a given color
These three types of symbols are implemented as subclasses of the
qgis.core.QgsSymbolV2 class:
qgis.core.QgsMarkerSymbolV2
qgis.core.QgsLineSymbolV2
qgis.core.QgsFillSymbolV2
Search WWH ::




Custom Search