136 Commits

Author SHA1 Message Date
Nyall Dawson
804951ea26 [api] Expose GEOS make valid options for geos 3.10+ builds 2022-09-05 12:35:53 +10:00
Mathieu Pellerin
b20cc301e7 Implement MapGeographic vs CustomCrs 2022-09-05 11:18:38 +10:00
Mathieu Pellerin
1570643d1d [api] Add project's default coordinate display type functions +
Q_PROPERTY for coordinate display type, distance units, and area units
2022-09-05 11:18:38 +10:00
Zayne Tomlins
c7aa662662 Cleaned up docs 2022-08-10 08:04:42 +10:00
Nyall Dawson
c4cebde0f9 Add additional properties to QgsWeakRelation to match those available
through GDAL api
2022-08-02 15:44:40 +10:00
Nyall Dawson
89c613a112 Move relationship enums to Qgis, promote to enum class 2022-08-02 15:44:40 +10:00
Nyall Dawson
65f700e700 Use enum classes for ArcGIS REST service types for clarity 2022-07-21 06:46:31 +10:00
Nyall Dawson
8b15f59639 Force use of raster masking in layout designer preview
The vector masking (while great for output quality) is much slower,
so for the layout designer preview renders we just use the faster
raster approach.
2022-07-12 14:59:43 +10:00
Nyall Dawson
9b09445c08 Change project style disabling from being a project load flag
to a new project "capability"

This avoids the unwanted cost of initialising a blank style database
whenever QgsProject::clear is called and project styles are not
required (eg. for server)
2022-07-11 15:22:11 +10:00
Nyall Dawson
dd3058eb42 Add support for parsing raster sources to QgsMapBoxGlStyleConverter 2022-07-08 16:06:19 +10:00
Nyall Dawson
542015a3df Implement toggling support for selecting single features 2022-07-08 09:12:46 +10:00
Nyall Dawson
721bcaab66 Implement API for selecting features in a vector tile layer 2022-07-08 09:12:46 +10:00
Nyall Dawson
dbdacac777 [feature] Add temporal manager support for WMTS layers with TIME dimension
This enhancement exposes any WMTS "time" dimensions for use in the
temporal framework, including allowing these layers to be animated
and controlled via the temporal controller.

There's some complexity involved here, because the WMTS specification
does NOT dictate how a time dimension should be exposed by services.
So different WMTS services are all handling this in different ways,
and we need to try to be as tolerant as possible.

Specifically, WMTS dimension values are just free-form strings, so
I've encountered a range of datetime formats -- e.g. "2021", "20210203",
"2021-02-03", "2021-02-03T12:13:14Z", and even WMS(T) style time
period designations ("2021-01-03T12:13:14/2021-01-05T12:15:11/P10M")!
These different formats all need special handling in order to correctly
interpret them as a date time value, and to be able to re-encode
an arbitrary datetime value back to the format string required
by the service. It's highly likely that we'll encounter additional
format strings when this feature is rolled out, and we'll need to
handle each individually.

When we do detect a time dimension on a WMTS layer, we no longer
expose this in the same way as other non-time dimensions. The browser
panel does not show the dimension values, and adding the layer
via Data Source Manager no longer prompts the user to pick from
the available time values. Instead, these layers are indicated with
a new "time capable raster layer" icon, and are added to a project
WITHOUT the user picking a specific time value.

Just like a WMS(T) layer, when a time-dimension enabled WMTS layer
is added to the project, it will default to the "automatic" temporal
mode, meaning that the layer will follow the temporal controller's
current time range by default. A user can then opt to show a specific
static time value for the layer through the layer's Temporal properties
page, by unchecking "Dynamic Temporal Control" and picking a specific
available time range from the "Predefined date" option. (Basically,
the user interaction and experience with a WMTS time enabled layer
is identical to with a WMS(T) layer).

Fixes #48364
2022-06-18 10:22:48 +10:00
Nyall Dawson
486d3611ae Move more labeling enums to qgis 2022-06-03 18:20:03 +10:00
Nyall Dawson
7228526445 Further rework overlap/ always place label handling
- Move settings to be feature level, not layer level, and permit
data defined control of these settings
- Add additional option for overlap handling for "Always allow"
overlaps, which indicates that the user doesn't care at all
if the label overlaps other labels and that the ideal placement
should always be used for the label regardless of whether it
overlaps labels or not

