Class: QgsGml¶
Reads data from a WFS server or alternatively from a GML file.
It uses the expat XML parser and an event based model to keep performance high. The parsing starts when the first data arrives, it does not wait until the request is finished.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Methods
Returns the spatial reference system for features. |
|
Gets parsed features for given type name |
|
Read from GML data. |
|
Does the HTTP GET request to the WFS server |
|
Gets feature ids map |
Signals
Emitted when data reading progresses or the total number of bytes to read changes. |
|
Emitted when data reading progresses. |
|
Emitted when the total number of bytes to read changes. |
- class qgis.core.QgsGml[source]¶
Bases:
QObject- crs(self) QgsCoordinateReferenceSystem[source]¶
Returns the spatial reference system for features.
- Return type:
- signal dataProgressAndSteps(progress: int, totalSteps: int)[source]¶
Emitted when data reading progresses or the total number of bytes to read changes.
- Parameters:
progress (int) – specifies the number of bytes processed so far
totalSteps (int) – specifies the total number of bytes which must be processed
- signal dataReadProgress(progress: int)[source]¶
Emitted when data reading progresses.
- Parameters:
progress (int) – specifies the number of bytes processed so far
- getFeatures(self, data: QByteArray | bytes | bytearray | memoryview, extent: QgsRectangle | None = None)[source]¶
Read from GML data.
The constructor uri param is ignored.
- Parameters:
data (Union[QByteArray, bytes, bytearray, memoryview])
extent (Optional[QgsRectangle] = None)
- Return type:
(int, Optional[Qgis.WkbType])
- getFeaturesUri(self, uri: str | None, extent: QgsRectangle | None = None, userName: str | None = '', password: str | None = '', authcfg: str | None = '')¶
Does the HTTP GET request to the WFS server
- Parameters:
uri (Optional[str]) – GML URL
wkbType – wkbType to retrieve
extent (Optional[QgsRectangle] = None) – retrieved extents
userName (Optional[str] = '') – username for authentication
password (Optional[str] = '') – password for authentication
authcfg (Optional[str] = '') – authentication configuration id
- Return type:
(int, Optional[Qgis.WkbType])
- Returns:
0 in case of success