Opened 6 years ago

Closed 6 years ago

#4084 closed defect (fixed)

Wrong code-comment regarding front/back of BOX3D

Reported by: mat Owned by: pramsey
Priority: low Milestone:
Component: postgis Version: master
Keywords: Cc:

Description

In the code for casting BOX3D to geometry, the six sides of the box are commented as front, back, top, bottom, left and right. However, front and back are the wrong way around. The y-axis points away from the viewer, so the the side with the y-max value is the back.

I trusted these comments, which lead to some discrepancies. It took me several hours to realize the comments, which I took for a fact, were actually wrong.

Link to code: https://github.com/postgis/postgis/blob/svn-trunk/postgis/lwgeom_box3d.c#L336

Related question on stackexchange: https://gis.stackexchange.com/questions/282253/postgis-axis-orientation-box3d

PR: https://github.com/postgis/postgis/pull/241

Change History (1)

comment:1 by komzpa, 6 years ago

Resolution: fixed
Status: newclosed

In 16570:

Wrong code-comment regarding front/back of BOX3D

Patch by Matthias Bay

Closes #4084
Closes https://github.com/postgis/postgis/pull/241

Note: See TracTickets for help on using tickets.