To clarify further, the options are:

- Never Overlap : never ever place overlapping labels for the layer,
even if it means labels will be missing
- Allow Overls if Required: if the label can't otherwise be placed,
draw an overlapping label. This mode will cause the label to be moved
a less ideal placement if possible, e.g. moving the label further
from the center of a line or polygon, IF doing so will avoid overlapping
labels. But if there's no other positions possible, then draw the
label overlapping.
- Always Allow Overlaps": It doesn't matter at all if the label
overlaps other labels or obstacles, that's fine to do and the best
placement (e.g most central placement) should always be used even if an
alternate further placement is possible which avoids overlaps entirely.
2022-06-03 18:20:03 +10:00
Nyall Dawson
8bb64a0683 Split existing "Show all labels (including colliding labels)" into
two separate new options

This setting was ambiguous in meaning -- it could be interpreted
as either:

"I don't care about overlapping labels, use them when
you have no other choice"

OR

"I want to see labels for EVERYTHING in this layer, and I don't
care what you have to do to show me those"

This leads to situations like those discussed in #41043, where some
users interpret the setting as the first meaning and get confused
when eg. a curved label line layer starts showing horizontal placements
for some features which couldn't otherwise be labeled (eg short
lines).

So, split the setting into two new options (checkboxes) with explicit, clear
distinction:

