Skip to content
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

Shape Digitizing 3-Point Rectangle Tool always creates 3D Polygon #35671

Closed
ScottWerkema opened this issue Apr 8, 2020 · 3 comments
Closed
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality High Priority Regression Something which used to work, but doesn't anymore

Comments

@ScottWerkema
Copy link

ScottWerkema commented Apr 8, 2020

Describe the bug

When using the Shape Digitizing toolbar to create a 3-Point Rectangle (distance and projected), the resultant polygon is always 3D even on a 2D layer.

How to Reproduce

  1. Add a layer to a QGIS where the geometry type is a 2D polygon. In my case, this is a PostGIS layer. geom geometry(Polygon,3857) NOT NULL
    Created using SELECT AddGeometryColumn ('my_schema','my_spatial_table','geom',3857,'POLYGON',2);
  2. Use the "Add rectangle from 3 points" (either variant) to digitize a rectangle.
  3. Note the resultant rectangle is a 3D polygon and you are unable to save edits to this layer now.

Using other shape tools on the toolbar behave as expected.

Expected Result
The 3-Point rectangle tool should create a 2D polygon for a 2D layer and a 3D polygon for a 3D layer.

QGIS and OS versions
macOS 10.15.4
QGIS
3.12.0
3.13 nightly (2020-04-07)

Additional context

This appears to be a regression in 3.12 as 3.10 and lower behave as expected.

@ScottWerkema ScottWerkema added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Apr 8, 2020
@gioman
Copy link
Contributor

gioman commented Apr 8, 2020

This appears to be a regression in 3.12 as 3.10 and lower behave as expected.

I confirm the issue but I see the same problem on 3.10.4 I have not tested 3.4

@gioman gioman added the Digitizing Related to feature digitizing map tools or functionality label Apr 8, 2020
@gioman
Copy link
Contributor

gioman commented Apr 8, 2020

Working ok on 3.8, confirmed regression.

@gioman gioman added Regression Something which used to work, but doesn't anymore High Priority labels Apr 8, 2020
@haubourg
Copy link
Member

haubourg commented Apr 8, 2020

Cc @lbartoletti

@lbartoletti lbartoletti self-assigned this Apr 8, 2020
nyalldawson pushed a commit to nyalldawson/QGIS that referenced this issue May 26, 2020
Fixes qgis#35043, fixes qgis#35671

The initial version of this class presupposed the possibility of constructing a rectangle by 3 points where each point had a  Z. Very useful to make 3D plans, but this is not always what we want...

(cherry picked from commit 8249dcc)
nyalldawson pushed a commit to nyalldawson/QGIS that referenced this issue May 26, 2020
Fixes qgis#35043, fixes qgis#35671

The initial version of this class presupposed the possibility of constructing a rectangle by 3 points where each point had a  Z. Very useful to make 3D plans, but this is not always what we want...

(cherry picked from commit 8249dcc)
nyalldawson pushed a commit that referenced this issue Jun 19, 2020
Fixes #35043, fixes #35671

The initial version of this class presupposed the possibility of constructing a rectangle by 3 points where each point had a  Z. Very useful to make 3D plans, but this is not always what we want...

(cherry picked from commit 8249dcc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality High Priority Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

4 participants