With this new method code, it is now possible to use
`QgsProject::removeMapLayers` with a list of layers or a list of
layers IDs in qt5 and qt6.
Co-authored-by: bdm-oslandia <benoit.de.mezzo@oslandia.com>
Adds an API which an algorithm can implement to support auto-setting
parameter values. This is designed to handle the case
of eg an algorithm which does a file format translation, where
it's desirable to default the output parameter value to an input
parameter value with a different extension.
This can now be done by implementing autogenerateParameterValues
in the algorithm, eg:
def autogenerateParameterValues(self, existingParameters, changedParameter, mode):
if changedParameter == self.INPUT:
input_file = existingParameters.get(self.INPUT)
if input_file:
input_path = Path(input_file)
if input_path.exists():
# auto set output parameter to same as input but with 'qgs' extension
return {self.OUTPUT: input_path.with_suffix('.qgs').as_posix()}
return {}
Works for both toolbox and batch modes for algorithms
Improves the appearance of labels in situations like road networks,
where things like dual carriageways, service roads, etc can result
in many labels of the exact same text appearing close to each other.
When active, removes any labels with the exact same text (case
sensitive!) which are closer then this minimum distance.
The setting applies across layers, so duplicate text from ANY
layer will be considered.
Fixes#61476 / #61493
The analysis of DescribeFeatureType response with the GMLAS driver makes
appear fields that are not supported by the
addFeatures()/changeAttributeValues() method. So if transaction support
is detected and featureMode=default, use QGIS built-in analyser to get
SimpleFeatures only. Otherwise try the GMLAS method.
We can't rely on sip to generate these -- it outputs malformed
docstrings where the constructor docs are incorrectly placed
before the class docstrings
Allows legend text to be automatically wrapped after a set
line length (in millimeters).
This can prevent very wide auto-generated legends.
Sponsored by North Road, thanks to SLYR
- Deprecate global geographic crs strings, these should not be used
- Move some global constants to Qgis, and monkey patch for
API compatibility
- Deprecate global qgsVsiPrefix. Use QgsGdalUtils::vsiPrefixForPath()
instead