QgsSipUtils.isPyOwned will return True if an object is owned
by python, or False if ownership is held by another object
or c++ class.
This gives a way to test in advance if we can safely assign
an object to a method which takes ownership (which always results
in a crash).
Deprecate old methods and make methods always take QgsSldExportContext.
Add capacity to QgsSldExportContext to collect export errors and
warnings.
The old API had no way to reliably report errors/warnings during
export to users.
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.
- 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
Adds:
- QgsCoordinateReferenceSystem::createGeocentricCrs, which takes
an ellipsoid acronym and builds a matching geocentric CRS
- QgsCoordinateReferenceSystem::toGeocentricCrs, which takes
an existing CRS and returns a corresponding geocentric CRS with
the same datum/datum ensemble
Always calculates the scale at the equator, regardless of the
actual visible map extent.
This method can be used to provide a consistent, static scale for
maps in geographic reference systems, regardless of the latitudes
actually visible in the map (permitting consistent appearance of
these maps when rendering relies on scale based visibility or
calculations). Otherwise a project in eg EPSG:4326 which uses
scale based visibility of layers and symbols will see layers
and features "randomly" disappear as the map is panned, even
though the user has not zoomed in or out of the map.
This method is only applicable when calculating scales with a
degree based reference system.
This is a new navigation mode for QgsCameraController which is meant to work
just like the terrain-based navigation mode, but for 3D scenes with globe.
Initially, the new navigation mode can handle:
- zooming in/out with mouse wheel
- orbit around globe when dragging with left mouse button pressed
- left/right/up/down keys to orbit around globe
- shift + left/right keys to change heading angle
- shift + up/down keys to change pitch angle
- page up/page down keys to increase/decrease elevation
For camera pose, we use QgsCameraPose as for "flat" scenes, but the QCamera
is positioned/rotated slightly differently - the main change is that in case
of globe, we use ECEF coordinates of the camera pose's center point, convert
them to lat/lon coordinates in order to set up initial rotation of the camera
so that it is perpendicular to the tangent plane at the given ECEF coordinate.
Creates a URI for use with QgsVectorLayerExporter corresponding to given destination
table options for the backend. The URI format and extra options which
need to be passed to QgsVectorLayerExporter differ from provider to
provider, so this new method gives us a consistent, generic method we
can call to safely generate the right URI and options in a
cross-provider way.
Implemented for all database connection providers.