11 Commits

Author SHA1 Message Date
Sandro Santilli
5186c385c4 Expect centroid obtained by not forcing inclusion of control point 2017-08-25 23:06:52 +02:00
Sandro Santilli
8363d2f3d0 Update expected centroid, interpolated angle and located point for reference curves
These values change because they are computed on the *linearization*
of those curves, and refactoring linearization codes results in
slighly different values.

NOTE: adding or not adding the control point would also affect these
results
2017-08-25 23:06:52 +02:00
Matthias Kuhn
37a306e3f2 Fix tests 2017-06-14 07:37:31 +02:00
Nyall Dawson
ef6c8be16f Fix import WKT of the format MultiPoint (-20 -90, -20 -88 )
Should technically be MultiPoint ((-20 -90), (-20 -88)), but
it's nice to be forgiving and accept as wide a range of WKT
formats as possible

Fix #16483
2017-04-30 08:23:49 +10:00
Nyall Dawson
11150dde3e Add additional curvepolygon with compound curve to reference geometry tests 2017-02-04 14:57:29 +10:00
Marco Hugentobler
e9d3a3aca4 Slightly more precise numbers for circular string centroids 2016-05-06 14:07:13 +02:00
Nyall Dawson
8c0fe47d8e Add tests for QgsPointV2, fix some issues:
- prevent creation of a QgsPointV2 with a non-point WKB type
- fix bounding box was not invalidated for some modification routines
- if WKT type is PointZ/M/ZM and not enough coordinates specified,
initialise extra coordinates to 0
2015-11-19 19:48:42 +11:00
Nyall Dawson
18744b4123 Fix crash with malformed WKT 2015-11-10 17:08:48 +11:00
Nyall Dawson
fccf54b2d7 Fix crash on malformed WKT strings 2015-11-06 20:09:39 +11:00
Nyall Dawson
5f1bb6cf1f Geometry fixes:
- when creating geometry from WKT, upgrade dimensionality of geometry
if coordinates are 3/4 dimensional
- match dimensionality of collections to child dimensionality
- fix area of curves was non-zero if curve is closed
- don't consider m values when testing for curve closedness
- add unit tests for closedness
- add unit tests for CircularStrings, CompoundCurves, CurvePolygon,
tests with geometries with Z/M values
2015-10-18 21:03:15 +11:00
Nyall Dawson
785d9952a0 Add a bunch of geometry unit tests against reference geometries
(inc geometry count, node count, ring count, area, centroid,
x/y min/max)

TODO:
- invesigate whether Z/M is required for GeometryCollection WKT
data type if children have Z/M dimension
- fix QGIS handling of mixing length and perimeter for collections
resulting in incorrect length calculation for mixed Collections
2015-10-17 15:02:18 +11:00