-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop V2 suffix on all geometry classes #5491
Conversation
+1
…On Sun., 29 Oct. 2017, 9:21 pm Matthias Kuhn, ***@***.***> wrote:
References qgis/qgis4.0_api#11
<qgis/qgis4.0_api#11>
Renames
QGIS 2 QGIS 3
QgsPolygon QgsPolygonXY
QgsMultiPoint QgsMultiPointXY
QgsMultiPolyline QgsMultiPolylineXY
QgsMultiPolygon QgsMultiPolygonXY
QgsPolygonV2 QgsPolygon
QgsMultiPointV2 QgsMultiPoint
QgsMultiPolylineV2 QgsMultiPolyline
QgsMultiPolygonV2 QgsMultiPolygon
------------------------------
You can view, comment on, or merge this pull request online at:
#5491
Commit Summary
- Rename QgsPolygon to QgsPolygonXY
- Rename QgsMultiPoint to QgsMultiPointXY
- Rename QgsMultiPolyline to QgsMultiPolylineXY
- Rename QgsMultiPolygon to QgsMultiPolygonXY
- Optimize loop
- Rename QgsPolygonV2 to QgsPolygon
- Rename QgsMultiPointV2 to QgsMultiPoint
- Rename QgsMultiPolygonV2 to QgsMultiPolygon
- Document API breaks
File Changes
- *M* doc/api_break.dox
<https://github.com/qgis/QGIS/pull/5491/files#diff-0> (22)
- *M* python/core/geometry/qgsabstractgeometry.sip
<https://github.com/qgis/QGIS/pull/5491/files#diff-1> (16)
- *M* python/core/geometry/qgscurvepolygon.sip
<https://github.com/qgis/QGIS/pull/5491/files#diff-2> (6)
- *M* python/core/geometry/qgsellipse.sip
<https://github.com/qgis/QGIS/pull/5491/files#diff-3> (8)
- *M* python/core/geometry/qgsgeometry.sip
<https://github.com/qgis/QGIS/pull/5491/files#diff-4> (60)
- *M* python/core/geometry/qgsmultipoint.sip
<https://github.com/qgis/QGIS/pull/5491/files#diff-5> (8)
- *M* python/core/geometry/qgsmultipolygon.sip
<https://github.com/qgis/QGIS/pull/5491/files#diff-6> (6)
- *M* python/core/geometry/qgspolygon.sip
<https://github.com/qgis/QGIS/pull/5491/files#diff-7> (8)
- *M* python/core/geometry/qgsregularpolygon.sip
<https://github.com/qgis/QGIS/pull/5491/files#diff-8> (4)
- *M* python/core/geometry/qgssurface.sip
<https://github.com/qgis/QGIS/pull/5491/files#diff-9> (4)
- *M* python/core/geometry/qgstriangle.sip
<https://github.com/qgis/QGIS/pull/5491/files#diff-10> (2)
- *M* python/core/symbology/qgssymbol.sip
<https://github.com/qgis/QGIS/pull/5491/files#diff-11> (4)
- *M* python/plugins/processing/algs/qgis/GeometryConvert.py
<https://github.com/qgis/QGIS/pull/5491/files#diff-12> (8)
- *M* python/plugins/processing/algs/qgis/LinesToPolygons.py
<https://github.com/qgis/QGIS/pull/5491/files#diff-13> (4)
- *M* python/plugins/processing/algs/qgis/MinimumBoundingGeometry.py
<https://github.com/qgis/QGIS/pull/5491/files#diff-14> (2)
- *M* src/3d/qgs3dutils.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-15> (2)
- *M* src/3d/qgs3dutils.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-16> (4)
- *M* src/3d/qgstessellatedpolygongeometry.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-17> (4)
- *M* src/3d/qgstessellatedpolygongeometry.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-18> (4)
- *M* src/3d/qgstessellator.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-19> (4)
- *M* src/3d/qgstessellator.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-20> (4)
- *M* src/3d/symbols/qgsline3dsymbol_p.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-21> (8)
- *M* src/3d/symbols/qgspolygon3dsymbol_p.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-22> (10)
- *M* src/analysis/network/qgsvectorlayerdirector.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-23> (8)
- *M* src/analysis/processing/qgsalgorithmlineintersection.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-24> (2)
- *M* src/analysis/raster/qgskde.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-25> (4)
- *M* src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-26> (2)
- *M* src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-27> (2)
- *M*
src/analysis/vector/geometry_checker/qgsgeometrylinelayerintersectioncheck.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-28> (2)
- *M*
src/analysis/vector/geometry_checker/qgsgeometryselfintersectioncheck.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-29> (4)
- *M* src/analysis/vector/geometry_checker/qgsgeometrytypecheck.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-30> (4)
- *M* src/app/dwg/qgsdwgimporter.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-31> (6)
- *M* src/app/nodetool/qgsnodetool.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-32> (2)
- *M* src/app/qgsmaptooladdfeature.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-33> (6)
- *M* src/app/qgsmaptooladdrectangle.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-34> (4)
- *M* src/app/qgsmaptooladdrectangle.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-35> (4)
- *M* src/app/qgsmaptoolcircle2tangentspoint.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-36> (2)
- *M* src/app/qgsmaptooldeletepart.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-37> (6)
- *M* src/app/qgsmaptooldeletering.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-38> (14)
- *M* src/app/qgsmaptoolfillring.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-39> (8)
- *M* src/app/qgsmaptooloffsetcurve.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-40> (12)
- *M* src/app/qgsmaptoolselectutils.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-41> (4)
- *M* src/app/qgsmaptoolsimplify.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-42> (2)
- *M* src/core/expression/qgsexpressionfunction.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-43> (4)
- *M* src/core/geometry/qgsabstractgeometry.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-44> (18)
- *M* src/core/geometry/qgscurve.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-45> (2)
- *M* src/core/geometry/qgscurvepolygon.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-46> (8)
- *M* src/core/geometry/qgscurvepolygon.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-47> (6)
- *M* src/core/geometry/qgsellipse.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-48> (8)
- *M* src/core/geometry/qgsellipse.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-49> (4)
- *M* src/core/geometry/qgsgeometry.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-50> (162)
- *M* src/core/geometry/qgsgeometry.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-51> (66)
- *M* src/core/geometry/qgsgeometrycollection.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-52> (4)
- *M* src/core/geometry/qgsgeometryeditutils.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-53> (2)
- *M* src/core/geometry/qgsgeometryfactory.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-54> (32)
- *M* src/core/geometry/qgsgeometryfactory.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-55> (24)
- *M* src/core/geometry/qgsgeometrymakevalid.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-56> (10)
- *M* src/core/geometry/qgsgeos.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-57> (10)
- *M* src/core/geometry/qgsgeos.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-58> (4)
- *M* src/core/geometry/qgsinternalgeometryengine.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-59> (24)
- *M* src/core/geometry/qgslinestring.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-60> (2)
- *M* src/core/geometry/qgsmulticurve.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-61> (2)
- *M* src/core/geometry/qgsmultipoint.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-62> (34)
- *M* src/core/geometry/qgsmultipoint.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-63> (12)
- *M* src/core/geometry/qgsmultipolygon.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-64> (44)
- *M* src/core/geometry/qgsmultipolygon.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-65> (12)
- *M* src/core/geometry/qgsmultisurface.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-66> (6)
- *M* src/core/geometry/qgspolygon.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-67> (28)
- *M* src/core/geometry/qgspolygon.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-68> (14)
- *M* src/core/geometry/qgsrectangle.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-69> (2)
- *M* src/core/geometry/qgsregularpolygon.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-70> (4)
- *M* src/core/geometry/qgsregularpolygon.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-71> (2)
- *M* src/core/geometry/qgssurface.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-72> (4)
- *M* src/core/geometry/qgstriangle.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-73> (2)
- *M* src/core/geometry/qgstriangle.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-74> (2)
- *M* src/core/qgsdistancearea.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-75> (4)
- *M* src/core/qgsgeometryvalidator.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-76> (6)
- *M* src/core/qgsgeometryvalidator.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-77> (2)
- *M* src/core/qgsmaptopixelgeometrysimplifier.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-78> (4)
- *M* src/core/qgsogcutils.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-79> (18)
- *M* src/core/qgstracer.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-80> (6)
- *M* src/core/qgsvectorlayereditutils.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-81> (8)
- *M* src/core/qgsvectorlayerlabelprovider.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-82> (6)
- *M* src/core/symbology/qgsheatmaprenderer.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-83> (8)
- *M* src/core/symbology/qgsheatmaprenderer.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-84> (2)
- *M* src/core/symbology/qgsinvertedpolygonrenderer.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-85> (6)
- *M* src/core/symbology/qgsinvertedpolygonrenderer.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-86> (2)
- *M* src/core/symbology/qgspointdistancerenderer.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-87> (2)
- *M* src/core/symbology/qgssymbol.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-88> (10)
- *M* src/core/symbology/qgssymbol.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-89> (6)
- *M* src/core/symbology/qgssymbollayerutils.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-90> (10)
- *M* src/gui/qgshighlight.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-91> (27)
- *M* src/gui/qgshighlight.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-92> (2)
- *M* src/gui/qgsmaptoolcapture.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-93> (2)
- *M* src/gui/qgsrubberband.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-94> (16)
- *M* src/plugins/globe/featuresource/qgsglobefeatureutils.h
<https://github.com/qgis/QGIS/pull/5491/files#diff-95> (12)
- *M* src/plugins/topology/topolTest.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-96> (16)
- *M* src/providers/arcgisrest/qgsarcgisrestutils.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-97> (4)
- *M* src/providers/grass/qgis.v.in.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-98> (10)
- *M* src/providers/grass/qgsgrassgislib.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-99> (2)
- *M* src/providers/grass/qgsgrassprovider.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-100> (4)
- *M* src/providers/grass/qgsgrassvectormap.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-101> (4)
- *M* tests/src/3d/testqgstessellator.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-102> (4)
- *M* tests/src/app/testqgsattributetable.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-103> (2)
- *M* tests/src/app/testqgsfieldcalculator.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-104> (2)
- *M* tests/src/app/testqgsmaptoolidentifyaction.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-105> (4)
- *M* tests/src/app/testqgsnodetool.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-106> (2)
- *M* tests/src/core/testqgscadutils.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-107> (2)
- *M* tests/src/core/testqgsdistancearea.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-108> (2)
- *M* tests/src/core/testqgsexpression.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-109> (14)
- *M* tests/src/core/testqgsgeometry.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-110> (444)
- *M* tests/src/core/testqgsgeometryutils.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-111> (10)
- *M* tests/src/core/testqgsgml.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-112> (26)
- *M* tests/src/core/testqgsmaprendererjob.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-113> (2)
- *M* tests/src/core/testqgspointlocator.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-114> (6)
- *M* tests/src/core/testqgssnappingutils.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-115> (2)
- *M* tests/src/core/testqgsvectorfilewriter.cpp
<https://github.com/qgis/QGIS/pull/5491/files#diff-116> (6)
- *M* tests/src/python/test_qgsgeometry.py
<https://github.com/qgis/QGIS/pull/5491/files#diff-117> (4)
Patch Links:
- https://github.com/qgis/QGIS/pull/5491.patch
- https://github.com/qgis/QGIS/pull/5491.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5491>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAXS3Mw7Daabp-F4CNJ4szUCaZTxjj9zks5sxF-6gaJpZM4QKRuo>
.
|
any idea what this is:
https://travis-ci.org/qgis/QGIS/jobs/294566074#L795-L804 Just seen this the first time (after restarting the job for a different failure). And to be honest, I've got no idea how that code works and how that ever succeeded. A method and a local variable with the same name and an assignment to it to pass back a value... Need to finally get a python book apparently :D |
There's a duplicate line there. But basically it's storing the passed value as a property on the function so that we can later test if that function was called and what value was passed to it. Global variables would also work here, but this keeps the test self-contained. |
Lovely work here! Can I suggest a related rename? c4f3832 renamed QgsGeometry::fromPolyline to QgsGeometry::fromPolylineXY. I think we should do this for all these methods if we're renaming the related classes. E.g. fromMultiPoint -> fromMultiPointXY, fromPolygon -> fromPolygonXY, etc. Then we've got scope to later in 3.x readd new fromMultiPoint/fromPolygon etc which operate on QgsPoint. |
Thanks. In the end, I figured it out which led me to propose #5495 which should make things even more self-contained. |
- QgsGeometry::fromPoint() was renamed to fromPointXY() - QgsGeometry::fromMultiPoint() was renamed to fromMultiPointXY() - QgsGeometry::fromMultiPolyline() was renamed to fromMultiPolylineXY() - QgsGeometry::fromPolygon() was renamed to fromPolygonXY() - QgsGeometry::fromMultiPolygon() was renamed to fromMultiPolygonXY()
Also introduces the from[Geometry]XY for QgsGeometryFactory
NIce work. Thanks.
…On Mon, Oct 30, 2017 at 6:49 PM, Matthias Kuhn ***@***.***> wrote:
Merged #5491 <#5491>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5491 (comment)>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAXS3ItezmTJrPB_gCBRx8GksUukCgdZks5sxY2KgaJpZM4QKRuo>
.
|
References qgis/qgis4.0_api#11
This finally brings back a consistent state in naming within the geometry API
Renames