The simplification MUST be applied prior to transforming geometries,
or the precalculated simplification tolerance will no be correct
and may be excessive (eg when the simplification tolerance
was calculated for a map in meters, yet the rendered layer is
in degrees -- in this case we would simplify the inverted geometry
with a tolerance of ~1 degree!)
Ensure that we apply the simplification FIRST, then transform,
and disable further simplification when rendering the calculated
inverted feature. This is also a performance boost, because we
are simplifying geometries prior to transforming + calculating
the inversion, so usually end up with a lot less vertices
to handle in those operations...
And API mechanism to propagate these from layout exports down
to the render context
Gives us a place to specify fine-tuned control over masking
settings for map renders
If the 'map/maskBackend' QSettings key is set to 'geometry', then
QgsGeometryPaintEngine will be used for calculating clip paths
for label masking instead of QPainterPath
The intention here is that we gain improved flexibility to optimise
the creation and logic behind clipping path generation, vs the
limited API we get from QPainterPath.
progress preview render results while drawing the layer, which
differ from the final layer render
The immediate use case here is for rendering tiled scene layers.
In order to generate the actual final render for these layers,
we need to first fetch ALL content for the render and then sort
the primitives by z value. But this means that the layer renders
can be extremely slow, with no visible changes on the map until
all the content fetching is complete. Not great user experience!
Instead, here we add the infrastructure so that a layer renderer
can get a temporary image to paint to for any partial renders.
This image gets used during map composition up until the layer
finally finishes rendering, at which time the layer's actual
destination image will be used for the composition.
This means that tiled scene renderers can now draw all tiles
(with unsorted primitives, and the artifacts which come with
that) as soon as we fetch each tile. This gives the user an
immediate visual reflection that the tiles are being fetched
and that how quickly (or slowly) that is happening. As soon
as we've got all tiles, the layer render will be immediately
switched to the version in which all content is rendered
in the correct z order.
As a bonus, we draw these temporary in progress renders
over any previously transformed cache version of the layer
available. So eg when you zoom in, you'll get a zoomed in pixelated
version of the last render which gets progressively drawn
over with each tile as it is fetched.
This same API could be used in future eg with point cloud
rendering when points are being sorted by z value to give
timely visual feedback.
* QgsShadingRendering and pipe to render global elevation map
* gdal utils with datatype and resampling method enum
* raster layer elevation map
* optimize raster elevation map with rotation
* handle no data value in the map elevation raster pipe
* mesh layer and some little fixes
* fix nodata and hillshading z factor
* render shading on layout
* activate/deactivate the shading from ui
* shading only for layer that have elevation
* apply Z scale and offset of layer elevation properties
* ui settings
* allow elevation from point cloud even edl is deactivate for pointcloud
* fix ui
* sipify
* Shading renderer widget in styling panel
* icone for shading renderer settings widget
* two methods to combin elevation
* rewording
* remove check box at the bottom of canvas
* use band of elevation properties
* fix styling pannel
* render shading in layout
* keep EDL point cloud shading individually
* add shading rendering tests
* add missing code for local EDL for point cloud
* shading inactive by default
* rework raster layer resampling
* improve nodata in elevation map
* don't allow elevation map with != size to be combined
* remove EDL from point cloud
* renaming
* sipify
* colorize tests
* renaming
* RGB32
* renaming leftover
* some ui fixes
* fix border for EDL alg
* fix EDL closed next to nodata value
* fix first shading when activated
* renaming and typo
* fixes for doc, doxygen, indentation and spelling
* remove leftover member
* fix clang-tidy
* fix edl tests
* fix dll export
* minor fixes
* adapt images of tests
* fix narrowing
* fix indentation
* sipify
* WIP
* minor ui changes
for cancelation check support
While there is the existing QgsRenderContext::renderingStopped()
check, this doesn't play well with other parts of QGIS which utilise
a QgsFeedback object for cancelation support. By adding support
for a proper QgsFeedback object in render contexts then it becomes
trivial to pass this on to feature requests, expression contexts,
and other potentially expensive functions so that these can
all be canceled responsively too.
(At some stage in the future we should consider deprecating
QgsRenderContext::rendereringStopped(), but that's not done here)
Gives a means of setting the reference scale for a vector layer
renderer, so that symbol sizes in the rendered layer will be
scaled accordingly depending on the actual scale of the
rendered map.
This should match the desired scale denominator for the rendered map,
eg 1000.0 for a 1:1000 map render. Set (by default) to -1 to disable
symbology scaling by reference scale.
The symbology reference scale is an optional property which specifies
the reference scale at which symbology in paper units (such as
millimeters or points) is fixed to. For instance, if \a scale is set
to 1000 then a 2mm thick line will be rendered at exactly 2mm thick
when a map is rendered at 1:1000, or 1mm thick when rendered at
1:2000, or 4mm thick at 1:500.
Allows for map renders to be filtered by a z or elevation range,
such that only parts of the layer which are considered within
this range will be rendered.
Implements https://github.com/qgis/QGIS-Enhancement-Proposals/issues/201
*Requires support for respecting the QgsRenderContext zRange to be added
to the relevant map layer renderers
extent and have had to resort to fetching all features from a layer,
defer the geometry clipping the map extent so that it occurs
AFTER transforming the layer's geometries to the target map extent.
This allows us to correctly clip the feature geometries in the case
that the visible extent available from the render context for the layer
is not accurate (i.e. it's a whole of globe fallback), and avoids
rendering features which fall far outside of the visible map
region.
Fixes#38878
We don't need the whole expense of the "Avoid artifacts when rendering as map tiles"
option, because that disables to default clipping of geometry parts which fall
outside the visible canvas extent and accordingly results in a lot of wasted rendering
calculations. Instead, we can just always use the upper left corner of the original
feature geometry before the optimisations like clipping to visible regions are applied,
and use this as the texture origin.
This means we can safely make this handling always applied and not an opt-in setting
method when exporting layouts to PDF
Options are for Lossy compression, which is the default JPEG compression
used, and Lossless compression (which creates bigger files in most
cases, but is much more suitable for professional printing outputs
or for post-production in Illustrator/etc)
The Bad news: this option is available in builds based on Qt 5.14
or later.
occurring for drawing a symbol preview
Because these have no map association, certain settings like
sizes in "meters in map units" will have no meaning, and may need
special handling
Refs #28690