- "Allow overlapping labels if unavoidable": This setting means labels
can be overlapping, if there's no other option. It does NOT gaurantee
that all features in the layer will have labels, because other
constraints (such as lines too short to fit a label's text) will still
be respected and may prevent labels for the feature.

- "Allow inferior fallback placements": This mode permits features
to fallback to worse placement options when there's no other choice,
e.g. when a line is too short to fit a curved label text then the
label may be placed horizontally just over the feature's center
point.

The combination of checking BOTH options WILL gaurantee that
all features in the layer are labelled, albeit with both overlapping
labels and the degraded placements!

Fixes #41043
2022-06-03 18:20:03 +10:00
Nyall Dawson
6e5a99d332 Sipify 2022-06-03 13:13:43 +10:00
Nyall Dawson
41d5e50766 Spelling 2022-06-03 12:02:13 +10:00
Nyall Dawson
c97f3ec8d6 Rename to isTransformationPossible 2022-06-03 12:02:13 +10:00
Nyall Dawson
1097f85a6c Fix typo 2022-06-03 12:02:13 +10:00
Nyall Dawson
7edcb9899e Add a constructor flag to QgsCoordinateTransform to ignore impossible
transformations, such as those which happen across different
celestial bodies

If set, the flag indicates that no user-facing warnings should be
shown and instead the transform should be short circuited
2022-06-03 12:02:13 +10:00
Nyall Dawson
0d3ae97df0 Move QgsProject enums to Qgis, and add new read flag to skip style loading
Ensure that there's no speed regression when loading projects for
server and other special cases
2022-05-17 16:36:00 +10:00
Nyall Dawson
12c01e2072 Move QgsGraduatedSymbolRenderer::GraduatedSize enum to qgis 2022-05-17 09:55:40 +10:00
Nyall Dawson
826cbe37d6 [feature] Add an "interpretation" option for vector elevation profiles
Choices are "individual features" (the default behavior) or "continuous
surface". The new Continuous Surface option is designed for vector
layers which represent a continuous elevation surface, e.g contour
lines or surveyed elevation points. When selected, the elevation
chart will be rendered as a surface instead of separate features
by joining the sampled elevation results into a continuous line.

There's also the same option exposed as for raster and mesh layers
where the appearance can be toggled from a single line to a "fill
below" symbol.

Fixes #48341
2022-05-03 12:15:02 +10:00
Nyall Dawson
f0f7ae54a6 Enum class 2022-04-29 19:58:21 +10:00
Nyall Dawson
c35d17b6e4 Move useful point cloud renderer enums to Qgis namespace 2022-04-29 19:58:21 +10:00
Denis Rouzaud
3c0ecd38e8 move enum to Qgis + remove commented code 2022-04-29 07:57:25 +10:00
Nyall Dawson
bc7fa813e5 Only refine layers which benefit from refining (i.e. rasters) 2022-04-28 13:54:47 +10:00
Nyall Dawson
d83fd31815 [sipify] Correctly handle :: in enum comments 2022-04-28 13:54:47 +10:00
Nyall Dawson
940175fc66 [feature] Add option to render raster and mesh elevation surface levels
using a fill symbol below the elevation surface

This can be easier to interpret in some cases, and helps match expected
symbology conventions in certain disciplines.
2022-04-27 17:30:14 +10:00
Nyall Dawson
5e831971cc Cleanup light source handling in API 2022-04-27 11:50:13 +10:00
Denis Rouzaud
4045e51240 [settings] add option to save enum/flag as integer instead of text 2022-04-14 08:39:15 +02:00
Nyall Dawson
141f7bf9f2 Plot wip 2022-04-07 19:22:19 +10:00
Nyall Dawson
0b8e6abb22 Add QgsCoordinateReferenceSystemUtils class, with function to determine
most appropriate x/y or y/x coordinate order for a crs
2022-04-06 16:05:08 +10:00
Nyall Dawson
28bb05b0d5 Add method to retrieve axis order for a QgsCoordinateReferenceSystem 2022-04-06 11:45:32 +10:00
Mathieu Pellerin
5bbad02806 [nmea] Convert RMC mode indicator to its equivalent signal variant to provide accurate quality description 2022-03-28 13:57:22 +07:00
Nyall Dawson
67c00fc6e5 [feature] Add opt-in setting for projects for "Remember attribute table
windows and docks between sessions"

If checked for a project, then any opened attribute tables will be
saved into the project and immediately restored when loading that
project.

Designed to improve workflows when a user has constructed a project
with a particular set of attribute table configurations for their
requirements, and re-setting up these attribute tables is a hassle.
2022-03-24 15:03:16 +10:00
Nyall Dawson
618c7f2f73 [feature] Add opt-in setting in project properties for
"Remember editable layer status between sessions"

If checked, then any layers which are editable will be remembered
when saving that project and immediately made editable whenever
the project is restored.

This is an opt-in, per-project setting. The intended use case
is for users who are making complex, data-editing focused projects.
2022-03-22 10:48:57 +10:00
Nyall Dawson
9efe9f512c Change some boolean QgsProject properties to flags instead 2022-03-22 10:48:57 +10:00
NEDJIMAbelgacem
66b3c57f2b - Fix spelling & SIP
- Fix 3D -> 2D -> 3D sync
- Fix trapezoid setting saving
2022-03-21 07:56:39 -07:00
NEDJIMAbelgacem
60144d7645 switch to flag based approach for 2D/3D sync 2022-03-21 07:56:39 -07:00
NEDJIMAbelgacem
9141d05d59 - Change extent to trapezoid shape
- Visualize the viewed area using QgsRubberBand
-  Address reviews
2022-03-21 07:56:39 -07:00
Loïc Bartoletti
94a3744521
Merge pull request #46647 from Koyaani/advanced_snapping
[Feature] New soft constraints in the advanced digitizing dock
2022-03-18 10:11:49 +01:00
Nyall Dawson
71e450be03 Apply more flexible approach to match zoom levels expected for ESRI
tiles
2022-03-14 13:39:36 +10:00
Denis Rouzaud
761a20cac6 manual monkeypatching core->gui 2022-03-11 07:47:46 +01:00
Denis Rouzaud
f32ecd4730 move QgsMapToolCapture::CaptureTechnique enum to Qgis 2022-03-11 07:47:46 +01:00
Antoine
2dc440f804 move enums to qgis.h 2022-03-10 13:37:19 +01:00
Damiano Lombardi
32ca2e4741 Fix docstrings 2022-03-04 08:41:10 +01:00
Damiano Lombardi
22de7e8a69 Fix docstrings since QGIS 3.24 to 3.26 2022-03-04 08:41:10 +01:00
Damiano Lombardi
f3897d7a75 Buffered transactions commitErrors added already modified layers info 2022-03-04 08:41:10 +01:00