4259 Commits

Author SHA1 Message Date
Nyall Dawson
2d43dac0b5 Refine behavior of QgsGeometry equals tests
Before we had two checks - equals() and isGeosEqual() which
performed the exact same check (since equals() called the geos
equality test)

Since the geos equality test is a slow, topological test, which
considers two geometries equal if their component edges overlap,
but disregards ordering of vertices this is not always what we
want. There's also the issue that geos cannot consider m values
when testing the geometries, so two geometries with different
m values would be reported equal.

So, now calling QgsGeometry::equals performs a very fast, strict
equality test where geometries are only equal if the have exactly
the same vertices, type, and order.

And swap most code which was calling the slow geos test to instead
use the fast strict native test.
2018-01-05 09:59:22 +10:00
Nyall Dawson
13aa5211d1 Expand equality operators for QgsAbstractGeometry subclasses 2018-01-05 09:37:27 +10:00
Juergen E. Fischer
e271b647d4 translation string updates (incl. better translatable date time widget
help)
2018-01-04 22:49:30 +01:00
Nyall Dawson
b904731259 Respect transform context in point locator 2018-01-04 15:04:42 +11:00
Nyall Dawson
8f15cdf680 Respect transform contexts when tracing 2018-01-04 15:04:42 +11:00
Nyall Dawson
c94d26a5d5 Doxygen++ 2018-01-04 12:27:38 +11:00
Denis Rouzaud
69cfdc4fcf rename static variables
since they're not really default values
2018-01-03 12:21:17 -04:00
Denis Rouzaud
919cbec7b2 add a bool in config to determine if it uses Qt::ISODate for field format
also fixes the fact that the display format of QDateTimeEdit only accepts string formats, so in case of Qt::ISODate use a default date/time with zmne zone
2018-01-03 11:28:05 -04:00
Denis Rouzaud
1710dc0587 fix date/time widget for field with time zones
this adds a new format of date/time to use Qt::ISODate format
the issue is that QDate::fromString does not recognize the t letter for the timezone in format
this a hack since any field_format needs to be tested if it corresponds to QgsDateTimeFieldFormatter::DEFAULT_ISO_FORMAT and in such case replace by Qt::ISODate instead of a format string
2018-01-03 10:01:53 -04:00
luzpaz
626781a63a Typo fixes
+ added word to spelling.dat
2017-12-31 09:14:09 +11:00
Nyall Dawson
2872f69e20 Reluctantly participate in the Americanization of the world 2017-12-23 18:48:03 +11:00
Nyall Dawson
c7e37e89eb [sipify] Correctly convert doxygen warning blocks to sphinx warnings 2017-12-23 18:48:03 +11:00
Nyall Dawson
87b8a370e9 Expand QgsCoordinateTransform docs 2017-12-23 18:48:03 +11:00
Nyall Dawson
6ac6939bf8 Sipify 2017-12-23 14:21:32 +10:00
Nyall Dawson
4ff72de62e
Merge pull request #5858 from lbartoletti/segment_intersection
Segment intersection
2017-12-22 21:43:13 +11:00
nirvn
0a40a81151 [layouts] add icons for items and use those in the items panel 2017-12-21 10:33:24 +07:00
Matthias Kuhn
f5a650f978
Followup 9a5435f: Fix sip files 2017-12-20 12:10:33 +01:00
Etienne Trimaille
bf45d0b618 Crs (#5908)
* fix display of CRS if invalid CRS

* fix #17455 set an empty CRS if the read CRS from XML is wrong

* add warning about empty CRS node when reading XML
2017-12-20 10:46:00 +02:00
Etienne Trimaille
9a5435ff1e remove CRS picker and allow only layer CRS or provider CRS in metadata editor (#5915) 2017-12-20 10:35:49 +02:00
Nyall Dawson
3c7f745424
Merge pull request #5919 from nyalldawson/iter_datum
Use transform context in feature requests with destination crs set
2017-12-20 19:02:11 +11:00
Nyall Dawson
4643712a1e Fix missing transform contexts for QgsDistanceArea
QgsDistanceArea.setSourceCrs() now requires a QgsTransformContext
argument.
2017-12-20 17:37:46 +10:00
Nyall Dawson
6528f1c307 Require a transform context when setting the destination crs for
a feature request

Forces correct datum handling for these requests, and removes
a few more uses of the deprecated/datum unaware transforms.
2017-12-20 12:32:20 +10:00
Nyall Dawson
b24a1bf10d Add transform context to processing context 2017-12-20 12:21:14 +10:00
Denis Rouzaud
5dc9b5869a fix empty lines with spaces 2017-12-19 21:17:29 -04:00
Denis Rouzaud
bdfd345034 fix code descriptor 2017-12-19 21:17:29 -04:00
Denis Rouzaud
64c99e054c run sipify for code snippets 2017-12-19 21:17:29 -04:00
Denis Rouzaud
d042304cc3 [sipify] habndle python code snippets 2017-12-19 21:17:29 -04:00
Denis Rouzaud
90e5196996 run sipify 2017-12-19 14:55:46 -04:00
Sandro Santilli
5308b265db Fix typo in documentation (missing quote) 2017-12-19 10:39:31 +01:00
Nyall Dawson
b594ecd7c5 Fix missing page shadows 2017-12-19 13:03:10 +10:00
Nyall Dawson
2007792f77 Restore layered svg export option 2017-12-19 12:06:29 +10:00
Nyall Dawson
c7bd7b3d67 Add method to ensure file name string is safe 2017-12-19 10:59:27 +10:00
Nyall Dawson
613b1584d1 Start restoring SVG export 2017-12-19 10:38:28 +10:00
Nyall Dawson
128e37eaf4 Add some extension and filter handling functions to QgsFileUtils 2017-12-19 11:37:58 +11:00
Nyall Dawson
c7017914a0 Doxygen 2017-12-19 08:48:32 +10:00
Nyall Dawson
f216b188d6 Move all datum transform related methods to QgsDatumTransform 2017-12-19 08:47:02 +10:00
Nyall Dawson
198486f0e9 Avoid including private header 2017-12-18 21:19:02 +10:00
Nyall Dawson
25c3e135b0 Move datum transform structs out to their own header, to avoid
need to include private header file
2017-12-18 21:19:02 +10:00
Nyall Dawson
a1128a52a4 Hide guides from layout exports 2017-12-18 16:45:10 +10:00
Nyall Dawson
0052eb830e Add unit test for pdf exports 2017-12-18 16:33:26 +10:00
Nyall Dawson
831732f3a3 Sipify 2017-12-17 14:18:36 +10:00
Nyall Dawson
65f4c4acef Port orientation decoding code from composer 2017-12-17 14:14:48 +10:00
Nyall Dawson
447a94909f Fix items moving after altering page size or inserting/deleting pages 2017-12-17 14:14:48 +10:00
Nyall Dawson
f649f1f8a7 [layouts][needs-docs] Add control for whether pages should be
exported, including data defined setting

This replaces the 2.x data-defined "number of pages" setting.
Instead of requiring users to develop an expression to return
the number of pages, instead we allow individual pages to have
a data defined control of whether that page should be included
in the export.

This is more flexible, and works correctly with the mixed page
size model for layouts.
2017-12-17 14:14:48 +10:00
Nyall Dawson
ca37a1ebd7 Fix drawing of map items (grids, overviews) when rendering map item as a raster item 2017-12-17 14:14:31 +10:00
Nyall Dawson
b992e871ee [layouts][FEATURE] Don't force the whole layout to be rasterized
when exporting to PDF

If an individual layout item needs rasterisation in order to
be exported correctly, it can now be individually rasterised
without forcing every other item to also be rasterised.

This allows exports to PDF keeping as much as possible as vectors,
e.g. a map with layer opacity won't force labels, scalebars, etc
to be rasterised too.

To accompany this, a new "Always export as vectors" checkbox
was added to layout properties. If checked, this will force
the export to keep items as vectors, even when it causes the
output to look different to layouts.

Fixes #7885
2017-12-17 14:14:31 +10:00
Nyall Dawson
91179f1396 Work on PDF export 2017-12-17 14:14:31 +10:00
Nyall Dawson
a59dce5048 Move containsAdvancedEffects test to QgsLayoutItem
And start a generic test library for all item types to ensure
correct behavior for QgsLayoutItem subclasses

Currently justs tests to ensure that overriden
containsAdvancedEffects methods also call the base class
test
2017-12-17 14:14:31 +10:00
Nyall Dawson
8b1e057d2c Make QgsLayoutExporter::generateFileName virtual, so exporter
subclasses can be made which customise the generated file names
2017-12-17 14:14:31 +10:00
Nyall Dawson
2f0969e2bd Expose antialiasing option in image export dialog
Allows for creating non-antialiased images from layouts. Note that
some layout item types do not correctly respect this setting, but
at least map items do and the API is in place for them to be
fixed later.

Fixes #9281
2017-12-17 14:14:31 +10:00