8403 Commits

Author SHA1 Message Date
Nyall Dawson
d47dc4b210 Expose choice of units for geometry generator symbol layers
Usually a geometry generator expression must return a geometry
in the associated layer's CRS. But this doesn't work in situations
where a geometry generator symbol is NOT associated with a layer,
e.g. when used in a layout item.

So add a new option to allow users to specify which unit the expression
will return geometries in, with choices of map units (the default,
previous behavior), millimeters, pixels, inches and points.

When millimeters, points, inches or pixels is selected then
the @map_geometry variable will be available for the expression,
and contain the feature's geometry in the specified units (relative
to the map frame). (The $geometry variable remains available and
still in layer CRS, in case an expression needs to calculate the
original area, perimeter, etc in real-world units while returning
results in a different unit!)

A step toward fixing #39159
2021-09-21 09:49:52 +10:00
Nyall Dawson
3d599fe4b5 Fix QgsGeometry.fromPolygonXY docs
Fixes #45099
2021-09-21 09:14:52 +10:00
rldhont
909859188c
Merge pull request #44862 from 3liz/metadata_api_july
Enable many MetadataUrl on the server side
2021-09-17 15:14:01 +02:00
David Marteau
aeab4e8b18
Rename 'clone' method to 'copyTo' 2021-09-17 12:19:42 +02:00
Nyall Dawson
850215f899 Add missing cast code for QgsHashedLineSymbolLayer 2021-09-17 15:15:32 +10:00
Etienne Trimaille
8b6395de85
MetadataUrls - Add some tests and some fixes 2021-09-16 14:23:46 +02:00
Etienne Trimaille
235a285814
MetadataUrl API : Save and restore in XML 2021-09-16 14:10:07 +02:00
David Marteau
ee6acb0ca2
Refactorize server properties 2021-09-16 14:10:07 +02:00
Etienne Trimaille
21c3f3fcbf
Add API for having many metadataUrl on a layer 2021-09-16 14:10:06 +02:00
vcloarec
a82b8d4d7f fix layer extent and vertical extent of dataset group when editing 2021-09-14 23:28:20 -04:00
Vincent Cloarec
176ab29658
Make mesh edit tools more consistent with vector layers tools (#45040)
[mesh] UX fixes:
* move mesh elements click->move->click instead press-> drag->release
* allow to select by drawing a polygon and select an existing polygon in the same map tool like for vector layer)
2021-09-14 07:52:25 +02:00
Julien Cabieces
33ea556c0f fix version 2021-09-14 15:51:13 +10:00
Julien Cabieces
655c02afe4 Fix GetMap tile_buffer when labels are rotated 2021-09-14 15:51:13 +10:00
Nyall Dawson
50ab8c1c81 Cleanup API docs for QgsCadUtils 2021-09-13 13:22:28 +10:00
Loïc Bartoletti
2414a2884b add setCadPoint and cadPoint methods and fix test 2021-09-13 08:03:46 +10:00
Loïc Bartoletti
992dc6cc4d make AlignMapPointContext a class instead of a struct 2021-09-13 08:03:46 +10:00
Loïc Bartoletti
42794288ab 3.20 -> 3.22 2021-09-13 08:03:46 +10:00
Loïc Bartoletti
0706585e0f init zm support in QgsAdvancedDigitzingDockWidgetBase 2021-09-13 08:03:46 +10:00
Nyall Dawson
45b886727b Improve docs 2021-09-11 07:59:51 +10:00
Nyall Dawson
c2c0f2574d [processing] Add parameter type for annotation layers 2021-09-11 07:59:51 +10:00
Nyall Dawson
ae4c1b0d2a Add missing transfer annotation 2021-09-11 06:14:45 +10:00
rldhont
da4240449d Encode and write vector tiles in different CRS than EPSG:3857
The Mapbox Vector Tile specification provides these definition for projection and bounds.

A Vector Tile represents data based on a square extent within a projection. A Vector Tile SHOULD NOT contain information about its bounds and projection. The file format assumes that the decoder knows the bounds and projection of a Vector Tile before decoding it.

Web Mercator is the projection of reference, and the Google tile scheme is the tile extent convention of reference. Together, they provide a 1-to-1 relationship between a specific geographical area, at a specific level of detail, and a path such as https://example.com/17/65535/43602.mvt.

Vector Tiles MAY be used to represent data with any projection and tile extent scheme.

It is possible to encode and write vector tiles in different CRS than EPSG:3857.

The implementation used the CRS bounds to defined the tile 0 top left coordinates and the scale denominator for 0 zoom level.
2021-09-10 11:44:34 +02:00
rldhont
95328eea99 Tile Matrix in different CRS
Add a new static method to QgsTileMatrix to get tile matrix in different CRS with top left point and scale denominator for 0 zoom level.
2021-09-10 11:44:34 +02:00
Nyall Dawson
5e150f9262 Allow paint effects to be applied to an annotation layer 2021-09-10 18:26:39 +10:00
Nyall Dawson
fbce5ad864 Implement html metadata for annotation layers 2021-09-10 18:26:39 +10:00
Nyall Dawson
4cb06c0ae2 Add an annotation item edit operation for adding nodes 2021-09-10 15:01:26 +10:00
Nyall Dawson
a7d299df92 Use an edit operation for annotation item translation, instead of
transform

Will make it easier to add undo/redo support in future
2021-09-10 15:01:26 +10:00
Nyall Dawson
1228f59bff Make annotation item edit API a bit more flexible 2021-09-10 15:01:26 +10:00
Nyall Dawson
4b245f59e0 Add new annotation edit operation for deleting a vertex 2021-09-10 15:01:26 +10:00
Nyall Dawson
1537d393e3 Add framework for retrieving the temporary results of a in-progress
edit operation on an annotation item

This is used for the item to return a representative geometry
of what the item would look like if the operation were to be
applied. It's used to generate a rubber band showing a preview
of the modification during interactive editing operations on
an annotation item.
2021-09-10 15:01:26 +10:00
Nyall Dawson
1fe874315a Add method to apply a annotation item edit operation directly
onto a QgsAnnotationLayer
2021-09-10 15:01:26 +10:00
Nyall Dawson
631343265d Allow QgsAnnotationItemEditOperationMoveNode operations to be
applied to annotation items to move nodes in the item
2021-09-10 15:01:26 +10:00
Nyall Dawson
a87206dbdf Create QgsAbstractAnnotationItemEditOperation as base class for
edit operations on annotation layers, with initial implementation
as QgsAnnotationItemEditOperationMoveNode

This class encapsulates edit operations which apply to annotation
layers/items
2021-09-10 15:01:26 +10:00
Nyall Dawson
5ed05fadca Add an id number to QgsAnnotationItemNode 2021-09-10 15:01:26 +10:00
Martin Dobias
1a8ff84791 [feature] Transactions in MSSQL provider 2021-09-09 08:07:21 -07:00
Vincent Cloarec
be3a9e7564
reindex/renumbering mesh layer (#44969)
[mesh] [feature] reindex/renumbering mesh layer

Co-authored-by: PeterPetrik <zilolv@gmail.com>
2021-09-09 12:18:31 +02:00
Vincent Cloarec
46013949fb
Force mesh by polylines (#44962)
[mesh] [feature] allow modify mesh frame elevation by force/break lines
2021-09-09 10:26:32 +02:00
Vincent Cloarec
45e07dd72f
Select mesh elements by expression UI (#44835)
[mesh] [feature] Select mesh elements by expression
2021-09-09 08:29:45 +02:00
Nyall Dawson
b8f65cbf01 Promote temporal related enums to enum classes, move to Qgis 2021-09-09 14:56:47 +10:00
Richard Duivenvoorde
b5952c1638 Sipify all 2021-09-09 08:07:48 +10:00
Richard Duivenvoorde
9b1894cf46 Sipify and indentation 2021-09-09 08:07:48 +10:00
David Marteau
f7cc194efd xpose single vector tile encoding method 2021-09-07 04:51:34 -07:00
Nyall Dawson
6d926d4ffe Add method to create rubber band geometry for an annotation item 2021-09-07 15:48:17 +10:00
Nyall Dawson
8d1f2bf7a6 Add a method to transform QgsAnnotationItems using a QTransform
transform
2021-09-07 15:48:17 +10:00
Nyall Dawson
46f1957cee [api] Annotation items can have their symbology reference scale set
This is especially important for annotation items, where users will
want to create text items with text which scales up and down with
the map.
2021-09-07 14:57:57 +10:00
Nyall Dawson
837dd24858 Make it easier for annotation item subclasses to correctly
copy/read/write common base class properties
2021-09-07 14:57:57 +10:00
Nyall Dawson
9b477ba10d Fix crash when very large coordinates are stored in
QgsRenderedItemResults spatial index
2021-09-07 12:56:04 +10:00
Nyall Dawson
ae17baa737 Add method to erase results from specific layers to
QgsRenderedItemResults
2021-09-07 12:56:04 +10:00
Nyall Dawson
38b8b82674 Add method to replace an existing item in an annotation layer 2021-09-07 10:35:02 +10:00
Nyall Dawson
c7c7b6dd1e [api] Create annotation item gui registry
This registry is attached to QgsGui and handles registration of
functions which create widgets for modifying QgsAnnotationItems

Modeled heavily off the print layout API
2021-09-07 10:35:02 +10:00